* totally refactored the Languages, the Database and the IME module. New and more clear folder/package structure * CharMap and LangHelper are no more * removed many unused icons, translations and other resources * deleted the old keymap samples * Update user-manual.md * Preferences are stored in Preferences, not in the database. * removed some unclear and unused settings from the Preferences screen and the code. * fixed issues with displaying the UI * removed all non-English words and words with foreign spelling from the English dictionary * 0 now works as it should in all modes. * a more clear newline character in suggestions view * last used input mode is now preserved and restored the next time * removed the smiley and symbol dialogs * capsMode -> textCase * language names are no longer translated * updated build instructions * better use of threads for DB operations * current text candidate is as long as the sequence, to make it more intuitive * single characters are added to the end of the suggestion, when there are no more in the database * Added ѝ to Bulgarian character map * disabled adding words in a user-friendly manner * when adding a new word is not possible, a toast message appears, for better user experience * an error is logged when there are duplicate language IDs * settings -> settings_legacy * custom Logger class for easier debugging and no logcat flood in the Release version * removed unnecessary single letters and invalid words from the dictionaries * more translations cleanup; also corrected some weird translations * upgraded gradle
125 lines
3 KiB
Groovy
125 lines
3 KiB
Groovy
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
google()
|
|
}
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:7.3.0'
|
|
}
|
|
}
|
|
apply plugin: 'com.android.application'
|
|
|
|
dependencies {
|
|
implementation "androidx.core:core:1.6.0"
|
|
implementation 'androidx.preference:preference:1.1.1'
|
|
implementation "androidx.room:room-runtime:2.1.0"
|
|
annotationProcessor "androidx.room:room-compiler:2.1.0"
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
google()
|
|
}
|
|
|
|
def execThing ( String cmdStr ) {
|
|
def stdout = new ByteArrayOutputStream()
|
|
String prefix = System.getenv("GITCMDPREFIX")
|
|
if (prefix != null) {
|
|
String cmd = prefix + cmdStr
|
|
exec {
|
|
commandLine cmd.tokenize()
|
|
standardOutput = stdout
|
|
}
|
|
} else {
|
|
exec {
|
|
commandLine cmdStr.tokenize()
|
|
standardOutput = stdout
|
|
}
|
|
}
|
|
return stdout.toString().trim()
|
|
}
|
|
|
|
def computeVersionCode = { ->
|
|
String commitsCount = execThing("git rev-list --count HEAD")
|
|
|
|
return Integer.valueOf(commitsCount)
|
|
}
|
|
|
|
def computeVersionName = { ->
|
|
String tagsCount = execThing('git tag').split('\n').size()
|
|
String lastTag = execThing('git describe --tags --abbrev=0')
|
|
|
|
String gitLogResult = execThing("git log $lastTag..HEAD --oneline")
|
|
String commitsSinceLastTag = gitLogResult.equals('') ? "0" : gitLogResult.split('\n').size();
|
|
|
|
String currentHash = execThing('git log -1 --format=%h')
|
|
|
|
return "$tagsCount.$commitsSinceLastTag ($currentHash)"
|
|
}
|
|
|
|
android {
|
|
compileSdkVersion 30
|
|
buildToolsVersion "32.0.0"
|
|
|
|
sourceSets {
|
|
main {
|
|
manifest.srcFile 'AndroidManifest.xml'
|
|
java.srcDirs = ['src']
|
|
resources.srcDirs = ['src']
|
|
aidl.srcDirs = ['src']
|
|
renderscript.srcDirs = ['src']
|
|
res.srcDirs = ['res']
|
|
assets.srcDirs = ['assets']
|
|
}
|
|
|
|
// Move the build types to build-types/<type>
|
|
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
|
|
// This moves them out of them default location under src/<type>/... which would
|
|
// conflict with src/ being used by the main source set.
|
|
// Adding new build types or product flavors should be accompanied
|
|
// by a similar customization.
|
|
debug.setRoot('build-types/debug')
|
|
release.setRoot('build-types/release')
|
|
}
|
|
|
|
defaultConfig {
|
|
minSdkVersion 19
|
|
targetSdk 30
|
|
versionCode computeVersionCode()
|
|
versionName computeVersionName()
|
|
}
|
|
|
|
// http://stackoverflow.com/a/19130098
|
|
// signingConfigs {
|
|
// release {
|
|
// storeFile file(System.getenv("KEYSTORE"))
|
|
// storePassword System.getenv("KEYSTORE_PASS")
|
|
// keyAlias System.getenv("KEYALIAS")
|
|
// keyPassword System.getenv("KEYALIAS_PASS")
|
|
// }
|
|
// }
|
|
//
|
|
// buildTypes {
|
|
// release {
|
|
// signingConfig android.signingConfigs.release
|
|
// }
|
|
// }
|
|
}
|
|
|
|
task getDictSizes {
|
|
inputs.dir fileTree(dir:'assets', excludes:['dict.properties'])
|
|
outputs.file "t9build.properties"
|
|
doLast {
|
|
println "Calculating dict size..."
|
|
|
|
inputs.getFiles().each {File file ->
|
|
println "dict: "+ file.name
|
|
ant.propertyfile(file:"assets/dict.properties") {
|
|
entry(key: "size."+ file.name, value: file.length())
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
preBuild.dependsOn getDictSizes
|
|
preBuild.mustRunAfter getDictSizes
|