Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
[android] Update Android SDK to 34 and Gradle to 8.7.1
Dmitry Kazakov3b9f0b92d9b4
diff --git a/CMakeLists.txt b/CMakeLists.txtindex d1724de965..fb0fe2c51d 100644--- a/CMakeLists.txt+++ b/CMakeLists.txt@@ -1337,7 +1337,7 @@ feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)if (ANDROID)# ECM passes this to Qt, which was already capable of detecting it..- set (ANDROID_SDK_COMPILE_API "33")+ set (ANDROID_SDK_COMPILE_API "34")# To assist stdcpp-path in deployment.json fileset(ANDROID_SYSROOT_PREFIX "${ANDROID_TOOLCHAIN_ROOT}/sysroot/usr" CACHE STRING "" FORCE)diff --git a/packaging/android/apk/build.gradle b/packaging/android/apk/build.gradleindex 115e064569..cc56d634d7 100644--- a/packaging/android/apk/build.gradle+++ b/packaging/android/apk/build.gradle@@ -5,7 +5,7 @@ buildscript {}dependencies {- classpath 'com.android.tools.build:gradle:7.4.2'+ classpath 'com.android.tools.build:gradle:8.7.1'}}@@ -37,7 +37,7 @@ ext {qtResPath = System.getenv('KRITA_BUILD_APPBUNDLE') ? 'extra-bundle-deps/android/java' : ""}-task configure() {+tasks.register('configure') {doLast {if (abi == null && !project.hasProperty("abi")) {logger.error('ANDROID_ABI not specified using the default one instead: arm64-v8a')@@ -51,7 +51,8 @@ task configure() {}}-task writeConfig(type: WriteProperties) {+tasks.register('writeConfig', WriteProperties) {+ dependsOn('configure')outputFile = file("gradle.properties")def gradleProperties = new Properties()outputFile.withInputStream { gradleProperties.load(it) }@@ -63,51 +64,58 @@ task writeConfig(type: WriteProperties) {// copy libs(plugins) which start with krita*.so and rename// them to start with `lib_`-task copyLibs(type: Copy) {+tasks.register('copyLibs', Copy) {+ dependsOn('configure')from "$installPrefix/lib"into "libs/$abi"- rename ('^krita(.*).so$', 'lib_krita$1.so')+ rename('^krita(.*).so$', 'lib_krita$1.so')}// copy MLT plugins and rename// them to start with `lib_`-task copyMltPlugins(type: Copy) {+tasks.register('copyMltPlugins', Copy) {+ dependsOn('configure', 'copyLibs')from "$installPrefix/lib/mlt-7"into "libs/$abi"- rename ('^libmlt(.*).so$', 'lib_mltplugin_$1.so')+ rename('^libmlt(.*).so$', 'lib_mltplugin_$1.so')}-task copyFonts(type: Copy) {- from "$installPrefix/etc"- into 'assets/etc/'- include '**'-}--task copySDLJar(type: Copy) {+tasks.register('copySDLJar', Copy) {+ dependsOn('configure')from "$installPrefix/jar"into 'libs/'include 'SDL2Android.jar'}+tasks.register('copyFonts', Copy) {+ dependsOn('configure')+ from "$installPrefix/etc"+ into 'assets/etc/'+ include '**'+}+/** androiddeployqt doesn't fully copy the directories. Hidden directories* to be specific. That's why we copy manually and then delete the partial* one it creates*/-task copyAssets(type: Copy) {+tasks.register('copyAssets', Copy) {+ dependsOn('configure')from "$installPrefix/share/"into 'assets/'include '**'}-task copyLocaleFiles(type: Copy) {+tasks.register('copyLocaleFiles', Copy) {+ dependsOn('configure', 'copyAssets')from "$installPrefix/share/locale"from "$installPrefix/translations"into 'assets/locale/'include '**'}-task copyExtraMltFiles(type: Copy) {+tasks.register('copyExtraMltFiles', Copy) {+ dependsOn('configure', 'copyAssets')from "$installPrefix/share/mlt-7"into 'assets/mlt-7'include '**'@@ -117,7 +125,8 @@ task copyExtraMltFiles(type: Copy) {* Remove "share" folder in assets. It is copied both manually and by* androiddeployqt(reason in copyAssets task).*/-task removeDuplicateAssets(type: Delete) {+tasks.register('removeDuplicateAssets', Delete) {+ dependsOn('configure', 'copyFonts', 'copyAssets', 'copyLocaleFiles', 'copyExtraMltFiles')delete "assets/share"}@@ -126,7 +135,7 @@ def isPackagingAPK() {}android {- compileSdkVersion androidCompileSdkVersion.toInteger()+ namespace = "org.krita"ndkPath ndkpath@@ -170,15 +179,6 @@ android {}}- // This is needed because, gradle by default ignores hidden assets.- aaptOptions {- ignoreAssetsPattern "!.foajasoie"- }-- lintOptions {- abortOnError false- }-project.ext.constant = 5def versionMajor = 5@@ -193,6 +193,9 @@ android {def versionRelease = 0defaultConfig {+ compileSdk androidCompileSdkVersion.toInteger()+ ndkVersion "27.2.12479018"+targetSdkVersion 34minSdkVersion 23versionCode project.ext.constant * 1000000 + versionMajor * 10000 + versionMinor * 100 + versionRelease@@ -200,8 +203,21 @@ android {def unstableSuffix = System.getenv('KRITA_UNSTABLE_PACKAGE_SUFFIX')archivesBaseName = System.getenv('KRITA_BUILD_APPBUNDLE') ? "krita-$versionName$unstableSuffix" : "krita-$abi-$versionName$unstableSuffix"}+ buildFeatures {+ renderScript true+ aidl true+ }++ // This is needed because, gradle by default ignores hidden assets.+ androidResources {+ ignoreAssetsPattern '!.foajasoie'+ }++ lint {+ abortOnError false+ }+- preBuild.dependsOn(configure)configure.onlyIf { isPackagingAPK() }configure.finalizedBy(writeConfig)configure.finalizedBy(copyLibs)@@ -212,10 +228,13 @@ android {configure.finalizedBy(copySDLJar)configure.finalizedBy(copyExtraMltFiles)configure.finalizedBy(removeDuplicateAssets)++ preBuild.dependsOn(configure)+ preBuild.dependsOn(copyLibs, copyMltPlugins, copyFonts, copyAssets, copyLocaleFiles, copySDLJar, copyExtraMltFiles, removeDuplicateAssets)}dependencies {- implementation 'com.android.billingclient:billing:6.0.1'- implementation 'androidx.annotation:annotation:1.4.0'+ implementation 'com.android.billingclient:billing:7.1.1'+ implementation 'androidx.annotation:annotation:1.9.0'implementation files("libs/SDL2Android.jar")}diff --git a/packaging/android/apk/gradle/wrapper/gradle-wrapper.properties b/packaging/android/apk/gradle/wrapper/gradle-wrapper.propertiesindex 3994438e22..1e2fbf0d45 100644--- a/packaging/android/apk/gradle/wrapper/gradle-wrapper.properties+++ b/packaging/android/apk/gradle/wrapper/gradle-wrapper.properties@@ -1,5 +1,5 @@distributionBase=GRADLE_USER_HOMEdistributionPath=wrapper/dists-distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip+distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zipzipStoreBase=GRADLE_USER_HOMEzipStorePath=wrapper/dists