chaosflix/leanback/build.gradle

143 lines
4.4 KiB
Groovy
Raw Normal View History

2018-09-09 13:26:33 +00:00
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
2018-09-11 19:43:25 +00:00
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
2018-12-17 19:08:59 +00:00
String appName = "Chaosflix"
String versionString = new File("versionfile").text.trim()
2018-12-17 19:08:59 +00:00
2018-09-09 13:26:33 +00:00
android {
2018-09-09 13:56:56 +00:00
buildToolsVersion '27.0.3'
2018-09-09 13:26:33 +00:00
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
applicationId "de.nicidienase.chaosflix"
2018-12-17 19:08:59 +00:00
manifestPlaceholders = [label: appName]
2018-09-09 13:26:33 +00:00
minSdkVersion rootProject.ext.minSDK
targetSdkVersion rootProject.ext.targetSDK
// odd for touch, even for leanback
versionCode rootProject.ext.leanbackVersionCode
versionName versionString
// multiDexEnabled true
2019-05-04 21:52:03 +00:00
if(project.hasProperty("versionCode")){
versionCode = project.property("versionCode") as int
2019-05-04 21:52:03 +00:00
println "Setting VersionCode from property: $versionCode"
}
2018-09-09 13:26:33 +00:00
}
2018-12-26 17:59:06 +00:00
signingConfigs {
//noinspection GroovyMissingReturnStatement, GroovyAssignabilityCheck
release {
if (project.hasProperty("chaosflixKeystore") && file(chaosflixKeystore).exists() && file(chaosflixKeystore).isFile()) {
println "Release app signing is configured: will sign APK"
storeFile file(chaosflixKeystore)
storePassword chaosflixStorePassword
keyAlias chaosflixKeyName
keyPassword chaosflixKeyPassword
} else {
println "App signing data not found. Will not sign."
}
}
}
2018-09-09 13:26:33 +00:00
buildTypes {
debug {
2019-05-06 20:48:29 +00:00
applicationIdSuffix ".debug"
manifestPlaceholders = [label: appName + "-debug"]
2018-09-09 13:26:33 +00:00
minifyEnabled false
useProguard false
}
release {
2019-11-12 20:09:19 +00:00
useProguard true
minifyEnabled true
shrinkResources true
2018-12-22 19:50:44 +00:00
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
2018-12-26 17:59:06 +00:00
if (project.hasProperty("chaosflixKeystore") && file(chaosflixKeystore).exists() && file(chaosflixKeystore).isFile()) {
signingConfig signingConfigs.release
}
2018-09-09 13:26:33 +00:00
}
}
2019-05-01 11:04:17 +00:00
flavorDimensions "stage", "libs"
2019-05-01 11:04:17 +00:00
2018-12-21 16:15:53 +00:00
productFlavors {
prod {
dimension "stage"
}
dev {
dimension "stage"
applicationIdSuffix ".dev"
2019-05-04 14:33:12 +00:00
manifestPlaceholders = [label: appName + "-Dev"]
}
mock {
dimension "stage"
applicationIdSuffix ".mock"
2019-05-04 14:33:12 +00:00
manifestPlaceholders = [label: appName + "-Mock"]
}
free {
dimension "libs"
}
noFree{
dimension "libs"
}
2018-12-21 16:15:53 +00:00
}
2018-12-23 18:23:05 +00:00
variantFilter { variant ->
2019-05-04 10:23:06 +00:00
def names = variant.flavors*.name
2019-05-04 21:16:22 +00:00
if (name.contains("prod") && name.contains("Debug")){
2018-12-23 18:23:05 +00:00
setIgnore(true)
}
}
2019-05-04 10:23:06 +00:00
2018-09-09 13:26:33 +00:00
packagingOptions {
exclude 'META-INF/ASL2.0'
exclude 'META-INF/LICENSE'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/notice.txt'
}
2019-05-01 11:04:17 +00:00
2018-09-09 13:26:33 +00:00
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
2019-05-01 11:04:17 +00:00
2018-09-09 13:26:33 +00:00
defaultConfig {
2019-11-19 21:45:53 +00:00
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2018-09-09 13:26:33 +00:00
}
2019-05-01 11:04:17 +00:00
2018-09-09 13:26:33 +00:00
lintOptions {
abortOnError false
}
2019-05-01 11:04:17 +00:00
dataBinding {
enabled = true
}
2019-05-01 11:04:17 +00:00
buildToolsVersion rootProject.ext.buildToolsVersion
2018-09-09 13:26:33 +00:00
}
2018-12-21 16:15:53 +00:00
configurations {
mockDebugCompile
prodDebugCompile
prodReleaseCompile
}
2018-09-09 13:26:33 +00:00
dependencies {
2018-09-10 21:03:24 +00:00
implementation project(':common')
2019-11-19 21:45:53 +00:00
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.leanback:leanback:1.0.0'
implementation 'androidx.leanback:leanback-preference:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
2019-04-25 17:51:24 +00:00
implementation 'com.google.android.exoplayer:extension-leanback:2.9.6'
2019-11-19 21:45:53 +00:00
androidTestImplementation('androidx.test:rules:1.1.1') {
2018-09-09 13:26:33 +00:00
exclude module: 'support-annotations'
}
2019-11-19 21:45:53 +00:00
androidTestImplementation('androidx.test.ext:junit:1.1.1') {
2018-09-09 13:26:33 +00:00
exclude module: 'support-annotations'
}
2019-11-19 21:45:53 +00:00
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
2018-09-09 13:26:33 +00:00
androidTestImplementation 'org.hamcrest:hamcrest-library:1.3'
androidTestImplementation 'com.squareup.okhttp3:mockwebserver:3.6.0'
}