|
1 | 1 | # Android NDK support for sentry-native |
2 | 2 |
|
3 | 3 | | Package | Maven Central | Minimum Android API Level | Supported ABIs | |
4 | | -| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | ------------------------------------------- | |
| 4 | +|-------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------|---------------------------------------------| |
5 | 5 | | `io.sentry:sentry-native-ndk` | [](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-native-ndk) | 19 | "x86", "armeabi-v7a", "x86_64", "arm64-v8a" | |
6 | 6 |
|
7 | 7 | ## Resources |
@@ -29,46 +29,46 @@ The `ndk` project uses the Gradle build system in combination with CMake. You ca |
29 | 29 | 1. Set a custom `versionName` in the `ndk/gradle.properties` file |
30 | 30 | 2. Publish the package locally |
31 | 31 |
|
32 | | -```shell |
33 | | -cd ndk |
34 | | -./gradlew :sentry-native-ndk:publishToMavenLocal |
35 | | -``` |
| 32 | + ```shell |
| 33 | + cd ndk |
| 34 | + ./gradlew :sentry-native-ndk:publishToMavenLocal |
| 35 | + ``` |
36 | 36 |
|
37 | 37 | 3. Consume the build in your app |
38 | 38 |
|
39 | | -``` |
40 | | -// usually settings.gradle |
41 | | -allprojects { |
42 | | - repositories { |
43 | | - mavenLocal() |
44 | | - } |
45 | | -} |
46 | | -
|
47 | | -// usually app/build.gradle |
48 | | -android { |
49 | | - buildFeatures { |
50 | | - prefab = true |
51 | | - } |
52 | | -} |
53 | | -
|
54 | | -dependencies { |
55 | | - implementation("io.sentry:sentry-native-ndk:<version>") |
56 | | -} |
57 | | -``` |
| 39 | + ``` |
| 40 | + // usually settings.gradle |
| 41 | + allprojects { |
| 42 | + repositories { |
| 43 | + mavenLocal() |
| 44 | + } |
| 45 | + } |
| 46 | +
|
| 47 | + // usually app/build.gradle |
| 48 | + android { |
| 49 | + buildFeatures { |
| 50 | + prefab = true |
| 51 | + } |
| 52 | + } |
| 53 | +
|
| 54 | + dependencies { |
| 55 | + implementation("io.sentry:sentry-native-ndk:<version>") |
| 56 | + } |
| 57 | + ``` |
58 | 58 |
|
59 | 59 | 4. Link the pre-built packages with your native code |
60 | 60 |
|
61 | | -```cmake |
62 | | -# usually app/CMakeLists.txt |
| 61 | + ```cmake |
| 62 | + # usually app/CMakeLists.txt |
63 | 63 |
|
64 | | -find_package(sentry-native-ndk REQUIRED CONFIG) |
| 64 | + find_package(sentry-native-ndk REQUIRED CONFIG) |
65 | 65 |
|
66 | | -target_link_libraries(<app> PRIVATE |
67 | | - ${LOG_LIB} |
68 | | - sentry-native-ndk::sentry-android |
69 | | - sentry-native-ndk::sentry |
70 | | -) |
71 | | -``` |
| 66 | + target_link_libraries(<app> PRIVATE |
| 67 | + ${LOG_LIB} |
| 68 | + sentry-native-ndk::sentry-android |
| 69 | + sentry-native-ndk::sentry |
| 70 | + ) |
| 71 | + ``` |
72 | 72 |
|
73 | 73 | ## Development |
74 | 74 |
|
|
0 commit comments