aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMenny Even Danan <menny@evendanan.net>2019-01-20 03:05:22 +0000
committerMenny Even Danan <menny@evendanan.net>2019-01-20 03:12:35 +0000
commit7265c3719cc8e99c2f357a093a372cc974b83533 (patch)
tree21f82b4e1f2839f5e8cb01e83ded12a69e22fcda
parentbe5ac1aa4ded959227266d047cea7c927ef0d65d (diff)
downloadask-language-pack-7265c3719cc8e99c2f357a093a372cc974b83533.tar.gz
ask-language-pack-7265c3719cc8e99c2f357a093a372cc974b83533.tar.bz2
Breaking DSLs from main script to severals
-rw-r--r--README.md31
-rw-r--r--build.gradle192
-rw-r--r--gradle/language_pack.gradle26
-rw-r--r--gradle/language_pack_apk.gradle95
-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
34 files changed, 251 insertions, 264 deletions
diff --git a/README.md b/README.md
index 6a2c136..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='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)
-* <img src='languages/armenian2/apk/flag/flag.png' height='16'>&nbsp;Armenian2: [Source](languages/armenian2)
-* <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)
-* <img src='languages/english/apk/flag/flag.png' height='16'>&nbsp;English: [Source](languages/english)
-* <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)
-* <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)
-* <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)
-* <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)
-* <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)
-* <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)
-* <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)
-* <img src='languages/sardinian/apk/flag/flag.png' height='16'>&nbsp;Sardinian: [Source](languages/sardinian)
-* <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)
-* <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)
+
+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 cba5d4c..35a6159 100644
--- a/build.gradle
+++ b/build.gradle
@@ -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,186 +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}"
+ if (it.ext.shouldBePublished) {
+ packReadMeDetails += " • [Play Store](https://play.google.com/store/apps/details?id=${it.android.defaultConfig.applicationId})"
}
- 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}/"
- }
- }
- }
- }
- }
- }
-
- //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 {
- def keystoreFile = file("/tmp/language_pack.keystore")
- if (keystoreFile.exists()) {
- storeFile keystoreFile
- storePassword System.getenv("PACKS_ALL_KEY_STORE_FILE_PASSWORD")
- keyAlias getExtValue(project, "override_release_key_alias", System.getenv("PACKS_ALL_KEY_STORE_FILE_DEFAULT_ALIAS"))
- keyPassword System.getenv("PACKS_ALL_KEY_STORE_FILE_DEFAULT_ALIAS_PASSWORD")
- println "Using '${storeFile.absolutePath}' to release APK ${path} (with alias '${keyAlias}')."
- } else {
- println "Could not find '${keystoreFile.absolutePath}' file. Can not sign release APK with release keystore! Using debug."
- initWith signingConfigs.debug
- }
- }
- }
-
- 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/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..42b222a
--- /dev/null
+++ b/gradle/language_pack_apk.gradle
@@ -0,0 +1,95 @@
+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 {
+ def keystoreFile = file("/tmp/language_pack.keystore")
+ if (keystoreFile.exists()) {
+ storeFile keystoreFile
+ storePassword System.getenv("PACKS_ALL_KEY_STORE_FILE_PASSWORD")
+ keyAlias getExtValue(project, "override_release_key_alias", System.getenv("PACKS_ALL_KEY_STORE_FILE_DEFAULT_ALIAS"))
+ keyPassword System.getenv("PACKS_ALL_KEY_STORE_FILE_DEFAULT_ALIAS_PASSWORD")
+ println "Using '${storeFile.absolutePath}' to release APK ${path} (with alias '${keyAlias}')."
+ } else {
+ println "Could not find '${keystoreFile.absolutePath}' file. Can not sign release APK with release keystore! Using debug."
+ initWith signingConfigs.debug
+ }
+ }
+ }
+
+ 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