Simple-Calculator/app/build.gradle

85 lines
2.5 KiB
Groovy
Raw Normal View History

2015-12-24 12:28:00 +01:00
apply plugin: 'com.android.application'
2017-10-22 15:37:36 +02:00
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
2015-12-24 12:28:00 +01:00
android {
2017-10-22 15:37:36 +02:00
compileSdkVersion 26
buildToolsVersion '26.0.2'
2016-04-25 22:45:24 +02:00
2015-12-24 12:28:00 +01:00
defaultConfig {
2016-02-28 15:56:08 +01:00
applicationId "com.simplemobiletools.calculator"
2015-12-24 12:28:00 +01:00
minSdkVersion 16
2017-10-22 15:37:36 +02:00
targetSdkVersion 26
2017-11-05 20:52:25 +01:00
versionCode 13
versionName "2.0.0"
2015-12-29 12:49:48 +01:00
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
2015-12-24 12:28:00 +01:00
}
2016-04-25 22:23:03 +02:00
2016-04-25 22:19:28 +02:00
signingConfigs {
release
}
2016-04-25 22:23:03 +02:00
2015-12-24 12:28:00 +01:00
buildTypes {
release {
2016-01-04 23:19:39 +01:00
minifyEnabled true
2015-12-24 12:28:00 +01:00
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2016-04-25 22:19:28 +02:00
signingConfig signingConfigs.release
2015-12-24 12:28:00 +01:00
}
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
2015-12-24 12:28:00 +01:00
}
dependencies {
compile 'com.simplemobiletools:commons:2.35.6'
compile 'me.grantland:autofittextview:0.2.1'
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
2016-06-01 18:00:18 +02:00
2015-12-26 22:35:45 +01:00
testCompile 'junit:junit:4.12'
2017-11-05 20:43:09 +01:00
testCompile 'org.robolectric:robolectric:3.5.1'
2017-10-22 15:37:36 +02:00
androidTestCompile 'com.android.support:support-annotations:26.0.2'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
}
buildscript {
ext.kotlin_version = '1.1.51'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
}
2015-12-24 12:28:00 +01:00
}
2016-04-25 22:19:28 +02:00
def Properties props = new Properties()
def propFile = new File('signing.properties')
if (propFile.canRead()) {
props.load(new FileInputStream(propFile))
if (props != null && props.containsKey('STORE_FILE') && props.containsKey('KEY_ALIAS') && props.containsKey('PASSWORD')) {
2016-04-25 22:19:28 +02:00
android.signingConfigs.release.storeFile = file(props['STORE_FILE'])
android.signingConfigs.release.storePassword = props['PASSWORD']
2016-04-25 22:19:28 +02:00
android.signingConfigs.release.keyAlias = props['KEY_ALIAS']
android.signingConfigs.release.keyPassword = props['PASSWORD']
2016-04-25 22:19:28 +02:00
} else {
println 'signing.properties found but some entries are missing'
android.buildTypes.release.signingConfig = null
}
} else {
println 'signing.properties not found'
android.buildTypes.release.signingConfig = null
}