mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-06 00:45:32 +00:00
Removing Answers because of the setup involved with Fabric IO. Keeping this feature to Crashlytics
129 lines
3.5 KiB
Groovy
129 lines
3.5 KiB
Groovy
apply plugin: 'com.android.application'
|
|
apply plugin: 'com.github.triplet.play'
|
|
apply plugin: 'io.fabric'
|
|
|
|
android {
|
|
compileSdkVersion 25
|
|
buildToolsVersion "26.0.2"
|
|
playAccountConfigs {
|
|
defaultAccountConfig {
|
|
if (project.hasProperty("keys_json_file")) {
|
|
jsonFile = file(project.ext.keys_json_file)
|
|
}
|
|
}
|
|
}
|
|
defaultConfig {
|
|
applicationId "com.tavultesoft.kmapro"
|
|
minSdkVersion 15
|
|
targetSdkVersion 25
|
|
|
|
//dumpProperties(project.ext) // Use this to dump all external properties for debugging TeamCity integration
|
|
|
|
if (project.hasProperty("services_json_file")) {
|
|
println "Copying production google-services.json and using at kMAPro/"
|
|
copy {
|
|
from project.ext.services_json_file
|
|
include '*.json'
|
|
into './'
|
|
}
|
|
}
|
|
|
|
if (project.hasProperty("build.number")) {
|
|
versionCode project.ext['build_counter'] as Integer
|
|
// Because TeamCity does not bubble build.counter into system properties...
|
|
versionName "${project.ext['build.number']}"
|
|
} else {
|
|
versionCode 100
|
|
versionName '10.0.0.0'
|
|
}
|
|
|
|
playAccountConfig = playAccountConfigs.defaultAccountConfig
|
|
}
|
|
|
|
if (project.hasProperty("release_store_file")) {
|
|
signingConfigs {
|
|
release {
|
|
storeFile file(project.ext.release_store_file)
|
|
storePassword project.ext.release_store_password
|
|
keyAlias project.ext.release_key_alias
|
|
keyPassword project.ext.release_key_password
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
applicationIdSuffix ".debug"
|
|
}
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
|
if (project.hasProperty("release_store_file")) {
|
|
signingConfig signingConfigs.release
|
|
}
|
|
}
|
|
}
|
|
productFlavors {
|
|
}
|
|
|
|
lintOptions {
|
|
disable 'MissingTranslation'
|
|
}
|
|
|
|
play {
|
|
// Deactivate lower conflicting version APKs
|
|
untrackOld = true
|
|
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()
|
|
maven {
|
|
url 'https://maven.fabric.io/public'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
api(name: 'keyman-engine', ext: 'aar')
|
|
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
implementation 'com.android.support:support-v4:25.4.0'
|
|
implementation 'com.google.firebase:firebase-core:11.8.0'
|
|
implementation 'com.google.firebase:firebase-crash:11.8.0'
|
|
implementation('com.crashlytics.sdk.android:crashlytics:2.9.0@aar') {
|
|
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'
|