Skip to content

Commit

Permalink
Upgraded to Android API 34, required by Google Play. Removed deprecat…
Browse files Browse the repository at this point in the history
…ed autoVersioning dependency.
  • Loading branch information
fontanon committed Aug 20, 2024
1 parent 58c5d0a commit 543df10
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 20 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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+
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 5 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions gradle/all_android.gradle
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion gradle/pack_apk.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions gradle/versioning_add_on.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ if (path == rootProject.path) {
}

android.defaultConfig {
versionCode 3
versionName rootProject.autoVersioning.versionData.versionName
versionCode 4
versionName '4.4.1'
}
8 changes: 4 additions & 4 deletions gradle/versioning_root.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
33 changes: 30 additions & 3 deletions languages/andalusia/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
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"
```
2 changes: 1 addition & 1 deletion scripts/ci_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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


2 changes: 1 addition & 1 deletion scripts/ci_deploy_maven.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 543df10

Please sign in to comment.