2020-02-10 22:40:29 +01:00
|
|
|
plugins {
|
|
|
|
id 'com.android.application'
|
|
|
|
id 'kotlin-android'
|
|
|
|
id 'kotlin-kapt'
|
|
|
|
id 'kotlin-android-extensions'
|
|
|
|
id 'com.github.triplet.play' version '2.6.2'
|
|
|
|
}
|
2017-09-18 22:27:10 +02:00
|
|
|
|
2018-12-17 20:08:59 +01:00
|
|
|
String appName = "Chaosflix"
|
2019-05-05 13:58:32 +02:00
|
|
|
String versionString = new File("versionfile").text.trim()
|
2018-12-17 20:08:59 +01:00
|
|
|
|
2017-09-18 22:27:10 +02:00
|
|
|
android {
|
2019-05-01 13:04:17 +02:00
|
|
|
|
2017-10-04 22:23:56 +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"
|
2017-10-04 22:23:56 +02:00
|
|
|
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
|
2020-02-09 23:54:26 +01:00
|
|
|
versionCode 1
|
2019-05-05 13:58:32 +02:00
|
|
|
versionName versionString
|
2019-05-04 23:52:03 +02:00
|
|
|
|
|
|
|
if(project.hasProperty("versionCode")){
|
2019-05-05 13:58:32 +02:00
|
|
|
versionCode = project.property("versionCode") as int
|
2019-05-04 23:52:03 +02:00
|
|
|
println "Setting VersionCode from property: $versionCode"
|
|
|
|
}
|
|
|
|
if(project.hasProperty("versionName")){
|
2019-05-05 13:58:32 +02:00
|
|
|
versionName = project.property("versionName") as String
|
|
|
|
println "Setting versionName from property: $versionName"
|
2019-05-04 23:52:03 +02:00
|
|
|
}
|
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 {
|
2019-05-06 22:48:29 +02:00
|
|
|
applicationIdSuffix ".debug"
|
|
|
|
manifestPlaceholders = [label: appName + "-debug"]
|
2017-09-18 22:27:10 +02:00
|
|
|
minifyEnabled false
|
|
|
|
}
|
|
|
|
release {
|
2019-04-25 22:57:19 +02:00
|
|
|
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()) {
|
2020-02-03 20:26:14 +01:00
|
|
|
|
2018-12-26 18:59:06 +01:00
|
|
|
signingConfig signingConfigs.release
|
|
|
|
}
|
2017-09-18 22:27:10 +02:00
|
|
|
}
|
|
|
|
}
|
2019-05-01 13:04:17 +02:00
|
|
|
|
2019-05-01 16:50:56 +02:00
|
|
|
flavorDimensions "stage", "libs"
|
2019-05-01 13:04:17 +02:00
|
|
|
|
2018-12-21 17:15:53 +01:00
|
|
|
productFlavors {
|
2019-02-07 22:20:07 +01:00
|
|
|
prod {
|
2019-05-01 16:50:56 +02:00
|
|
|
dimension "stage"
|
|
|
|
}
|
|
|
|
dev {
|
|
|
|
dimension "stage"
|
|
|
|
applicationIdSuffix ".dev"
|
2019-05-04 16:33:12 +02:00
|
|
|
manifestPlaceholders = [label: appName + "-Dev"]
|
2019-02-07 22:20:07 +01:00
|
|
|
}
|
|
|
|
mock {
|
2019-05-01 16:50:56 +02:00
|
|
|
dimension "stage"
|
|
|
|
applicationIdSuffix ".mock"
|
2019-05-04 16:33:12 +02:00
|
|
|
manifestPlaceholders = [label: appName + "-Mock"]
|
2019-02-07 22:20:07 +01:00
|
|
|
}
|
|
|
|
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
|
|
|
|
2019-12-27 00:04:15 +01:00
|
|
|
defaultConfig.testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
|
|
lintOptions.abortOnError false
|
|
|
|
dataBinding.enabled = true
|
|
|
|
testOptions.unitTests.includeAndroidResources = true
|
2020-02-10 22:40:29 +01:00
|
|
|
|
|
|
|
playConfigs {
|
|
|
|
prodNoFreeRelease {
|
|
|
|
enabled = 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'
|
2019-11-19 22:45:53 +01:00
|
|
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
|
|
|
implementation 'androidx.cardview:cardview:1.0.0'
|
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
2020-01-04 20:44:03 +01:00
|
|
|
implementation 'com.google.android.material:material:1.1.0-beta02'
|
2019-11-19 22:45:53 +01:00
|
|
|
implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
|
|
|
|
implementation 'androidx.mediarouter:mediarouter:1.1.0'
|
|
|
|
noFreeImplementation 'com.google.android.gms:play-services-cast-framework:17.1.0'
|
2019-02-07 22:20:07 +01:00
|
|
|
noFreeImplementation('pl.droidsonroids:casty:1.0.8') {
|
2018-12-16 19:25:21 +01:00
|
|
|
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'
|
2019-02-10 19:24:50 +01:00
|
|
|
|
2019-02-01 23:50:11 +01:00
|
|
|
implementation 'net.opacapp:multiline-collapsingtoolbar:27.1.1'
|
2018-01-03 03:59:10 +01:00
|
|
|
implementation 'net.rdrei.android.dirchooser:library:3.2@aar'
|
2018-12-11 00:43:49 +01:00
|
|
|
implementation 'com.github.guardian:Option:-SNAPSHOT'
|
2019-02-10 19:11:26 +01:00
|
|
|
testImplementation 'junit:junit:4.12'
|
2018-12-10 01:27:02 +01:00
|
|
|
testImplementation 'org.mockito:mockito-core:2.11.0'
|
2019-02-10 19:11:26 +01:00
|
|
|
testImplementation 'org.robolectric:robolectric:4.1'
|
2019-11-19 22:45:53 +01:00
|
|
|
androidTestImplementation('androidx.test:rules:1.1.1') {
|
2017-09-18 22:27:10 +02:00
|
|
|
exclude module: 'support-annotations'
|
|
|
|
}
|
2019-11-19 22:45:53 +01:00
|
|
|
androidTestImplementation('androidx.test.ext:junit:1.1.1') {
|
2017-09-18 22:27:10 +02:00
|
|
|
exclude module: 'support-annotations'
|
|
|
|
}
|
2019-11-19 22:45:53 +01:00
|
|
|
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
|
2017-10-31 20:49:43 +01:00
|
|
|
androidTestImplementation 'org.hamcrest:hamcrest-library:1.3'
|
2019-11-19 22:45:53 +01:00
|
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0', {
|
2017-09-18 22:27:10 +02:00
|
|
|
exclude group: 'com.android.support', module: 'support-annotations'
|
|
|
|
}
|
2020-02-10 22:40:29 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
play {
|
|
|
|
serviceAccountCredentials = file("../chaosflix-d1d09f33cbb2.json")
|
|
|
|
track = "alpha"
|
|
|
|
releaseStatus = "draft"
|
|
|
|
enabled = false
|
|
|
|
artifactDir = file("build/outputs/apk/prodNoFree/release/touch-prod-noFree-release.apk")
|
|
|
|
}
|