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