Skip to content

Commit

Permalink
make stripDebugDebugSymbols work
Browse files Browse the repository at this point in the history
add debug symbols to aab
  • Loading branch information
PeterPetrik committed Sep 14, 2023
1 parent 6c26ba4 commit 43c6f7f
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ app/android/AndroidManifest.xml
*.gpkg-shm
Input_keystore.keystore
CMakeLists.txt.user
app/android/build.gradle
app/android/.gradle/*
app/android/.gradle
19 changes: 14 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ if (DEFINED ENV{INPUT_SDK_ANDROID_BASE})
# Target/Minimum API levels for Android, used as Input target properties
set(INPUT_ANDROID_TARGET_SDK_VERSION "33")
set(INPUT_ANDROID_MIN_SDK_VERSION "${ANDROIDAPI}")
set(INPUT_ANDROID_NDK_PATH "$ENV{ANDROID_NDK_ROOT}")
if (NOT INPUT_ANDROID_NDK_PATH)
message(FATAL_ERROR "Set required environment variable ANDROID_NDK_ROOT.")
endif ()
endif ()

if (IOS)
Expand Down Expand Up @@ -173,7 +177,16 @@ message(STATUS "Mergin Maps Input ${version_desc} - ${platform_desc}")

if (ANDROID)
set(INPUT_SDK_PATH_ANDROID_ABI_armeabi-v7a ${INPUT_SDK_PATH}/arm-android)

if (NOT EXISTS ${INPUT_SDK_PATH_ANDROID_ABI_armeabi-v7a})
message(WARNING "INPUT_SDK_PATH arm-android directory does not exist!")
endif ()

set(INPUT_SDK_PATH_ANDROID_ABI_arm64-v8a ${INPUT_SDK_PATH}/arm64-android)
if (NOT EXISTS ${INPUT_SDK_PATH_ANDROID_ABI_arm64-v8a})
message(WARNING "INPUT_SDK_PATH arm64-android directory does not exist!")
endif ()

set(INPUT_SDK_PATH_MULTI ${INPUT_SDK_PATH_ANDROID_ABI_${ANDROID_ABI}})
# allow libraries outside of SDK/NDK directory
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
Expand Down Expand Up @@ -215,7 +228,7 @@ if (NOT IOS)
)
endif ()

if (NOT LINUX)
if (NOT LNX)
find_package(Charset REQUIRED)
find_package(Iconv REQUIRED)
endif ()
Expand Down Expand Up @@ -376,10 +389,6 @@ if (IOS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-shorten-64-to-32")
endif ()

if (ANDROID)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -g0")
endif ()

# ########################################################################################
# SUBDIRECTORIES
# ########################################################################################
Expand Down
11 changes: 10 additions & 1 deletion app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,15 @@ if (ANDROID)
${INPUT_CMAKE_TEMPLATES_PATH}/AndroidManifest.xml.in
${CMAKE_CURRENT_SOURCE_DIR}/android/AndroidManifest.xml @ONLY
)

if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/android/build.gradle)
file(REMOVE ${CMAKE_CURRENT_SOURCE_DIR}/android/build.gradle)
endif ()
configure_file(
${INPUT_CMAKE_TEMPLATES_PATH}/build.gradle.in
${CMAKE_CURRENT_SOURCE_DIR}/android/build.gradle @ONLY
)

set_target_properties(
Input
PROPERTIES QT_ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/android
Expand Down Expand Up @@ -471,7 +480,7 @@ target_link_libraries(
Spatialite::Spatialite
)

if (NOT LINUX)
if (NOT LNX)
target_link_libraries(Input PUBLIC Charset::Charset Iconv::Iconv)
endif ()

Expand Down
12 changes: 10 additions & 2 deletions app/android/build.gradle → cmake_templates/build.gradle.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
/* keep in sync with /opt/Qt/<ver>/android//src/android/templates/build.gradle */

buildscript {
ext {
buildToolsVersion = androidBuildToolsVersion
compileSdkVersion = androidCompileSdkVersion.toInteger()
targetSdkVersion = androidCompileSdkVersion.toInteger()
ndkVersion = androidNdkVersion
}

repositories {
google()
mavenCentral()
Expand Down Expand Up @@ -44,7 +51,8 @@ android {
compileSdkVersion androidCompileSdkVersion.toInteger()
buildToolsVersion androidBuildToolsVersion
ndkVersion androidNdkVersion

ndkPath '@INPUT_ANDROID_NDK_PATH@'

packagingOptions.jniLibs.useLegacyPackaging true

sourceSets {
Expand Down Expand Up @@ -83,6 +91,6 @@ android {
minSdkVersion qtMinSdkVersion
targetSdkVersion qtTargetSdkVersion
ndk.abiFilters = qtTargetAbiList.split(",")
ndk.debugSymbolLevel "FULL"
ndk.debugSymbolLevel "SYMBOL_TABLE"
}
}

1 comment on commit 43c6f7f

@inputapp-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS - version 23.09.456611 just submitted!

Please sign in to comment.