diff --git a/build.gradle b/build.gradle index 79a535af..72f5e4e8 100644 --- a/build.gradle +++ b/build.gradle @@ -9,8 +9,8 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.5.3' - classpath 'net.evendanan.autoversion:gradle-plugin:0.2.2' + classpath 'com.android.tools.build:gradle:4.2.2' + // classpath 'net.evendanan.autoversion:gradle-plugin:0.2.2' classpath 'com.github.triplet.gradle:play-publisher:2.4.2' //not compatible with gradle 6+ diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 2d7f2693..4e569709 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -6,8 +6,8 @@ repositories { } dependencies { - compile gradleApi() - compile 'org.jsoup:jsoup:1.9.1' + implementation gradleApi() + implementation 'org.jsoup:jsoup:1.9.1' } gradlePlugin { diff --git a/gradle.properties b/gradle.properties index 43accedb..1ba2c342 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,3 +21,8 @@ org.gradle.configureondemand=false org.gradle.caching=true android.enableUnitTestBinaryResources=false android.testConfig.useRelativePath=true + +# To run gradlew with assembleRelease. +# As per https://stackoverflow.com/a/60507339 +android.useAndroidX=true +android.enableJetifier=true \ No newline at end of file diff --git a/gradle/all_android.gradle b/gradle/all_android.gradle index e3956be9..6bd4c9af 100644 --- a/gradle/all_android.gradle +++ b/gradle/all_android.gradle @@ -1,11 +1,11 @@ android { - compileSdkVersion 28 - buildToolsVersion '29.0.2' + compileSdkVersion 34 + buildToolsVersion '34.0.0' defaultConfig { minSdkVersion 9 - targetSdkVersion 33 + targetSdkVersion 34 } lintOptions { diff --git a/gradle/pack_apk.gradle b/gradle/pack_apk.gradle index 18ea3d81..ff368486 100644 --- a/gradle/pack_apk.gradle +++ b/gradle/pack_apk.gradle @@ -33,7 +33,7 @@ android { applicationVariants.configureEach { variant -> variant.outputs.all { - outputFileName = "add-on-${project.path.replace(':', '-')}-${rootProject.autoVersioning.versionData.versionCode}.apk" + outputFileName = "add-on-${project.path.replace(':', '-')}-${'4.4.1'}.apk" } variant.assembleProvider.configure { assemble -> assemble.doLast { diff --git a/gradle/versioning_add_on.gradle b/gradle/versioning_add_on.gradle index a4c1afd6..017bc9a4 100644 --- a/gradle/versioning_add_on.gradle +++ b/gradle/versioning_add_on.gradle @@ -4,6 +4,6 @@ if (path == rootProject.path) { } android.defaultConfig { - versionCode 3 - versionName rootProject.autoVersioning.versionData.versionName + versionCode 4 + versionName '4.4.1' } diff --git a/gradle/versioning_root.gradle b/gradle/versioning_root.gradle index 56b4f1fc..97bf9817 100644 --- a/gradle/versioning_root.gradle +++ b/gradle/versioning_root.gradle @@ -3,17 +3,17 @@ if (path != rootProject.path) { throw new IllegalStateException("versioning script should only be applied on the root project") } -apply plugin: 'net.evendanan.autoversion.simple' +/* apply plugin: 'net.evendanan.autoversion.simple' autoVersioning { enabled = rootProject.hasProperty("withAutoVersioning") buildCounterEnvKey = "CIRCLE_BUILD_NUM" major = 4 - minor = 3 + minor = 4 buildCounterOffset = 1000 patchOffset = -1600 -} +} */ rootProject.afterEvaluate { - file('.generated_pack_version').write(autoVersioning.versionData.versionName) + file('.generated_pack_version').write('4.4.1') } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1b16c34a..fbce071a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/languages/andalusia/README.md b/languages/andalusia/README.md index 8933bb5d..a174a0a6 100644 --- a/languages/andalusia/README.md +++ b/languages/andalusia/README.md @@ -5,7 +5,7 @@ A keyboard for mobile and tablet to express yourself in Andalusian. The QÇERTY https://andaluh.es/es/teclado-andaluz/ -Building +Making a Dictionary -------- The `/scripts/dictionary_estoand.py` script automatically transcribe the spanish anysoftkeyboard dictionary `aosp.combined` file into andalûh. Let this script to generate the dictionaries and avoid the `makeDictionary` gradle step when building the apk. @@ -54,16 +54,43 @@ Andaluh-AnySoftKeyBoard/languages/andalusia/pack/src/main/res$ tree 8 directories, 26 files ``` +Dependencies for building: +------- + +Requires Java 11 (Oracle JDK 11 or OpenJDK 11) +``` +$ sudo apt install openjdk-11-jdk +$ sudo update-alternatives --config javac # Select openjdk-11 +``` + Testing ------- A debug apk can be generated and tested on a phone with: ``` -./gradlew :languages:andalusia:apk:installDebug -x makeDictionary +$ ./gradlew :languages:andalusia:apk:installDebug -x makeDictionary ``` +It will be available add `./add_ons_apks/debug` + Generating signed apk --------------------- -ToDo \ No newline at end of file +A release apk can be generated with: + +``` +$ ./gradlew :languages:andalusia:apk:assembleRelease -x makeDictionary +``` + +It will be available add `./add_ons_apks/release`. Then sign prior to upload to Google Play with: + +``` +$ apksigner sign --ks YOUR_KEY_STORE.jks --ks-key-alias YOUR_KEY_ALIAS ./add_ons_apks/release/YOUR_ADD_ON_APK.apk +``` + +Note: APK versioning made not retro-compatible with ASK addons anymore. Set version in file gradle/pack_apk.gradle line 36: + +``` + outputFileName = "add-on-${project.path.replace(':', '-')}-${'4.4.1'}.apk" +``` \ No newline at end of file diff --git a/scripts/ci_deploy.sh b/scripts/ci_deploy.sh index c0b3e76f..25c8a232 100755 --- a/scripts/ci_deploy.sh +++ b/scripts/ci_deploy.sh @@ -25,6 +25,6 @@ wget ${PUBLISH_CERT_FILE_URL} -q -O /tmp/apk_upload_key.p12 echo "**** Uploading to Play Store..." ./gradlew ${EXTRA_GRADLE_ARGS} clean -./gradlew ${EXTRA_GRADLE_ARGS} --no-build-cache -PwithAutoVersioning assembleRelease publishRelease --continue +./gradlew ${EXTRA_GRADLE_ARGS} --no-build-cache assembleRelease publishRelease --continue diff --git a/scripts/ci_deploy_maven.sh b/scripts/ci_deploy_maven.sh index 09d8c87d..4f39a778 100755 --- a/scripts/ci_deploy_maven.sh +++ b/scripts/ci_deploy_maven.sh @@ -2,4 +2,4 @@ set -e ./gradlew ${EXTRA_GRADLE_ARGS} clean -./gradlew ${EXTRA_GRADLE_ARGS} --no-build-cache bintrayUpload -PwithAutoVersioning -PdryRun=false +./gradlew ${EXTRA_GRADLE_ARGS} --no-build-cache bintrayUpload -PdryRun=false