diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index f7a24bd..6646445 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -8,4 +8,8 @@ target_link_libraries(native-sample ${LOG_LIB}) # include paths generated by androidNativeBundle include (${ANDROID_GRADLE_NATIVE_BUNDLE_PLUGIN_MK}) # change native-sample to your native lib's name -target_link_libraries(native-sample ${ANDROID_GRADLE_NATIVE_MODULES}) \ No newline at end of file +target_link_libraries(native-sample ${ANDROID_GRADLE_NATIVE_MODULES}) + +# 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") \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 407b223..453a3b5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -16,7 +16,7 @@ plugins { //} android { - compileSdkVersion 34 + compileSdkVersion 36 namespace "com.example.vu.android" compileOptions { @@ -27,7 +27,7 @@ android { defaultConfig { applicationId "com.example.vu.android" minSdkVersion 21 - targetSdkVersion 34 + targetSdkVersion 36 versionCode System.getenv('VERSION_CODE')?.toInteger() ?: 241226 versionName System.getenv('VERSION_NAME') ?: "24.12.26" diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 45aa990..883c8e8 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -19,3 +19,19 @@ # If you keep the line number information, uncomment this to # hide the original source file name. #-renamesourcefileattribute SourceFile + +# Gson uses generic type information stored in a class file when working with +# fields. Proguard removes such information by default, keep it. +-keepattributes Signature + +# This is also needed for R8 in compat mode since multiple +# optimizations will remove the generic signature such as class +# merging and argument removal. See: +# https://r8.googlesource.com/r8/+/refs/heads/main/compatibility-faq.md#troubleshooting-gson-gson +-keep class com.google.gson.reflect.TypeToken { *; } +-keep class * extends com.google.gson.reflect.TypeToken + +# Optional. For using GSON @Expose annotation +-keepattributes AnnotationDefault,RuntimeVisibleAnnotations +-keep class com.google.gson.reflect.TypeToken { ; } +-keepclassmembers class **$TypeAdapterFactory { ; } diff --git a/build.gradle b/build.gradle index b4b4116..274f6fc 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:8.6.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath "io.github.howardpang:androidNativeBundle:1.1.4" + classpath "io.github.howardpang:androidNativeBundle:1.1.5" classpath 'com.fullstory:gradle-plugin-local:1.12.1' classpath 'com.mxalbert.gradle:jacoco-android:0.2.1' }