chaosflix/touch/build.gradle

165 lines
5.5 KiB
Groovy
Raw Normal View History

2017-09-18 22:27:10 +02:00
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
2017-10-12 18:27:41 +02:00
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
2017-09-18 22:27:10 +02:00
2018-12-17 20:08:59 +01:00
String appName = "Chaosflix"
2017-09-18 22:27:10 +02:00
android {
2019-05-01 13:04:17 +02:00
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
2019-05-01 13:04:17 +02:00
2017-09-18 22:27:10 +02:00
defaultConfig {
2019-04-24 23:10:00 +02:00
applicationId "de.nicidienase.chaosflix"
minSdkVersion rootProject.ext.minSDK
targetSdkVersion rootProject.ext.targetSDK
2018-12-17 20:08:59 +01:00
manifestPlaceholders = [label: appName]
2017-11-11 16:12:21 +01:00
// odd for touch, even for leanback
versionCode rootProject.ext.touchVersionCode
versionName rootProject.ext.touchVersionName
2017-09-18 22:27:10 +02:00
}
2019-05-01 13:04:17 +02:00
2018-12-26 18:59:06 +01: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."
}
}
}
2019-05-01 13:04:17 +02:00
2017-09-18 22:27:10 +02:00
buildTypes {
debug {
2018-12-17 20:08:59 +01:00
applicationIdSuffix ".dev"
manifestPlaceholders = [label: appName + "-dev"]
2017-09-18 22:27:10 +02:00
minifyEnabled false
useProguard false
}
release {
2019-04-25 22:57:19 +02:00
useProguard true
minifyEnabled true
shrinkResources true
2017-09-18 22:27:10 +02:00
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
2018-12-26 18:59:06 +01:00
if (project.hasProperty("chaosflixKeystore") && file(chaosflixKeystore).exists() && file(chaosflixKeystore).isFile()) {
signingConfig signingConfigs.release
}
2017-09-18 22:27:10 +02:00
}
}
2019-05-01 13:04:17 +02:00
flavorDimensions "stage", "libs"
2019-05-01 13:04:17 +02:00
2018-12-21 17:15:53 +01:00
productFlavors {
prod {
dimension "stage"
}
dev {
dimension "stage"
applicationIdSuffix ".dev"
2019-05-04 16:33:12 +02:00
manifestPlaceholders = [label: appName + "-Dev"]
}
mock {
dimension "stage"
applicationIdSuffix ".mock"
2019-05-04 16:33:12 +02:00
manifestPlaceholders = [label: appName + "-Mock"]
}
free {
dimension "libs"
}
noFree{
dimension "libs"
}
2018-12-21 17:15:53 +01:00
}
2018-12-23 19:23:05 +01:00
variantFilter { variant ->
2019-05-04 12:23:06 +02:00
def names = variant.flavors*.name
2019-05-04 23:16:22 +02:00
if (name.contains("prod") && name.contains("Debug")){
2018-12-23 19:23:05 +01:00
setIgnore(true)
}
}
2019-05-04 12:23:06 +02:00
2017-09-18 22:27:10 +02: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 13:04:17 +02:00
2017-09-18 22:27:10 +02:00
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
2019-05-01 13:04:17 +02:00
2017-09-18 22:27:10 +02:00
defaultConfig {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
2019-05-01 13:04:17 +02:00
2017-09-18 22:27:10 +02:00
lintOptions {
abortOnError false
}
2019-05-01 13:04:17 +02:00
2017-09-24 20:53:12 +02:00
dataBinding {
enabled = true
}
2019-05-01 13:04:17 +02:00
testOptions {
unitTests {
includeAndroidResources = true
}
}
2017-09-18 22:27:10 +02:00
}
2018-12-21 17:15:53 +01:00
configurations {
mockDebugCompile
prodDebugCompile
prodReleaseCompile
}
2017-09-18 22:27:10 +02:00
dependencies {
2018-09-08 18:54:21 +02:00
implementation project(':common')
2018-09-07 08:35:11 +02:00
implementation('com.mikepenz:aboutlibraries:6.1.1@aar') {
2017-11-25 00:13:58 +01:00
transitive = true
}
2017-12-25 14:52:42 +01:00
implementation 'com.github.medyo:android-about-page:1.2.2'
implementation "com.android.support:support-v4:${rootProject.ext.supportLibraryVersion}"
implementation "com.android.support:recyclerview-v7:${rootProject.ext.supportLibraryVersion}"
implementation "com.android.support:cardview-v7:${rootProject.ext.supportLibraryVersion}"
2018-12-10 01:27:02 +01:00
implementation "com.android.support.constraint:constraint-layout:${rootProject.ext.constraintLayoutVersion}"
2017-10-31 20:49:43 +01:00
implementation "com.android.support:design:${rootProject.ext.supportLibraryVersion}"
2017-12-25 15:55:21 +01:00
implementation "com.android.support:preference-v14:${rootProject.ext.supportLibraryVersion}"
implementation "com.android.support:mediarouter-v7:${rootProject.ext.supportLibraryVersion}"
2019-04-25 22:57:19 +02:00
noFreeImplementation 'com.google.android.gms:play-services-cast-framework:16.2.0'
noFreeImplementation('pl.droidsonroids:casty:1.0.8') {
exclude group: 'com.android.support', module: 'appcompat-v7'
}
2017-10-31 20:49:43 +01:00
implementation 'com.fasterxml.jackson.module:jackson-module-kotlin:2.9.0'
implementation 'com.github.bumptech.glide:glide:4.6.1'
implementation 'net.opacapp:multiline-collapsingtoolbar:27.1.1'
implementation 'net.rdrei.android.dirchooser:library:3.2@aar'
2018-12-23 19:37:32 +01:00
// implementation 'com.gu:option:1.3'
implementation 'com.github.guardian:Option:-SNAPSHOT'
testImplementation 'junit:junit:4.12'
2018-12-10 01:27:02 +01:00
testImplementation 'org.mockito:mockito-core:2.11.0'
testImplementation 'org.robolectric:robolectric:4.1'
androidTestImplementation('com.android.support.test:rules:0.5') {
2017-09-18 22:27:10 +02:00
exclude module: 'support-annotations'
}
androidTestImplementation('com.android.support.test:runner:0.5') {
2017-09-18 22:27:10 +02:00
exclude module: 'support-annotations'
}
2017-10-31 20:49:43 +01:00
androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.3'
androidTestImplementation 'org.hamcrest:hamcrest-library:1.3'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2', {
2017-09-18 22:27:10 +02:00
exclude group: 'com.android.support', module: 'support-annotations'
}
}