commit ce7901e46d7ef8e4566e9330a1f930c10ae0122d parent 002a4f1f3cc275edf48db2dd867c5fbeec2c0cae Author: julianharty <julianharty@gmail.com> Date: Mon, 12 Aug 2024 09:02:47 +0100 Removed clash of library name for local c++ code and various config changes to improve debugging. Diffstat:
4 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/android_studio/app/build.gradle.kts b/android_studio/app/build.gradle.kts @@ -25,6 +25,9 @@ android { isMinifyEnabled = false proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") } + getByName("debug") { + isJniDebuggable = true + } } compileOptions { sourceCompatibility = JavaVersion.VERSION_1_8 diff --git a/android_studio/app/src/main/AndroidManifest.xml b/android_studio/app/src/main/AndroidManifest.xml @@ -14,6 +14,7 @@ android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/Theme.GNUnet" + android:allowNativeHeapPointerTagging="false" tools:targetApi="31"> <activity android:name=".MainActivity" diff --git a/android_studio/app/src/main/cpp/CMakeLists.txt b/android_studio/app/src/main/cpp/CMakeLists.txt @@ -76,12 +76,12 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") # System.loadLibrary() and pass the name of the library defined here; # for GameActivity/NativeActivity derived applications, the same library name must be # used in the AndroidManifest.xml file. -add_library(gnunet SHARED +add_library(gnunetti SHARED # List C/C++ source files with relative paths to this CMakeLists.txt. native-lib.cpp ) -target_include_directories(gnunet PRIVATE +target_include_directories(gnunetti PRIVATE ${distribution_DIR}/libidn/lib/${ANDROID_ABI}/include ${distribution_DIR}/sqlite/lib/${ANDROID_ABI}/include ${distribution_DIR}/libsodium/lib/${ANDROID_ABI}/include @@ -101,7 +101,7 @@ target_include_directories(gnunet PRIVATE # Specifies libraries CMake should link to your target library. You # can link libraries from various origins, such as libraries defined in this # build script, prebuilt third-party libraries, or Android system libraries. -target_link_libraries(gnunet +target_link_libraries(gnunetti # List libraries link to the target library android libgpg-error @@ -121,4 +121,4 @@ target_link_libraries(gnunet sqliteX log) -target_link_options(${CMAKE_PROJECT_NAME} PRIVATE "-Wl,-z,max-page-size=16384") -\ No newline at end of file +target_link_options(gnunetti PRIVATE "-Wl,-z,max-page-size=16384") +\ No newline at end of file diff --git a/android_studio/app/src/main/java/org/gnu/gnunet/MainActivity.kt b/android_studio/app/src/main/java/org/gnu/gnunet/MainActivity.kt @@ -29,7 +29,7 @@ class MainActivity : AppCompatActivity() { // Used to load the 'gnunet' library on application startup. init { System.loadLibrary("sqliteX"); - System.loadLibrary("gnunet") + System.loadLibrary("gnunetti") } } } \ No newline at end of file