2017-09-18 19:56:00 +00:00
|
|
|
apply plugin: 'com.android.library'
|
2017-10-04 21:03:23 +00:00
|
|
|
apply plugin: 'kotlin-android'
|
2017-10-26 22:21:39 +00:00
|
|
|
apply plugin: 'kotlin-kapt'
|
2020-01-07 21:27:27 +00:00
|
|
|
apply plugin: "de.mannodermaus.android-junit5"
|
2017-09-18 19:56:00 +00:00
|
|
|
|
2019-11-09 19:06:41 +00:00
|
|
|
String versionString = new File("versionfile").text.trim()
|
|
|
|
|
2017-09-18 19:56:00 +00:00
|
|
|
android {
|
2017-10-04 20:23:56 +00:00
|
|
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
|
|
|
buildToolsVersion rootProject.ext.buildToolsVersion
|
2017-09-18 19:56:00 +00:00
|
|
|
|
|
|
|
defaultConfig {
|
2018-01-08 23:15:20 +00:00
|
|
|
minSdkVersion rootProject.ext.minSDK
|
2017-10-04 20:23:56 +00:00
|
|
|
targetSdkVersion rootProject.ext.targetSDK
|
2017-09-18 19:56:00 +00:00
|
|
|
versionCode 1
|
2019-11-09 19:06:41 +00:00
|
|
|
versionName versionString
|
2017-09-18 19:56:00 +00:00
|
|
|
|
2018-10-28 16:58:34 +00:00
|
|
|
javaCompileOptions {
|
|
|
|
annotationProcessorOptions {
|
|
|
|
arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-11-19 21:45:53 +00:00
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
2017-09-18 19:56:00 +00:00
|
|
|
|
2019-05-01 14:50:56 +00:00
|
|
|
buildConfigField "String", "STREAMING_API_BASE_URL", "\"https://streaming.media.ccc.de\""
|
|
|
|
buildConfigField "String", "STREAMING_API_OFFERS_PATH", "\"/streams/v2.json\""
|
2018-12-21 20:52:29 +00:00
|
|
|
}
|
2018-12-21 16:15:53 +00:00
|
|
|
|
2017-09-18 19:56:00 +00:00
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
}
|
|
|
|
|
2019-05-01 11:04:17 +00:00
|
|
|
lintOptions {
|
|
|
|
abortOnError false
|
|
|
|
}
|
|
|
|
|
2017-09-18 19:56:00 +00:00
|
|
|
buildTypes {
|
2018-12-18 23:16:51 +00:00
|
|
|
debug {
|
2018-12-22 19:50:44 +00:00
|
|
|
minifyEnabled false
|
2018-12-18 23:16:51 +00:00
|
|
|
}
|
2018-12-21 16:15:53 +00:00
|
|
|
|
2017-09-18 19:56:00 +00:00
|
|
|
release {
|
2018-12-22 19:50:44 +00:00
|
|
|
minifyEnabled true
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
|
2017-09-18 19:56:00 +00:00
|
|
|
}
|
2018-12-21 16:15:53 +00:00
|
|
|
}
|
|
|
|
|
2019-05-01 14:50:56 +00:00
|
|
|
flavorDimensions "stage", "libs"
|
2018-12-21 16:15:53 +00:00
|
|
|
|
|
|
|
productFlavors {
|
|
|
|
prod {
|
2019-05-01 14:50:56 +00:00
|
|
|
dimension "stage"
|
|
|
|
}
|
|
|
|
|
|
|
|
dev {
|
|
|
|
dimension "stage"
|
2018-12-21 16:15:53 +00:00
|
|
|
}
|
2018-12-18 23:16:51 +00:00
|
|
|
|
2018-12-21 16:15:53 +00:00
|
|
|
mock {
|
2019-05-01 14:50:56 +00:00
|
|
|
dimension "stage"
|
2018-12-22 19:50:44 +00:00
|
|
|
buildConfigField "String", "STREAMING_API_BASE_URL", "\"https://gist.githubusercontent.com\""
|
2018-12-27 16:51:59 +00:00
|
|
|
buildConfigField "String", "STREAMING_API_OFFERS_PATH", "\"/NiciDieNase/1ca017f180242f0ee683a1f592efc4ed/raw/0104592b57f4b29863fd0684a510462af276f30e/example_streams_v2.json\""
|
2018-12-18 23:16:51 +00:00
|
|
|
}
|
2019-05-01 14:50:56 +00:00
|
|
|
|
|
|
|
free {
|
|
|
|
dimension "libs"
|
2020-02-08 15:49:34 +00:00
|
|
|
|
|
|
|
ext {
|
|
|
|
prod = null
|
|
|
|
dev = null
|
|
|
|
mock = null
|
|
|
|
}
|
2019-05-01 14:50:56 +00:00
|
|
|
}
|
|
|
|
noFree{
|
|
|
|
dimension "libs"
|
2020-02-08 15:49:34 +00:00
|
|
|
ext {
|
|
|
|
if(project.hasProperty("appcenterId")){
|
|
|
|
prod = appcenterId
|
|
|
|
} else {
|
|
|
|
prod = null
|
|
|
|
println "AppcenterId not set"
|
|
|
|
}
|
|
|
|
if(project.hasProperty("appcenterDevId")){
|
|
|
|
dev = appcenterDevId
|
|
|
|
mock = appcenterDevId
|
|
|
|
} else {
|
|
|
|
dev = null
|
|
|
|
mock = null
|
|
|
|
println "AppcenterId not set"
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2019-05-01 14:50:56 +00:00
|
|
|
}
|
2017-09-18 19:56:00 +00:00
|
|
|
}
|
2020-02-08 15:49:34 +00:00
|
|
|
|
|
|
|
libraryVariants.all { variant ->
|
|
|
|
def flavors = variant.productFlavors
|
|
|
|
// flavorDimensions "stage" -> 0, "libs" -> 1
|
|
|
|
def stage = flavors[0]
|
|
|
|
def libs = flavors[1]
|
|
|
|
|
|
|
|
variant.buildConfigField "String", "APPCENTER_ID", "${libs[stage.name]}"
|
|
|
|
}
|
|
|
|
|
2018-12-23 18:23:05 +00:00
|
|
|
variantFilter { variant ->
|
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-12-26 23:04:15 +00:00
|
|
|
lintOptions.abortOnError = false
|
|
|
|
dataBinding.enabled = true
|
|
|
|
testOptions.unitTests.includeAndroidResources = true
|
2017-09-18 19:56:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2019-11-11 21:51:57 +00:00
|
|
|
api "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
|
|
|
api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
|
|
|
2019-12-26 23:04:15 +00:00
|
|
|
api 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0'
|
|
|
|
api 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0'
|
2019-11-11 21:51:57 +00:00
|
|
|
|
2019-11-19 21:45:53 +00:00
|
|
|
api 'androidx.appcompat:appcompat:1.1.0'
|
2017-09-18 20:27:10 +00:00
|
|
|
|
2019-12-28 23:44:23 +00:00
|
|
|
def lifecycle_version = "2.1.0"
|
|
|
|
api "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
|
|
|
|
api "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
|
|
|
|
api "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
|
2019-11-19 21:45:53 +00:00
|
|
|
|
2019-12-26 23:04:15 +00:00
|
|
|
api 'androidx.recyclerview:recyclerview:1.1.0'
|
|
|
|
|
|
|
|
def roomVersion = "2.2.3"
|
2019-11-19 21:45:53 +00:00
|
|
|
api "androidx.room:room-runtime:$roomVersion"
|
|
|
|
kapt "androidx.room:room-compiler:$roomVersion"
|
|
|
|
api "androidx.room:room-ktx:$roomVersion"
|
2017-10-04 21:03:23 +00:00
|
|
|
|
2020-01-02 17:10:41 +00:00
|
|
|
implementation 'com.squareup.retrofit2:retrofit:2.6.3'
|
2019-11-11 21:51:57 +00:00
|
|
|
implementation 'com.squareup.retrofit2:converter-gson:2.6.2'
|
2017-10-31 19:49:53 +00:00
|
|
|
|
2019-12-28 23:44:23 +00:00
|
|
|
api "com.google.code.gson:gson:2.8.6"
|
2019-04-25 17:51:24 +00:00
|
|
|
api 'com.google.android.exoplayer:exoplayer:2.9.6'
|
|
|
|
|
2019-11-11 21:51:57 +00:00
|
|
|
api 'com.github.bumptech.glide:glide:4.9.0'
|
2019-06-06 22:29:56 +00:00
|
|
|
|
2018-12-10 00:27:02 +00:00
|
|
|
implementation 'com.fasterxml.jackson.module:jackson-module-kotlin:2.9.0'
|
2018-09-11 21:02:17 +00:00
|
|
|
|
2018-12-10 00:27:02 +00:00
|
|
|
|
|
|
|
api 'commons-io:commons-io:2.4'
|
|
|
|
|
2019-11-11 21:51:57 +00:00
|
|
|
def appCenterSdkVersion = '2.2.0'
|
2019-05-01 15:30:19 +00:00
|
|
|
noFreeImplementation "com.microsoft.appcenter:appcenter-analytics:${appCenterSdkVersion}"
|
|
|
|
noFreeImplementation "com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}"
|
2019-05-04 10:23:40 +00:00
|
|
|
noFreeImplementation "com.microsoft.appcenter:appcenter-distribute:${appCenterSdkVersion}"
|
2019-05-01 15:30:19 +00:00
|
|
|
|
2019-11-11 21:51:57 +00:00
|
|
|
debugImplementation 'com.facebook.stetho:stetho:1.5.0'
|
2018-12-10 00:27:02 +00:00
|
|
|
debugImplementation 'com.facebook.stetho:stetho-okhttp3:1.4.2'
|
|
|
|
debugImplementation 'com.facebook.stetho:stetho-okhttp:1.4.2'
|
2019-12-26 11:46:04 +00:00
|
|
|
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.0'
|
2018-09-11 21:02:17 +00:00
|
|
|
|
2020-01-07 21:27:27 +00:00
|
|
|
testImplementation "io.mockk:mockk:1.9"
|
2019-02-10 18:11:26 +00:00
|
|
|
testImplementation 'org.robolectric:robolectric:4.1'
|
2019-11-19 21:45:53 +00:00
|
|
|
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
|
2017-09-18 19:56:00 +00:00
|
|
|
exclude group: 'com.android.support', module: 'support-annotations'
|
|
|
|
})
|
|
|
|
|
2020-01-07 21:27:27 +00:00
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-api:5.5.2"
|
|
|
|
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.5.2"
|
|
|
|
|
|
|
|
testImplementation "junit:junit:4.12"
|
|
|
|
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:5.5.2"
|
|
|
|
|
2018-12-10 22:03:23 +00:00
|
|
|
}
|