spiegel-keyman/android/KMAPro/kMAPro/build.gradle
Darcy Wong b241f0b0fe feat(android): Add an event in SystemKeyboard
Also fix debug variant of KMEA
2020-03-05 14:22:54 +07:00

155 lines
4.6 KiB
Groovy

plugins {
id 'com.android.application'
id 'io.sentry.android.gradle'
id 'com.github.triplet.play' version '2.5.0' apply false
id 'name.remal.default-plugins'
}
ext.rootPath = '../../'
apply from: "$rootPath/version.gradle"
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId "com.tavultesoft.kmapro"
minSdkVersion 19
targetSdkVersion 29
//println "===DUMPING PROPERTIES==="
//dumpProperties(project) // Use this to dump all external properties for debugging TeamCity integration
//println "===END DUMP==="
String env_services_json_file = System.getenv('services_json_file')
if (env_services_json_file != null) {
env_services_json_file = String.valueOf(env_services_json_file)
println "Copying production google-services.json and using at kMAPro/"
copy {
from env_services_json_file
include '*.json'
into './'
}
}
// VERSION_CODE and VERSION_NAME from version.gradle
versionCode VERSION_CODE as Integer
versionName VERSION_NAME
}
String env_release_store_file = System.getenv("release_store_file")
String env_release_store_password = System.getenv("release_store_password")
String env_release_key_alias = System.getenv("release_key_alias")
String env_release_key_password = System.getenv("release_key_password")
if (env_release_store_file != null) {
signingConfigs {
release {
println "Using signing from environment"
storeFile file(String.valueOf(env_release_store_file))
storePassword env_release_store_password
keyAlias env_release_key_alias
keyPassword env_release_key_password
}
}
}
buildTypes {
debug {
applicationIdSuffix ".debug"
debuggable true
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
if (env_release_store_file != null) {
signingConfig signingConfigs.release
}
}
}
productFlavors {
}
lintOptions {
disable 'MissingTranslation'
lintConfig file("lint.xml")
}
}
// how to configure the sentry android gradle plugin
sentry {
// Disables or enables the automatic configuration of Native symbols
uploadNativeSymbols true
// Does or doesn't include the source code of native code for Sentry
includeNativeSources true
}
String env_keys_json_file = System.getenv("keys_json_file")
if (env_keys_json_file != null) {
apply plugin: 'com.github.triplet.play'
play {
serviceAccountCredentials = file(String.valueOf(env_keys_json_file))
// Deactivate lower conflicting version APKs
resolutionStrategy = "ignore"
switch (System.env.TIER) {
case 'beta':
track = 'beta'
break
case 'stable':
track = 'production'
break
default:
track = 'alpha'
}
println "TIER set to $track"
}
}
repositories {
flatDir {
dirs 'libs'
}
google()
jcenter()
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.2.0-alpha02'
implementation 'com.google.android.material:material:1.0.0'
api(name: 'keyman-engine', ext: 'aar')
implementation 'io.sentry:sentry-android:2.0.1'
implementation 'androidx.preference:preference:1.1.0'
// Add dependency for generating QR Codes
// (Even though it's embedded in KMEA, because we're manually copying keyman-engine.aar,
// we "lose" it in the dependency management)
implementation ('com.github.kenglxn.QRGen:android:2.6.0') {
transitive = true
}
}
/*def void dumpProperties(it){
//println "Examining $it.name:"
//println "Meta:"
//println it.metaClass.metaMethods*.name.sort().unique()
//println "Methods:"
//println it.metaClass.methods*.name.sort().unique()
//println "Depends On:"
//println it.dependsOn.collect({it*.getName()})
println "Properties:"
println it.properties.entrySet()*.toString()
.sort().toString().replaceAll(", ","\n")
}*/
apply plugin: 'com.google.gms.google-services'