-
-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move NDK from sentry-java to sentry-native #3189
Merged
Merged
Changes from 7 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
42df453
POC: Move NDK code to sentry-natice
markushi 6f72a25
temp
markushi 648752e
Merge branch 'main' into feat/move-ndk
markushi 46be3d1
Fix prefab setup, minor cleanup
markushi 96bad91
Merge branch 'main' into feat/move-ndk
markushi 8d99942
Fix typo
markushi 4367e61
Use proper package names
markushi a060e60
Merge branch '8.x.x' into feat/move-ndk
markushi 019d16f
Switch to shell script for updating sentry-native
markushi aa3376d
Update ndk sample as well
markushi 6f76b85
Add Changelog
markushi 7cb177f
Fix tests
markushi a694d81
Bump sentry-native to 0.7.5
markushi aa8a955
Update Changelog
markushi 14b2cfd
Merge branch '8.x.x' into feat/move-ndk
markushi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +0,0 @@ | ||
[submodule "sentry-android-ndk/sentry-native"] | ||
path = sentry-android-ndk/sentry-native | ||
url = https://github.com/getsentry/sentry-native | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,38 +5,21 @@ plugins { | |
kotlin("android") | ||
jacoco | ||
id(Config.QualityPlugins.jacocoAndroid) | ||
id(Config.NativePlugins.nativeBundleExport) | ||
id(Config.QualityPlugins.gradleVersions) | ||
} | ||
|
||
var sentryNativeSrc: String = "sentry-native" | ||
val sentryAndroidSdkName: String by project | ||
|
||
android { | ||
compileSdk = Config.Android.compileSdkVersion | ||
namespace = "io.sentry.android.ndk" | ||
|
||
sentryNativeSrc = if (File("${project.projectDir}/sentry-native-local").exists()) { | ||
"sentry-native-local" | ||
} else { | ||
"sentry-native" | ||
} | ||
println("sentry-android-ndk: $sentryNativeSrc") | ||
|
||
defaultConfig { | ||
targetSdk = Config.Android.targetSdkVersion | ||
minSdk = Config.Android.minSdkVersionNdk // NDK requires a higher API level than core. | ||
|
||
testInstrumentationRunner = Config.TestLibs.androidJUnitRunner | ||
|
||
externalNativeBuild { | ||
cmake { | ||
arguments.add(0, "-DANDROID_STL=c++_static") | ||
arguments.add(0, "-DSENTRY_NATIVE_SRC=$sentryNativeSrc") | ||
arguments.add(0, "-DSENTRY_SDK_NAME=$sentryAndroidSdkName") | ||
} | ||
} | ||
|
||
ndk { | ||
abiFilters.addAll(Config.Android.abiFilters) | ||
} | ||
|
@@ -45,15 +28,6 @@ android { | |
buildConfigField("String", "VERSION_NAME", "\"${project.version}\"") | ||
} | ||
|
||
// we use the default NDK and CMake versions based on the AGP's version | ||
// https://developer.android.com/studio/projects/install-ndk#apply-specific-version | ||
|
||
externalNativeBuild { | ||
cmake { | ||
path("CMakeLists.txt") | ||
} | ||
} | ||
|
||
buildTypes { | ||
getByName("debug") | ||
getByName("release") { | ||
|
@@ -81,10 +55,6 @@ android { | |
checkReleaseBuilds = false | ||
} | ||
|
||
nativeBundleExport { | ||
headerDir = "${project.projectDir}/$sentryNativeSrc/include" | ||
} | ||
|
||
// needed because of Kotlin 1.4.x | ||
configurations.all { | ||
resolutionStrategy.force(Config.CompileOnly.jetbrainsAnnotations) | ||
|
@@ -101,6 +71,8 @@ dependencies { | |
api(projects.sentry) | ||
api(projects.sentryAndroidCore) | ||
|
||
implementation("io.sentry:sentry-native-ndk:0.7.20") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we'll probably need to make our dependency updater work for this module too |
||
|
||
compileOnly(Config.CompileOnly.jetbrainsAnnotations) | ||
|
||
testImplementation(kotlin(Config.kotlinStdLib, KotlinCompilerVersion.VERSION)) | ||
|
Submodule sentry-native
deleted from
4ec95c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
sentry-android-ndk/src/main/java/io/sentry/android/ndk/INativeScope.java
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
sentry-android-ndk/src/main/java/io/sentry/android/ndk/NativeModuleListLoader.java
This file was deleted.
Oops, something went wrong.
55 changes: 0 additions & 55 deletions
55
sentry-android-ndk/src/main/java/io/sentry/android/ndk/NativeScope.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This smells like a breaking change - should we make it part of v8 actually?