From 875434857aabed0b7814ac3f9e420618bcac8bfa Mon Sep 17 00:00:00 2001 From: Markus Hintersteiner Date: Wed, 6 Nov 2024 09:53:36 +0100 Subject: [PATCH 1/2] Enable 16kb support for Android 15, bump ndk minSdk to 21 --- CHANGELOG.md | 12 ++++++++++++ README.md | 2 +- buildSrc/src/main/java/Config.kt | 4 +++- sentry-android-ndk/build.gradle.kts | 4 +--- sentry-samples/sentry-samples-android/CMakeLists.txt | 4 ++++ .../sentry-samples-android/build.gradle.kts | 10 ++++++++-- 6 files changed, 29 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a67bbba09..83ba78e3c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,18 +2,30 @@ ## Unreleased +### Breaking Changes + +- The minSdk level for sentry-android-ndk changed from 19 to 21 + ### Features - Add `globalHubMode` to options ([#3805](https://github.com/getsentry/sentry-java/pull/3805)) - `globalHubMode` used to only be a param on `Sentry.init`. To make it easier to be used in e.g. Desktop environments, we now additionally added it as an option on SentryOptions that can also be set via `sentry.properties`. - If both the param on `Sentry.init` and the option are set, the option will win. By default the option is set to `null` meaning whatever is passed to `Sentry.init` takes effect. - Lazy uuid generation for SentryId and SpanId ([#3770](https://github.com/getsentry/sentry-java/pull/3770)) +- Android 15: Add support for 16KB page sizes + - See https://developer.android.com/guide/practices/page-sizes for more details ### Fixes - Add `auto.graphql.graphql22` to ignored span origins when using OpenTelemetry ([#3828](https://github.com/getsentry/sentry-java/pull/3828)) - The Spring Boot 3 WebFlux sample now uses our GraphQL v22 integration ([#3828](https://github.com/getsentry/sentry-java/pull/3828)) +### Dependencies + +- Bump Native SDK from v0.7.5 to v0.7.8 + - [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#078) + - [diff](https://github.com/getsentry/sentry-native/compare/0.7.5...0.7.8) + ### Behavioural Changes - (Android) Enable Performance V2 by default ([#3824](https://github.com/getsentry/sentry-java/pull/3824)) diff --git a/README.md b/README.md index 90cdcc8588..58002699ce 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Sentry SDK for Java and Android |-----------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ------- | | sentry-android | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-android/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-android) | 19 | | sentry-android-core | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-android-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-android-core) | 19 | -| sentry-android-ndk | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-android-ndk/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-android-ndk) | 19 | +| sentry-android-ndk | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-android-ndk/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-android-ndk) | 21 | | sentry-android-timber | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-android-timber/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-android-timber) | 19 | | sentry-android-fragment | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-android-fragment/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-android-fragment) | 19 | | sentry-android-navigation | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-android-navigation/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-android-navigation) | 19 | diff --git a/buildSrc/src/main/java/Config.kt b/buildSrc/src/main/java/Config.kt index 8271d7dd7f..ef82b9ca67 100644 --- a/buildSrc/src/main/java/Config.kt +++ b/buildSrc/src/main/java/Config.kt @@ -36,7 +36,7 @@ object Config { val minSdkVersion = 19 val minSdkVersionOkHttp = 21 val minSdkVersionReplay = 19 - val minSdkVersionNdk = 19 + val minSdkVersionNdk = 21 val minSdkVersionCompose = 21 val targetSdkVersion = sdkVersion val compileSdkVersion = sdkVersion @@ -156,6 +156,8 @@ object Config { val apolloKotlin = "com.apollographql.apollo3:apollo-runtime:3.8.2" + val sentryNativeNdk = "io.sentry:sentry-native-ndk:0.7.8" + object OpenTelemetry { val otelVersion = "1.41.0" val otelAlphaVersion = "$otelVersion-alpha" diff --git a/sentry-android-ndk/build.gradle.kts b/sentry-android-ndk/build.gradle.kts index fe67063139..feeb5fb878 100644 --- a/sentry-android-ndk/build.gradle.kts +++ b/sentry-android-ndk/build.gradle.kts @@ -8,8 +8,6 @@ plugins { id(Config.QualityPlugins.gradleVersions) } -val sentryAndroidSdkName: String by project - android { compileSdk = Config.Android.compileSdkVersion namespace = "io.sentry.android.ndk" @@ -71,7 +69,7 @@ dependencies { api(projects.sentry) api(projects.sentryAndroidCore) - implementation("io.sentry:sentry-native-ndk:0.7.5") + implementation(Config.Libs.sentryNativeNdk) compileOnly(Config.CompileOnly.jetbrainsAnnotations) diff --git a/sentry-samples/sentry-samples-android/CMakeLists.txt b/sentry-samples/sentry-samples-android/CMakeLists.txt index 19dca2b80d..8b2e39fcd2 100644 --- a/sentry-samples/sentry-samples-android/CMakeLists.txt +++ b/sentry-samples/sentry-samples-android/CMakeLists.txt @@ -12,3 +12,7 @@ target_link_libraries(native-sample PRIVATE sentry-native-ndk::sentry-android sentry-native-ndk::sentry ) + +# Android 15: Support 16KB page sizes +# see https://developer.android.com/guide/practices/page-sizes +target_link_options(native-sample PRIVATE "-Wl,-z,max-page-size=16384") diff --git a/sentry-samples/sentry-samples-android/build.gradle.kts b/sentry-samples/sentry-samples-android/build.gradle.kts index 0f3cffecc2..dc6737e763 100644 --- a/sentry-samples/sentry-samples-android/build.gradle.kts +++ b/sentry-samples/sentry-samples-android/build.gradle.kts @@ -92,6 +92,13 @@ android { ignore = true } } + + @Suppress("UnstableApiUsage") + packagingOptions { + jniLibs { + useLegacyPackaging = true + } + } } dependencies { @@ -126,8 +133,7 @@ dependencies { implementation(Config.Libs.composeNavigation) implementation(Config.Libs.composeMaterial) implementation(Config.Libs.composeCoil) + implementation(Config.Libs.sentryNativeNdk) debugImplementation(Config.Libs.leakCanary) - - implementation("io.sentry:sentry-native-ndk:0.7.5") } From 486c1e0e0afedddb3e3c63971dbec56cae7239ec Mon Sep 17 00:00:00 2001 From: Markus Hintersteiner Date: Wed, 6 Nov 2024 09:55:45 +0100 Subject: [PATCH 2/2] Update Changelog --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83ba78e3c4..75132627cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### Breaking Changes -- The minSdk level for sentry-android-ndk changed from 19 to 21 +- The minSdk level for sentry-android-ndk changed from 19 to 21 ([#3851](https://github.com/getsentry/sentry-java/pull/3851)) ### Features @@ -12,7 +12,7 @@ - `globalHubMode` used to only be a param on `Sentry.init`. To make it easier to be used in e.g. Desktop environments, we now additionally added it as an option on SentryOptions that can also be set via `sentry.properties`. - If both the param on `Sentry.init` and the option are set, the option will win. By default the option is set to `null` meaning whatever is passed to `Sentry.init` takes effect. - Lazy uuid generation for SentryId and SpanId ([#3770](https://github.com/getsentry/sentry-java/pull/3770)) -- Android 15: Add support for 16KB page sizes +- Android 15: Add support for 16KB page sizes ([#3851](https://github.com/getsentry/sentry-java/pull/3851)) - See https://developer.android.com/guide/practices/page-sizes for more details ### Fixes @@ -22,7 +22,7 @@ ### Dependencies -- Bump Native SDK from v0.7.5 to v0.7.8 +- Bump Native SDK from v0.7.5 to v0.7.8 ([#3851](https://github.com/getsentry/sentry-java/pull/3851)) - [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#078) - [diff](https://github.com/getsentry/sentry-native/compare/0.7.5...0.7.8)