aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Hanley <felix@userspace.com.au>2019-01-21 13:29:29 +0000
committerFelix Hanley <felix@userspace.com.au>2019-01-21 13:29:29 +0000
commitad09d14bf75ff15e2410508a9005179ad10c5935 (patch)
tree47b190a1387da96a2328e4ac0d55a3e2ed20787b
parentee43ebde682747b1b3beae527731754e8d9c5c22 (diff)
parent2fbe74b2098d475a741a4b662f6376a5a2f0f9ff (diff)
downloadask-language-pack-Thai.tar.gz
ask-language-pack-Thai.tar.bz2
Merge branch 'master' into ThaiThai
-rw-r--r--README.md31
-rw-r--r--build.gradle186
-rw-r--r--circle.yml3
-rw-r--r--gradle.properties4
-rw-r--r--gradle/language_pack.gradle26
-rw-r--r--gradle/language_pack_apk.gradle88
-rw-r--r--gradle/language_pack_lib.gradle18
-rw-r--r--languages/afrikaans_oss/apk/build.gradle4
-rw-r--r--languages/afrikaans_oss/pack/build.gradle6
-rw-r--r--languages/armenian2/apk/build.gradle4
-rw-r--r--languages/armenian2/pack/build.gradle6
-rw-r--r--languages/base/build.gradle18
-rw-r--r--languages/brazilian/apk/build.gradle4
-rw-r--r--languages/brazilian/pack/build.gradle6
-rw-r--r--languages/english/apk/build.gradle4
-rw-r--r--languages/english/pack/build.gradle6
-rwxr-xr-xlanguages/french/apk/build.gradle4
-rwxr-xr-xlanguages/french/pack/build.gradle6
-rw-r--r--languages/greek/apk/build.gradle4
-rw-r--r--languages/greek/pack/build.gradle6
-rw-r--r--languages/hebrew/apk/build.gradle4
-rw-r--r--languages/hebrew/pack/build.gradle5
-rw-r--r--languages/indonesian/apk/build.gradle4
-rw-r--r--languages/indonesian/pack/build.gradle6
-rw-r--r--languages/italian/apk/build.gradle4
-rw-r--r--languages/italian/pack/build.gradle6
-rw-r--r--languages/romanian/apk/build.gradle4
-rw-r--r--languages/romanian/pack/build.gradle6
-rw-r--r--languages/russian2/apk/build.gradle4
-rw-r--r--languages/russian2/pack/build.gradle4
-rw-r--r--languages/sardinian/apk/build.gradle4
-rw-r--r--languages/sardinian/pack/build.gradle4
-rw-r--r--languages/spain/apk/build.gradle4
-rw-r--r--languages/spain/pack/build.gradle6
-rw-r--r--languages/tamazight/apk/build.gradle4
-rw-r--r--languages/tamazight/pack/build.gradle6
-rwxr-xr-xscripts/ci_deploy.sh3
-rwxr-xr-xscripts/ci_deploy_maven.sh3
38 files changed, 252 insertions, 263 deletions
diff --git a/README.md b/README.md
index 02f0859..d619144 100644
--- a/README.md
+++ b/README.md
@@ -68,22 +68,21 @@ You can either publish by yourself, under your developer account and keep comple
TO DO!!!
## Languages in this repo
-We have 14 language packs in this repo:
-
-* <img src='afrikaans_oss/apk/flag/flag.png' height='16'>&nbsp;Afrikaans_oss: [Source](https://github.com/AnySoftKeyboard/LanguagePack/tree/master/languages/afrikaans_oss) • [Play Store](https://play.google.com/store/apps/details?id=com.anysoftkeyboard.languagepack.afrikaans_oss)
-* <img src='armenian2/apk/flag/flag.png' height='16'>&nbsp;Armenian2: [Source](https://github.com/AnySoftKeyboard/LanguagePack/tree/master/languages/armenian2)
-* <img src='brazilian/apk/flag/flag.png' height='16'>&nbsp;Brazilian: [Source](https://github.com/AnySoftKeyboard/LanguagePack/tree/master/languages/brazilian) • [Play Store](https://play.google.com/store/apps/details?id=com.anysoftkeyboard.languagepack.brazilian)
-* <img src='english/apk/flag/flag.png' height='16'>&nbsp;English: [Source](https://github.com/AnySoftKeyboard/LanguagePack/tree/master/languages/english)
-* <img src='french/apk/flag/flag.svg?sanitize=1' height='16'>&nbsp;French: [Source](https://github.com/AnySoftKeyboard/LanguagePack/tree/master/languages/french) • [Play Store](https://play.google.com/store/apps/details?id=com.anysoftkeyboard.languagepack.french)
-* <img src='greek/apk/flag/flag.png' height='16'>&nbsp;Greek: [Source](https://github.com/AnySoftKeyboard/LanguagePack/tree/master/languages/greek) • [Play Store](https://play.google.com/store/apps/details?id=com.anysoftkeyboard.languagepack.greek)
-* <img src='hebrew/apk/flag/flag.png' height='16'>&nbsp;Hebrew: [Source](https://github.com/AnySoftKeyboard/LanguagePack/tree/master/languages/hebrew) • [Play Store](https://play.google.com/store/apps/details?id=com.anysoftkeyboard.languagepack.hebrew)
-* <img src='indonesian/apk/flag/flag.png' height='16'>&nbsp;Indonesian: [Source](https://github.com/AnySoftKeyboard/LanguagePack/tree/master/languages/indonesian) • [Play Store](https://play.google.com/store/apps/details?id=com.anysoftkeyboard.languagepack.indonesian)
-* <img src='italian/apk/flag/flag.png' height='16'>&nbsp;Italian: [Source](https://github.com/AnySoftKeyboard/LanguagePack/tree/master/languages/italian) • [Play Store](https://play.google.com/store/apps/details?id=com.anysoftkeyboard.languagepack.italian)
-* <img src='romanian/apk/flag/flag.png' height='16'>&nbsp;Romanian: [Source](https://github.com/AnySoftKeyboard/LanguagePack/tree/master/languages/romanian) • [Play Store](https://play.google.com/store/apps/details?id=com.anysoftkeyboard.languagepack.romanian)
-* <img src='russian2/apk/flag/flag.png' height='16'>&nbsp;Russian2: [Source](https://github.com/AnySoftKeyboard/LanguagePack/tree/master/languages/russian2) • [Play Store](https://play.google.com/store/apps/details?id=com.anysoftkeyboard.languagepack.russian2)
-* <img src='sardinian/apk/flag/flag.png' height='16'>&nbsp;Sardinian: [Source](https://github.com/AnySoftKeyboard/LanguagePack/tree/master/languages/sardinian)
-* <img src='spain/apk/flag/flag.png' height='16'>&nbsp;Spain: [Source](https://github.com/AnySoftKeyboard/LanguagePack/tree/master/languages/spain) • [Play Store](https://play.google.com/store/apps/details?id=com.anysoftkeyboard.languagepack.spain)
-* <img src='tamazight/apk/flag/flag.png' height='16'>&nbsp;Tamazight: [Source](https://github.com/AnySoftKeyboard/LanguagePack/tree/master/languages/tamazight) • [Play Store](https://play.google.com/store/apps/details?id=com.anysoftkeyboard.languagepack.tamazight)
+
+1. <img src='languages/afrikaans_oss/apk/flag/flag.png' height='16'>&nbsp;Afrikaans_oss: [Source](languages/afrikaans_oss) • [Play Store](https://play.google.com/store/apps/details?id=com.anysoftkeyboard.languagepack.afrikaans_oss)
+1. <img src='languages/armenian2/apk/flag/flag.png' height='16'>&nbsp;Armenian2: [Source](languages/armenian2)
+1. <img src='languages/brazilian/apk/flag/flag.png' height='16'>&nbsp;Brazilian: [Source](languages/brazilian) • [Play Store](https://play.google.com/store/apps/details?id=com.anysoftkeyboard.languagepack.brazilian)
+1. <img src='languages/english/apk/flag/flag.png' height='16'>&nbsp;English: [Source](languages/english)
+1. <img src='languages/french/apk/flag/flag.svg?sanitize=1' height='16'>&nbsp;French: [Source](languages/french) • [Play Store](https://play.google.com/store/apps/details?id=com.anysoftkeyboard.languagepack.french)
+1. <img src='languages/greek/apk/flag/flag.png' height='16'>&nbsp;Greek: [Source](languages/greek) • [Play Store](https://play.google.com/store/apps/details?id=com.anysoftkeyboard.languagepack.greek)
+1. <img src='languages/hebrew/apk/flag/flag.png' height='16'>&nbsp;Hebrew: [Source](languages/hebrew) • [Play Store](https://play.google.com/store/apps/details?id=com.anysoftkeyboard.languagepack.hebrew)
+1. <img src='languages/indonesian/apk/flag/flag.png' height='16'>&nbsp;Indonesian: [Source](languages/indonesian) • [Play Store](https://play.google.com/store/apps/details?id=com.anysoftkeyboard.languagepack.indonesian)
+1. <img src='languages/italian/apk/flag/flag.png' height='16'>&nbsp;Italian: [Source](languages/italian) • [Play Store](https://play.google.com/store/apps/details?id=com.anysoftkeyboard.languagepack.italian)
+1. <img src='languages/romanian/apk/flag/flag.png' height='16'>&nbsp;Romanian: [Source](languages/romanian) • [Play Store](https://play.google.com/store/apps/details?id=com.anysoftkeyboard.languagepack.romanian)
+1. <img src='languages/russian2/apk/flag/flag.png' height='16'>&nbsp;Russian2: [Source](languages/russian2) • [Play Store](https://play.google.com/store/apps/details?id=com.anysoftkeyboard.languagepack.russian2)
+1. <img src='languages/sardinian/apk/flag/flag.png' height='16'>&nbsp;Sardinian: [Source](languages/sardinian)
+1. <img src='languages/spain/apk/flag/flag.png' height='16'>&nbsp;Spain: [Source](languages/spain) • [Play Store](https://play.google.com/store/apps/details?id=com.anysoftkeyboard.languagepack.spain)
+1. <img src='languages/tamazight/apk/flag/flag.png' height='16'>&nbsp;Tamazight: [Source](languages/tamazight) • [Play Store](https://play.google.com/store/apps/details?id=com.anysoftkeyboard.languagepack.tamazight)
# License
diff --git a/build.gradle b/build.gradle
index 216fb6b..35a6159 100644
--- a/build.gradle
+++ b/build.gradle
@@ -11,7 +11,7 @@ buildscript {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.2.1'
+ classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.github.menny:GradleVersion:1cd6d47894028c58924d80238068aaf579a04663'
classpath 'com.github.triplet.gradle:play-publisher:2.0.0'
@@ -31,10 +31,9 @@ def generators = [
def versionData = versionGenerator.generateVersion(4, 0, 0, generators)
rootProject.version = versionData.versionName
-
rootProject.file('.generated_pack_version').write(versionData.versionName)
-def languagePacks = new ArrayList<String>()
+rootProject.ext.versionData = versionData
tasks.register("generateMarkDownOfLanguagePacks") {
group "AnySoftKeyboard"
@@ -42,178 +41,31 @@ tasks.register("generateMarkDownOfLanguagePacks") {
doLast {
println("## Languages in this repo")
- println("We have ${languagePacks.size()} language packs in this repo:")
println()
- languagePacks.each { println(it) }
- }
-}
-
-static <T> T getExtValue(Project proj, String key, T defaultValue) {
- if (proj.hasProperty(key)) {
- return proj.getProperties().get(key)
- } else {
- return defaultValue
- }
-}
-
-static Object getExtValue(Project proj, String key) {
- return getExtValue(proj, key, null)
-}
-subprojects {
- it.group "com.anysoftkeybaord${it.parent.path.replace(':', '.')}"
- it.version = rootProject.version
- it.afterEvaluate { project ->
- def languageName = project.parent.name
-
- //ANDROID BASICS
- if (project.plugins.hasPlugin('com.android.library') || project.plugins.hasPlugin('com.android.application')) {
- project.android {
- compileSdkVersion 28
- buildToolsVersion '28.0.3'
-
- defaultConfig {
- minSdkVersion 9
- targetSdkVersion 28
- versionCode versionData.versionCode
- versionName versionData.versionName
+ subprojects.each {
+ if (it.plugins.hasPlugin('com.android.application')) {
+ def image = "<img src='languages/${it.parent.name}/apk/flag/{{IMAGE_FILENAME}}' height='16'>&nbsp;"
+ if (it.file("flag/flag.png").exists()) {
+ image = image.replace("{{IMAGE_FILENAME}}", "flag.png")
+ } else if (it.file("flag/flag.svg").exists()) {
+ image = image.replace("{{IMAGE_FILENAME}}", "flag.svg?sanitize=1")
+ } else {
+ image = ""
}
- }
- }
+ def packReadMeDetails = "1. ${image}${it.parent.name.capitalize()}: [Source](languages/${it.parent.name})"
- if (project.plugins.hasPlugin('com.android.application')) {
- project.android {
- defaultConfig {
- //applicationId "com.anysoftkeyboard.languagepack.${languageName}"
- applicationId "com.anysoftkeyboard.languagepack.kedmanee"
+ if (it.ext.shouldBePublished) {
+ packReadMeDetails += " • [Play Store](https://play.google.com/store/apps/details?id=${it.android.defaultConfig.applicationId})"
}
- applicationVariants.all { variant ->
- variant.outputs.all {
- outputFileName = "ASKLangPack-${languageName}-${versionData.versionCode}.apk"
- }
- variant.assemble.doLast { assemble ->
- copy {
- from variant.outputs*.outputFile
- into "${rootDir.absolutePath}/language-packs-apk/${variant.dirName}/"
- }
- }
- }
- }
- }
-
- //PUBLISH TO PLAY-STORE
- if (project.plugins.hasPlugin('com.android.application')) {
- def image = "<img src='languages/${project.parent.name}/apk/flag/{{IMAGE_FILENAME}}' height='16'>&nbsp;"
- if (project.file("flag/flag.png").exists()) {
- image = image.replace("{{IMAGE_FILENAME}}", "flag.png")
- } else if (project.file("flag/flag.svg").exists()) {
- image = image.replace("{{IMAGE_FILENAME}}", "flag.svg?sanitize=1")
- } else {
- image = ""
- }
- def packReadMeDetails = "* ${image}${languageName.capitalize()}: [Source](languages/${project.parent.name})"
-
- project.android {
- signingConfigs {
- release {
- storeFile file(RELEASE_STORE_FILE)
- storePassword RELEASE_STORE_PASSWORD
- keyAlias RELEASE_KEY_ALIAS
- keyPassword RELEASE_KEY_PASSWORD
- }
- }
-
- buildTypes {
- release {
- signingConfig signingConfigs.release
- zipAlignEnabled true
- debuggable false
-
- minifyEnabled false
- }
- }
- }
-
- if (project.ext.shouldBePublished) {
- packReadMeDetails += " • [Play Store](https://play.google.com/store/apps/details?id=${project.android.defaultConfig.applicationId})"
- println("Project ${path} is marked for publishing")
-
- project.apply plugin: 'com.github.triplet.play'
-
- play {
- // you can promote from command-line by specifying the track to promote to:
- // ./gradlew :languages:hebrew:apk:promoteReleaseArtifact -DpublishTrackOverride=beta
- track = System.getProperty('publishTrackOverride', 'alpha')
- serviceAccountEmail = System.getenv().getOrDefault('PUBLISH_APK_SERVICE_ACCOUNT_EMAIL', 'dummy@example.com')
- serviceAccountCredentials = file('/tmp/apk_upload_key.p12')
- }
- } else {
- println("Project ${path} is NOT marked for publishing")
- }
-
- languagePacks.add(packReadMeDetails)
- }
-
- //GENERATING ICONS
- if (project.plugins.hasPlugin('com.android.library') && name != "base") {
- def generateIconsTask = project.tasks.register('generateLanguagePackIcons') {
- group "AnySoftKeyboard"
- description 'Creating icons for AnySoftKeyboard language pack library'
- }
-
- [['xxxhdpi', 96, 80], ['xxhdpi', 72, 62], ['xhdpi', 48, 40], ['hdpi', 36, 32], ['mdpi', 24, 22]].each { dimens ->
- def statusIcon = project.tasks.register("generateStatusIcon_${dimens[0]}", Exec) {
- commandLine "${rootDir.absolutePath}/scripts/generate_status_icon.sh", project.ext.status_icon_text, languageName, "${dimens[1]}", "${dimens[2]}", "${projectDir.absolutePath}/src/main/res/drawable-${dimens[0]}"
- }
-
- generateIconsTask.configure { dependsOn.add(statusIcon) }
- }
- }
-
- if (project.plugins.hasPlugin('com.android.application')) {
- def imageAssetsFolder = new File(new File(rootDir, "StoreStuff"), "assets")
- if (!imageAssetsFolder.exists()) {
- throw new IllegalStateException("store assets folder '${imageAssetsFolder.absolutePath} does not exist!")
- }
-
- def generateLogoTask = project.tasks.register('generateStoreLogoIcon', Exec) {
- group "AnySoftKeyboard"
- description 'Creating icons for AnySoftKeyboard language pack APK'
-
- commandLine "${imageAssetsFolder.absolutePath}/logo-base/generate.sh", projectDir.absolutePath, buildDir.absolutePath, "${imageAssetsFolder.absolutePath}/logo-base"
- }
-
- def launcherAssetsDir = "${imageAssetsFolder.absolutePath}/launcher-base"
- [['xxxhdpi', 64, 24], ['xxhdpi', 48, 20], ['xhdpi', 36, 10], ['hdpi', 30, 4], ['mdpi', 22, 1]].each { dimens ->
- def convert = project.tasks.register("generateLauncherIcon_${dimens[0]}", Exec) {
- commandLine "${launcherAssetsDir}/generate.sh", projectDir.absolutePath, buildDir.absolutePath, "${dimens[0]}", "${dimens[1]}", "${dimens[2]}", launcherAssetsDir
- }
-
- generateLogoTask.configure { dependsOn.add(convert) }
- }
- }
-
- if (getExtValue(project, "shouldGenerateDictionary", true) && project.plugins.hasPlugin('com.android.library') && name != "base") {
- //project.apply plugin: 'makedictionary'
- }
-
- //CHECKS
- if (project.plugins.hasPlugin('com.android.library') || project.plugins.hasPlugin('com.android.application')) {
- project.android {
- lintOptions {
- htmlOutput file("${buildDir.absolutePath}/reports/lint/${path.substring(1).replace(':', '-')}-lint-results.html")
- lintConfig rootProject.file('configs/lint.xml')
- }
+ println(packReadMeDetails)
}
}
}
+}
- dependencies {
- repositories {
- google()
- jcenter()
- maven { url "https://jitpack.io" }
- }
- }
+subprojects {
+ it.group "com.anysoftkeybaord${it.parent.path.replace(':', '.')}"
+ it.version = rootProject.version
}
diff --git a/circle.yml b/circle.yml
index 41aa20e..44c2ef8 100644
--- a/circle.yml
+++ b/circle.yml
@@ -53,7 +53,8 @@ jobs:
paths:
- "~/.gradle"
- "~/.m2"
- - "/opt/android-sdk-linux/licenses/"
+ - "~/.android"
+ - "/opt/android-sdk-linux/licenses"
check:
<<: *container_config
diff --git a/gradle.properties b/gradle.properties
index a20ca7f..a964abe 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -18,6 +18,4 @@
org.gradle.parallel=true
org.gradle.jvmargs=-Xms480m -Xmx512m -Dfile.encoding=UTF-8
org.gradle.configureondemand=false
-org.gradle.caching=true
-android.enableAapt2=false
-android.enableD8.desugaring=false \ No newline at end of file
+org.gradle.caching=true \ No newline at end of file
diff --git a/gradle/language_pack.gradle b/gradle/language_pack.gradle
new file mode 100644
index 0000000..32f255b
--- /dev/null
+++ b/gradle/language_pack.gradle
@@ -0,0 +1,26 @@
+android {
+ compileSdkVersion 28
+ buildToolsVersion '28.0.3'
+
+ defaultConfig {
+ minSdkVersion 9
+ targetSdkVersion 28
+ versionCode rootProject.ext.versionData.versionCode
+ versionName rootProject.ext.versionData.versionName
+ }
+
+ lintOptions {
+ htmlOutput file("${buildDir.absolutePath}/reports/lint/${path.substring(1).replace(':', '-')}-lint-results.html")
+ lintConfig rootProject.file('configs/lint.xml')
+ }
+}
+
+dependencies {
+ repositories {
+ google()
+ jcenter()
+ maven { url "https://jitpack.io" }
+ }
+
+ api project(path: ':languages:base')
+} \ No newline at end of file
diff --git a/gradle/language_pack_apk.gradle b/gradle/language_pack_apk.gradle
new file mode 100644
index 0000000..6f63646
--- /dev/null
+++ b/gradle/language_pack_apk.gradle
@@ -0,0 +1,88 @@
+apply plugin: 'com.android.application'
+
+apply from: "$rootDir/gradle/language_pack.gradle"
+
+private static <T> T getExtValue(Project proj, String key, T defaultValue) {
+ if (proj.hasProperty(key)) {
+ return proj.getProperties().get(key)
+ } else {
+ return defaultValue
+ }
+}
+
+def languageName = parent.name
+
+android {
+ defaultConfig {
+ applicationId "com.anysoftkeyboard.languagepack.${languageName}"
+ }
+
+ applicationVariants.configureEach { variant ->
+ variant.outputs.all {
+ outputFileName = "ASKLangPack-${languageName}-${versionData.versionCode}.apk"
+ }
+ variant.assembleProvider.configure { assemble ->
+ assemble.doLast {
+ copy {
+ from variant.outputs*.outputFile
+ into "${rootDir.absolutePath}/language-packs-apk/${variant.dirName}/"
+ }
+ }
+ }
+ }
+
+ signingConfigs {
+ release {
+ storeFile file(RELEASE_STORE_FILE)
+ storePassword RELEASE_STORE_PASSWORD
+ keyAlias RELEASE_KEY_ALIAS
+ keyPassword RELEASE_KEY_PASSWORD
+ }
+ }
+
+ buildTypes {
+ release {
+ signingConfig signingConfigs.release
+ zipAlignEnabled true
+ debuggable false
+
+ minifyEnabled false
+ }
+ }
+}
+
+if (project.ext.shouldBePublished) {
+ project.apply plugin: 'com.github.triplet.play'
+
+ play {
+ // you can promote from command-line by specifying the track to promote to:
+ // ./gradlew :languages:hebrew:apk:promoteReleaseArtifact -DpublishTrackOverride=beta
+ track = System.getProperty('publishTrackOverride', 'alpha')
+ serviceAccountEmail = System.getenv().getOrDefault('PUBLISH_APK_SERVICE_ACCOUNT_EMAIL', 'dummy@example.com')
+ serviceAccountCredentials = file('/tmp/apk_upload_key.p12')
+ }
+} else {
+ println("Project ${path} is NOT marked for publishing")
+}
+
+def imageAssetsFolder = new File(new File(rootDir, "StoreStuff"), "assets")
+if (!imageAssetsFolder.exists()) {
+ throw new IllegalStateException("store assets folder '${imageAssetsFolder.absolutePath} does not exist!")
+}
+
+def generateLogoTask = tasks.register('generateStoreLogoIcon', Exec) {
+ it.group "AnySoftKeyboard"
+ it.description 'Creating icons for AnySoftKeyboard language pack APK'
+
+ it.commandLine "${imageAssetsFolder.absolutePath}/logo-base/generate.sh", projectDir.absolutePath, buildDir.absolutePath, "${imageAssetsFolder.absolutePath}/logo-base"
+}
+
+def launcherAssetsDir = "${imageAssetsFolder.absolutePath}/launcher-base"
+[['xxxhdpi', 64, 24], ['xxhdpi', 48, 20], ['xhdpi', 36, 10], ['hdpi', 30, 4], ['mdpi', 22, 1]].each { dimens ->
+ def convert = project.tasks.register("generateLauncherIcon_${dimens[0]}", Exec) {
+ commandLine "${launcherAssetsDir}/generate.sh", projectDir.absolutePath, buildDir.absolutePath, "${dimens[0]}", "${dimens[1]}", "${dimens[2]}", launcherAssetsDir
+ }
+
+ generateLogoTask.configure { dependsOn.add(convert) }
+}
+
diff --git a/gradle/language_pack_lib.gradle b/gradle/language_pack_lib.gradle
new file mode 100644
index 0000000..1e773ae
--- /dev/null
+++ b/gradle/language_pack_lib.gradle
@@ -0,0 +1,18 @@
+apply plugin: 'com.android.library'
+
+apply from: "$rootDir/gradle/language_pack.gradle"
+
+def languageName = parent.name
+
+def generateIconsTask = tasks.register('generateLanguagePackIcons') {
+ it.group "AnySoftKeyboard"
+ it.description 'Creating icons for AnySoftKeyboard language pack library'
+}
+
+[['xxxhdpi', 96, 80], ['xxhdpi', 72, 62], ['xhdpi', 48, 40], ['hdpi', 36, 32], ['mdpi', 24, 22]].each { dimens ->
+ def statusIcon = tasks.register("generateStatusIcon_${dimens[0]}", Exec) {
+ it.commandLine "${rootDir.absolutePath}/scripts/generate_status_icon.sh", project.ext.status_icon_text, languageName, "${dimens[1]}", "${dimens[2]}", "${projectDir.absolutePath}/src/main/res/drawable-${dimens[0]}"
+ }
+
+ generateIconsTask.configure { dependsOn.add(statusIcon) }
+} \ No newline at end of file
diff --git a/languages/afrikaans_oss/apk/build.gradle b/languages/afrikaans_oss/apk/build.gradle
index f98f450..da45d6d 100644
--- a/languages/afrikaans_oss/apk/build.gradle
+++ b/languages/afrikaans_oss/apk/build.gradle
@@ -1,7 +1,7 @@
-apply plugin: 'com.android.application'
-
ext.shouldBePublished = true
+apply from: "$rootDir/gradle/language_pack_apk.gradle"
+
dependencies {
implementation project(path: ':languages:afrikaans_oss:pack')
}
diff --git a/languages/afrikaans_oss/pack/build.gradle b/languages/afrikaans_oss/pack/build.gradle
index cd755d1..42654e5 100644
--- a/languages/afrikaans_oss/pack/build.gradle
+++ b/languages/afrikaans_oss/pack/build.gradle
@@ -1,10 +1,8 @@
-apply plugin: 'com.android.library'
ext.status_icon_text = "af"
ext.dictionaryInputPossibleCharacters = null//"".toCharArray()
ext.dictionaryInputAdditionalInnerCharacters = null//"".toCharArray()
-dependencies {
- api project(path: ':languages:base')
-}
+apply from: "$rootDir/gradle/language_pack_lib.gradle"
+
diff --git a/languages/armenian2/apk/build.gradle b/languages/armenian2/apk/build.gradle
index 864fab5..674c115 100644
--- a/languages/armenian2/apk/build.gradle
+++ b/languages/armenian2/apk/build.gradle
@@ -1,7 +1,7 @@
-apply plugin: 'com.android.application'
-
ext.shouldBePublished = false
+apply from: "$rootDir/gradle/language_pack_apk.gradle"
+
dependencies {
implementation project(path: ':languages:armenian2:pack')
}
diff --git a/languages/armenian2/pack/build.gradle b/languages/armenian2/pack/build.gradle
index f1ce8b4..c138b05 100644
--- a/languages/armenian2/pack/build.gradle
+++ b/languages/armenian2/pack/build.gradle
@@ -1,8 +1,4 @@
-apply plugin: 'com.android.library'
-
ext.status_icon_text = "hy"
ext.shouldGenerateDictionary = false
-dependencies {
- api project(path: ':languages:base')
-}
+apply from: "$rootDir/gradle/language_pack_lib.gradle" \ No newline at end of file
diff --git a/languages/base/build.gradle b/languages/base/build.gradle
index 28ed36c..f0ff383 100644
--- a/languages/base/build.gradle
+++ b/languages/base/build.gradle
@@ -1,5 +1,23 @@
apply plugin: 'com.android.library'
+android {
+ compileSdkVersion 28
+ buildToolsVersion '28.0.3'
+
+ defaultConfig {
+ minSdkVersion 9
+ targetSdkVersion 28
+ versionCode 1
+ versionName "1.0"
+ }
+}
+
dependencies {
+ repositories {
+ google()
+ jcenter()
+ maven { url "https://jitpack.io" }
+ }
+
api 'com.anysoftkeyboard.api:api:1.11.12'
} \ No newline at end of file
diff --git a/languages/brazilian/apk/build.gradle b/languages/brazilian/apk/build.gradle
index a75395a..9e67dd7 100644
--- a/languages/brazilian/apk/build.gradle
+++ b/languages/brazilian/apk/build.gradle
@@ -1,5 +1,7 @@
-apply plugin: 'com.android.application'
ext.shouldBePublished = true
+
+apply from: "$rootDir/gradle/language_pack_apk.gradle"
+
dependencies {
implementation project(path: ':languages:brazilian:pack')
}
diff --git a/languages/brazilian/pack/build.gradle b/languages/brazilian/pack/build.gradle
index 9e557e5..e206ecf 100644
--- a/languages/brazilian/pack/build.gradle
+++ b/languages/brazilian/pack/build.gradle
@@ -1,7 +1,5 @@
-apply plugin: 'com.android.library'
ext.status_icon_text = 'pt'
ext.dictionaryInputPossibleCharacters = null//.toCharArray()
ext.dictionaryInputAdditionalInnerCharacters = null//.toCharArray()
-dependencies {
- implementation project(path: ':languages:base')
-}
+
+apply from: "$rootDir/gradle/language_pack_lib.gradle" \ No newline at end of file
diff --git a/languages/english/apk/build.gradle b/languages/english/apk/build.gradle
index 16f1146..e4286b5 100644
--- a/languages/english/apk/build.gradle
+++ b/languages/english/apk/build.gradle
@@ -1,7 +1,7 @@
-apply plugin: 'com.android.application'
-
ext.shouldBePublished = false
+apply from: "$rootDir/gradle/language_pack_apk.gradle"
+
dependencies {
implementation project(path: ':languages:english:pack')
}
diff --git a/languages/english/pack/build.gradle b/languages/english/pack/build.gradle
index 8cd8b05..6a9dc72 100644
--- a/languages/english/pack/build.gradle
+++ b/languages/english/pack/build.gradle
@@ -1,10 +1,6 @@
-apply plugin: 'com.android.library'
-
ext.status_icon_text = "en"
ext.dictionaryInputPossibleCharacters = null//"".toCharArray()
ext.dictionaryInputAdditionalInnerCharacters = null//"".toCharArray()
-dependencies {
- api project(path: ':languages:base')
-}
+apply from: "$rootDir/gradle/language_pack_lib.gradle" \ No newline at end of file
diff --git a/languages/french/apk/build.gradle b/languages/french/apk/build.gradle
index 1df6e18..f0764d7 100755
--- a/languages/french/apk/build.gradle
+++ b/languages/french/apk/build.gradle
@@ -1,7 +1,7 @@
-apply plugin: 'com.android.application'
-
ext.shouldBePublished = true
+apply from: "$rootDir/gradle/language_pack_apk.gradle"
+
dependencies {
implementation project(path: ':languages:french:pack')
}
diff --git a/languages/french/pack/build.gradle b/languages/french/pack/build.gradle
index 20c07d2..53088af 100755
--- a/languages/french/pack/build.gradle
+++ b/languages/french/pack/build.gradle
@@ -1,10 +1,6 @@
-apply plugin: 'com.android.library'
-
ext.status_icon_text = "fr"
ext.dictionaryInputPossibleCharacters = null//"".toCharArray()
ext.dictionaryInputAdditionalInnerCharacters = null//"".toCharArray()
-dependencies {
- api project(path: ':languages:base')
-}
+apply from: "$rootDir/gradle/language_pack_lib.gradle" \ No newline at end of file
diff --git a/languages/greek/apk/build.gradle b/languages/greek/apk/build.gradle
index 53205a0..3198024 100644
--- a/languages/greek/apk/build.gradle
+++ b/languages/greek/apk/build.gradle
@@ -1,5 +1,7 @@
-apply plugin: 'com.android.application'
ext.shouldBePublished = true
+
+apply from: "$rootDir/gradle/language_pack_apk.gradle"
+
dependencies {
implementation project(path: ':languages:greek:pack')
}
diff --git a/languages/greek/pack/build.gradle b/languages/greek/pack/build.gradle
index cad222a..c0d0f6a 100644
--- a/languages/greek/pack/build.gradle
+++ b/languages/greek/pack/build.gradle
@@ -1,7 +1,5 @@
-apply plugin: 'com.android.library'
ext.status_icon_text = 'el'
ext.dictionaryInputPossibleCharacters = null//.toCharArray()
ext.dictionaryInputAdditionalInnerCharacters = null//.toCharArray()
-dependencies {
- implementation project(path: ':languages:base')
-}
+
+apply from: "$rootDir/gradle/language_pack_lib.gradle" \ No newline at end of file
diff --git a/languages/hebrew/apk/build.gradle b/languages/hebrew/apk/build.gradle
index f967ec2..0500d65 100644
--- a/languages/hebrew/apk/build.gradle
+++ b/languages/hebrew/apk/build.gradle
@@ -1,7 +1,7 @@
-apply plugin: 'com.android.application'
-
ext.shouldBePublished = true
+apply from: "$rootDir/gradle/language_pack_apk.gradle"
+
dependencies {
implementation project(path: ':languages:hebrew:pack')
}
diff --git a/languages/hebrew/pack/build.gradle b/languages/hebrew/pack/build.gradle
index d546d3e..a3277f1 100644
--- a/languages/hebrew/pack/build.gradle
+++ b/languages/hebrew/pack/build.gradle
@@ -1,9 +1,6 @@
-apply plugin: 'com.android.library'
ext.status_icon_text = 'ע'
ext.dictionaryInputPossibleCharacters = "אבגדהוזחטיכלמנסעפצקרשת".toCharArray()
ext.dictionaryInputAdditionalInnerCharacters = "ץםןף\"'".toCharArray()
-dependencies {
- implementation project(path: ':languages:base')
-}
+apply from: "$rootDir/gradle/language_pack_lib.gradle" \ No newline at end of file
diff --git a/languages/indonesian/apk/build.gradle b/languages/indonesian/apk/build.gradle
index 86e7fff..53a14c6 100644
--- a/languages/indonesian/apk/build.gradle
+++ b/languages/indonesian/apk/build.gradle
@@ -1,7 +1,7 @@
-apply plugin: 'com.android.application'
-
ext.shouldBePublished = true
+apply from: "$rootDir/gradle/language_pack_apk.gradle"
+
dependencies {
implementation project(path: ':languages:indonesian:pack')
}
diff --git a/languages/indonesian/pack/build.gradle b/languages/indonesian/pack/build.gradle
index 83ad0d4..e0206d1 100644
--- a/languages/indonesian/pack/build.gradle
+++ b/languages/indonesian/pack/build.gradle
@@ -1,10 +1,6 @@
-apply plugin: 'com.android.library'
-
ext.status_icon_text = "id"
ext.dictionaryInputPossibleCharacters = null//"".toCharArray()
ext.dictionaryInputAdditionalInnerCharacters = null//"".toCharArray()
-dependencies {
- api project(path: ':languages:base')
-}
+apply from: "$rootDir/gradle/language_pack_lib.gradle" \ No newline at end of file
diff --git a/languages/italian/apk/build.gradle b/languages/italian/apk/build.gradle
index 330b101..cdbc435 100644
--- a/languages/italian/apk/build.gradle
+++ b/languages/italian/apk/build.gradle
@@ -1,5 +1,7 @@
-apply plugin: 'com.android.application'
ext.shouldBePublished = true
+
+apply from: "$rootDir/gradle/language_pack_apk.gradle"
+
dependencies {
implementation project(path: ':languages:italian:pack')
}
diff --git a/languages/italian/pack/build.gradle b/languages/italian/pack/build.gradle
index bb96857..9f6cb70 100644
--- a/languages/italian/pack/build.gradle
+++ b/languages/italian/pack/build.gradle
@@ -1,7 +1,5 @@
-apply plugin: 'com.android.library'
ext.status_icon_text = 'it'
ext.dictionaryInputPossibleCharacters = null//.toCharArray()
ext.dictionaryInputAdditionalInnerCharacters = null//.toCharArray()
-dependencies {
- implementation project(path: ':languages:base')
-}
+
+apply from: "$rootDir/gradle/language_pack_lib.gradle" \ No newline at end of file
diff --git a/languages/romanian/apk/build.gradle b/languages/romanian/apk/build.gradle
index 2e50f4a..15744c6 100644
--- a/languages/romanian/apk/build.gradle
+++ b/languages/romanian/apk/build.gradle
@@ -1,5 +1,7 @@
-apply plugin: 'com.android.application'
ext.shouldBePublished = true
+
+apply from: "$rootDir/gradle/language_pack_apk.gradle"
+
dependencies {
implementation project(path: ':languages:romanian:pack')
}
diff --git a/languages/romanian/pack/build.gradle b/languages/romanian/pack/build.gradle
index a98ef4a..c6cc7f5 100644
--- a/languages/romanian/pack/build.gradle
+++ b/languages/romanian/pack/build.gradle
@@ -1,7 +1,5 @@
-apply plugin: 'com.android.library'
ext.status_icon_text = 'ro'
ext.dictionaryInputPossibleCharacters = null//.toCharArray()
ext.dictionaryInputAdditionalInnerCharacters = null//.toCharArray()
-dependencies {
- implementation project(path: ':languages:base')
-}
+
+apply from: "$rootDir/gradle/language_pack_lib.gradle" \ No newline at end of file
diff --git a/languages/russian2/apk/build.gradle b/languages/russian2/apk/build.gradle
index c2e1f97..7d1c92c 100644
--- a/languages/russian2/apk/build.gradle
+++ b/languages/russian2/apk/build.gradle
@@ -1,7 +1,9 @@
-apply plugin: 'com.android.application'
ext.shouldBePublished = true
//russian was release with a different key-store (provided by Sergii Pylypenko)
ext.override_release_key_alias = 'russian2'
+
+apply from: "$rootDir/gradle/language_pack_apk.gradle"
+
dependencies {
implementation project(path: ':languages:russian2:pack')
}
diff --git a/languages/russian2/pack/build.gradle b/languages/russian2/pack/build.gradle
index f0d5074..d97e016 100644
--- a/languages/russian2/pack/build.gradle
+++ b/languages/russian2/pack/build.gradle
@@ -1,7 +1,9 @@
-apply plugin: 'com.android.library'
ext.status_icon_text = 'ru'
ext.dictionaryInputPossibleCharacters = null//.toCharArray()
ext.dictionaryInputAdditionalInnerCharacters = null//.toCharArray()
+
+apply from: "$rootDir/gradle/language_pack_lib.gradle"
+
dependencies {
implementation project(path: ':languages:base')
}
diff --git a/languages/sardinian/apk/build.gradle b/languages/sardinian/apk/build.gradle
index 2c342f0..91cfc7d 100644
--- a/languages/sardinian/apk/build.gradle
+++ b/languages/sardinian/apk/build.gradle
@@ -1,5 +1,7 @@
-apply plugin: 'com.android.application'
ext.shouldBePublished = false
+
+apply from: "$rootDir/gradle/language_pack_apk.gradle"
+
dependencies {
implementation project(path: ':languages:sardinian:pack')
}
diff --git a/languages/sardinian/pack/build.gradle b/languages/sardinian/pack/build.gradle
index d7ecaa1..99e59b6 100644
--- a/languages/sardinian/pack/build.gradle
+++ b/languages/sardinian/pack/build.gradle
@@ -1,7 +1,9 @@
-apply plugin: 'com.android.library'
ext.status_icon_text = 'sc'
ext.dictionaryInputPossibleCharacters = "abcdefghilmnopqrstuvzjàèìòùéABCDEFGHILMNOPQRSTUVZJÀÈÌÒÙÉ".toCharArray()
ext.dictionaryInputAdditionalInnerCharacters = "·\"'".toCharArray()
+
+apply from: "$rootDir/gradle/language_pack_lib.gradle"
+
dependencies {
implementation project(path: ':languages:base')
}
diff --git a/languages/spain/apk/build.gradle b/languages/spain/apk/build.gradle
index 4340fa1..c311eeb 100644
--- a/languages/spain/apk/build.gradle
+++ b/languages/spain/apk/build.gradle
@@ -1,5 +1,7 @@
-apply plugin: 'com.android.application'
ext.shouldBePublished = true
+
+apply from: "$rootDir/gradle/language_pack_apk.gradle"
+
dependencies {
implementation project(path: ':languages:spain:pack')
}
diff --git a/languages/spain/pack/build.gradle b/languages/spain/pack/build.gradle
index fb052d5..f027d04 100644
--- a/languages/spain/pack/build.gradle
+++ b/languages/spain/pack/build.gradle
@@ -1,7 +1,5 @@
-apply plugin: 'com.android.library'
ext.status_icon_text = 'es'
ext.dictionaryInputPossibleCharacters = null//.toCharArray()
ext.dictionaryInputAdditionalInnerCharacters = null//.toCharArray()
-dependencies {
- implementation project(path: ':languages:base')
-}
+
+apply from: "$rootDir/gradle/language_pack_lib.gradle" \ No newline at end of file
diff --git a/languages/tamazight/apk/build.gradle b/languages/tamazight/apk/build.gradle
index b2b72d8..54e07da 100644
--- a/languages/tamazight/apk/build.gradle
+++ b/languages/tamazight/apk/build.gradle
@@ -1,5 +1,7 @@
-apply plugin: 'com.android.application'
ext.shouldBePublished = true
+
+apply from: "$rootDir/gradle/language_pack_apk.gradle"
+
dependencies {
implementation project(path: ':languages:tamazight:pack')
}
diff --git a/languages/tamazight/pack/build.gradle b/languages/tamazight/pack/build.gradle
index 5e15630..dd75779 100644
--- a/languages/tamazight/pack/build.gradle
+++ b/languages/tamazight/pack/build.gradle
@@ -1,7 +1,5 @@
-apply plugin: 'com.android.library'
ext.status_icon_text = 'tz'
ext.dictionaryInputPossibleCharacters = null//.toCharArray()
ext.dictionaryInputAdditionalInnerCharacters = null//.toCharArray()
-dependencies {
- implementation project(path: ':languages:base')
-}
+
+apply from: "$rootDir/gradle/language_pack_lib.gradle" \ No newline at end of file
diff --git a/scripts/ci_deploy.sh b/scripts/ci_deploy.sh
index 48ae249..229a28b 100755
--- a/scripts/ci_deploy.sh
+++ b/scripts/ci_deploy.sh
@@ -23,6 +23,7 @@ wget ${KEYSTORE_FILE_URL} -q -O /tmp/language_pack.keystore
wget ${PUBLISH_CERT_FILE_URL} -q -O /tmp/apk_upload_key.p12
echo "**** Uploading to Play Store..."
-./gradlew ${EXTRA_GRADLE_ARGS} assembleRelease publishRelease
+./gradlew ${EXTRA_GRADLE_ARGS} clean
+./gradlew ${EXTRA_GRADLE_ARGS} --no-build-cache assembleRelease publishRelease
diff --git a/scripts/ci_deploy_maven.sh b/scripts/ci_deploy_maven.sh
index 6176d3e..a07214f 100755
--- a/scripts/ci_deploy_maven.sh
+++ b/scripts/ci_deploy_maven.sh
@@ -1,3 +1,4 @@
#!/usr/bin/env bash
-./gradlew ${EXTRA_GRADLE_ARGS} bintrayUpload -PdryRun=false \ No newline at end of file
+./gradlew ${EXTRA_GRADLE_ARGS} clean
+./gradlew ${EXTRA_GRADLE_ARGS} --no-build-cache bintrayUpload -PdryRun=false \ No newline at end of file