diff --git a/CMakeLists.txt b/CMakeLists.txt
index ff4aabf30..93dd9ed7d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -736,9 +736,7 @@ if(ANDROID)
if(ANDROID_STL MATCHES "_shared$")
set(stlLibName "${CMAKE_SHARED_LIBRARY_PREFIX}${ANDROID_STL}${CMAKE_SHARED_LIBRARY_SUFFIX}")
- install(FILES "${CMAKE_SYSROOT}/usr/lib/${ANDROID_SYSROOT_LIB_SUBDIR}/${stlLibName}"
- DESTINATION ${LIB_DIR}
- )
+ vcmi_install_libs_symlink("${CMAKE_SYSROOT}/usr/lib/${ANDROID_SYSROOT_LIB_SUBDIR}/${stlLibName}")
endif()
else()
install(DIRECTORY config DESTINATION ${DATA_DIR})
diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml
index fc855243e..729617277 100644
--- a/android/AndroidManifest.xml
+++ b/android/AndroidManifest.xml
@@ -31,7 +31,9 @@
android:label="${applicationLabel}"
android:testOnly="false"
android:supportsRtl="true"
- android:usesCleartextTraffic="false">
+ android:usesCleartextTraffic="false"
+ android:theme="@style/AppTheme"
+ >
-
+
diff --git a/android/build.gradle b/android/build.gradle
index 2f7e867bd..911e769b9 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -3,9 +3,13 @@ buildscript {
repositories {
google()
mavenCentral()
+ maven {
+ url 'https://www.jitpack.io'
+ }
}
dependencies {
classpath 'com.android.tools.build:gradle:8.11.0'
+ classpath 'com.github.zellius:android-shortcut-gradle-plugin:0.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
diff --git a/android/vcmi-app/src/main/res/xml/shortcuts.xml b/android/shortcuts.xml
similarity index 91%
rename from android/vcmi-app/src/main/res/xml/shortcuts.xml
rename to android/shortcuts.xml
index fc0bc76f2..cb6d9123f 100644
--- a/android/vcmi-app/src/main/res/xml/shortcuts.xml
+++ b/android/shortcuts.xml
@@ -7,7 +7,6 @@
android:shortcutLongLabel="@string/shortcut_play">
diff --git a/android/vcmi-app/build.gradle b/android/vcmi-app/build.gradle
index 31de2b2a5..7b922b042 100644
--- a/android/vcmi-app/build.gradle
+++ b/android/vcmi-app/build.gradle
@@ -1,4 +1,5 @@
apply plugin: 'com.android.application'
+apply plugin: 'com.github.zellius.shortcut-helper'
android {
/*******************************************************
@@ -36,8 +37,6 @@ android {
versionCode 1700
versionName "1.7.0"
-
- setProperty("archivesBaseName", "vcmi")
}
sourceSets {
@@ -102,6 +101,9 @@ android {
}
}
+base.archivesName = "vcmi"
+shortcutHelper.filePath = "../shortcuts.xml"
+
def SigningPropertiesPath(final basePath, final signingConfigKey) {
return file("${basePath}/${signingConfigKey}.properties")
}
@@ -147,6 +149,9 @@ def LoadSigningConfig(final signingConfigKey) {
dependencies {
implementation fileTree(dir: '../libs', include: ['*.jar', '*.aar'])
- implementation 'androidx.annotation:annotation:1.7.1'
- implementation 'androidx.documentfile:documentfile:1.0.1'
+ implementation('androidx.annotation:annotation:1.9.1')
+
+ // later versions require API level 21
+ implementation('androidx.appcompat:appcompat:1.6.1')
+ implementation('androidx.documentfile:documentfile:1.0.1')
}
diff --git a/android/vcmi-app/src/main/res/values-v21/styles.xml b/android/vcmi-app/src/main/res/values-v21/styles.xml
new file mode 100644
index 000000000..5efa12395
--- /dev/null
+++ b/android/vcmi-app/src/main/res/values-v21/styles.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/android/vcmi-app/src/main/res/values/styles.xml b/android/vcmi-app/src/main/res/values/styles.xml
new file mode 100644
index 000000000..87290b416
--- /dev/null
+++ b/android/vcmi-app/src/main/res/values/styles.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/android/vcmi-app/src/main/res/xml/shortcutsdaily.xml b/android/vcmi-app/src/main/res/xml/shortcutsdaily.xml
deleted file mode 100644
index 16adaf20a..000000000
--- a/android/vcmi-app/src/main/res/xml/shortcutsdaily.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
diff --git a/android/vcmi-app/src/main/res/xml/shortcutsdebug.xml b/android/vcmi-app/src/main/res/xml/shortcutsdebug.xml
deleted file mode 100644
index a8420c54d..000000000
--- a/android/vcmi-app/src/main/res/xml/shortcutsdebug.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
diff --git a/cmake_modules/VCMIUtils.cmake b/cmake_modules/VCMIUtils.cmake
index bf5e1e590..4f4fedf29 100644
--- a/cmake_modules/VCMIUtils.cmake
+++ b/cmake_modules/VCMIUtils.cmake
@@ -118,6 +118,18 @@ function(vcmi_print_git_commit_hash)
endfunction()
+# install(FILES) of shared libs but using symlink instead of copying
+function(vcmi_install_libs_symlink libs)
+ install(CODE "
+ foreach(lib ${libs})
+ cmake_path(GET lib FILENAME filename)
+ file(CREATE_LINK \${lib} \"\${CMAKE_INSTALL_PREFIX}/${LIB_DIR}/\${filename}\"
+ COPY_ON_ERROR SYMBOLIC
+ )
+ endforeach()
+ ")
+endfunction()
+
# install dependencies from Conan, CONAN_RUNTIME_LIBS_FILE is set in conanfile.py
function(vcmi_install_conan_deps)
if(NOT USING_CONAN)
@@ -125,7 +137,11 @@ function(vcmi_install_conan_deps)
endif()
file(STRINGS "${CONAN_RUNTIME_LIBS_FILE}" runtimeLibs)
- install(FILES ${runtimeLibs} DESTINATION ${LIB_DIR})
+ if(ANDROID)
+ vcmi_install_libs_symlink("${runtimeLibs}")
+ else()
+ install(FILES ${runtimeLibs} DESTINATION ${LIB_DIR})
+ endif()
endfunction()
function(vcmi_deploy_qt deployQtToolName deployQtOptions)