mirror of
https://github.com/NiciDieNase/chaosflix
synced 2024-11-10 06:44:17 +00:00
start converting to Kotlin Gradle DSL
This commit is contained in:
parent
94f3f45d87
commit
66e1ddc3e5
12 changed files with 490 additions and 484 deletions
56
build.gradle
56
build.gradle
|
@ -1,56 +0,0 @@
|
|||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.3.21'
|
||||
repositories {
|
||||
mavenLocal()
|
||||
google()
|
||||
jcenter()
|
||||
maven { url "https://plugins.gradle.org/m2/" }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.4.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath "org.jlleitschuh.gradle:ktlint-gradle:7.4.0"
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
google()
|
||||
jcenter()
|
||||
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
||||
maven { url 'https://jitpack.io' }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ext{
|
||||
touchVersionCode = 37
|
||||
touchVersionName = "0.5.0"
|
||||
leanbackVersionCode = 20
|
||||
leanbackVersionName = "0.5.0"
|
||||
|
||||
minSDK = 22
|
||||
targetSDK = 28
|
||||
compileSdkVersion = 28
|
||||
buildToolsVersion = "28.0.3"
|
||||
supportLibraryVersion = "28.0.0"
|
||||
constraintLayoutVersion = "1.1.3"
|
||||
archCompVersion = "1.1.1"
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
|
||||
apply plugin: "org.jlleitschuh.gradle.ktlint-idea"
|
||||
|
||||
subprojects {
|
||||
apply plugin: "org.jlleitschuh.gradle.ktlint"
|
||||
}
|
||||
|
42
build.gradle.kts
Normal file
42
build.gradle.kts
Normal file
|
@ -0,0 +1,42 @@
|
|||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
import java.net.URI
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
google()
|
||||
jcenter()
|
||||
maven("https://plugins.gradle.org/m2/")
|
||||
// maven { url = URI("https://plugins.gradle.org/m2/") }
|
||||
}
|
||||
dependencies {
|
||||
classpath("com.android.tools.build","gradle","3.4.0")
|
||||
classpath("org.jetbrains.kotlin","kotlin-gradle-plugin", "1.3.21")
|
||||
classpath("org.jlleitschuh.gradle","ktlint-gradle","7.4.0")
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
google()
|
||||
jcenter()
|
||||
maven { url = URI("https://oss.sonatype.org/content/repositories/snapshots/") }
|
||||
maven { url = URI("https://jitpack.io") }
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("clean", Delete::class) {
|
||||
delete(rootProject.buildDir)
|
||||
}
|
||||
|
||||
apply(plugin = "org.jlleitschuh.gradle.ktlint-idea")
|
||||
|
||||
subprojects {
|
||||
apply(plugin = "org.jlleitschuh.gradle.ktlint")
|
||||
}
|
||||
|
7
buildSrc/build.gradle.kts
Normal file
7
buildSrc/build.gradle.kts
Normal file
|
@ -0,0 +1,7 @@
|
|||
plugins {
|
||||
`kotlin-dsl`
|
||||
}
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
}
|
0
buildSrc/settings.gradle.kts
Normal file
0
buildSrc/settings.gradle.kts
Normal file
|
@ -1,132 +0,0 @@
|
|||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-kapt'
|
||||
|
||||
android {
|
||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||
buildToolsVersion rootProject.ext.buildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion rootProject.ext.minSDK
|
||||
targetSdkVersion rootProject.ext.targetSDK
|
||||
versionCode 1
|
||||
versionName '2.0.0'
|
||||
|
||||
javaCompileOptions {
|
||||
annotationProcessorOptions {
|
||||
arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
|
||||
}
|
||||
}
|
||||
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
|
||||
buildConfigField "String", "STREAMING_API_BASE_URL", "\"https://streaming.media.ccc.de\""
|
||||
buildConfigField "String", "STREAMING_API_OFFERS_PATH", "\"/streams/v2.json\""
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
minifyEnabled false
|
||||
useProguard false
|
||||
}
|
||||
|
||||
release {
|
||||
minifyEnabled true
|
||||
useProguard true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions "stage", "libs"
|
||||
|
||||
productFlavors {
|
||||
prod {
|
||||
dimension "stage"
|
||||
buildConfigField "String", "APPCENTER_ID", appcenterId
|
||||
}
|
||||
|
||||
dev {
|
||||
dimension "stage"
|
||||
buildConfigField "String", "APPCENTER_ID", appcenterDevId
|
||||
}
|
||||
|
||||
mock {
|
||||
dimension "stage"
|
||||
buildConfigField "String", "APPCENTER_ID", appcenterDevId
|
||||
buildConfigField "String", "STREAMING_API_BASE_URL", "\"https://gist.githubusercontent.com\""
|
||||
buildConfigField "String", "STREAMING_API_OFFERS_PATH", "\"/NiciDieNase/1ca017f180242f0ee683a1f592efc4ed/raw/0104592b57f4b29863fd0684a510462af276f30e/example_streams_v2.json\""
|
||||
}
|
||||
|
||||
free {
|
||||
dimension "libs"
|
||||
}
|
||||
noFree{
|
||||
dimension "libs"
|
||||
}
|
||||
}
|
||||
|
||||
variantFilter { variant ->
|
||||
if (variant.buildType.name == "mockRelease") {
|
||||
setIgnore(true)
|
||||
}
|
||||
}
|
||||
|
||||
dataBinding {
|
||||
enabled = true
|
||||
}
|
||||
|
||||
testOptions {
|
||||
unitTests {
|
||||
includeAndroidResources = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api "com.android.support:appcompat-v7:${rootProject.ext.supportLibraryVersion}"
|
||||
|
||||
api "android.arch.lifecycle:extensions:${rootProject.ext.archCompVersion}"
|
||||
kapt "android.arch.lifecycle:compiler:${rootProject.ext.archCompVersion}"
|
||||
api "android.arch.lifecycle:common-java8:${rootProject.ext.archCompVersion}"
|
||||
|
||||
api "android.arch.persistence.room:runtime:${rootProject.ext.archCompVersion}"
|
||||
kapt "android.arch.persistence.room:compiler:${rootProject.ext.archCompVersion}"
|
||||
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
|
||||
|
||||
api 'com.google.android.exoplayer:exoplayer:2.9.6'
|
||||
|
||||
implementation 'com.fasterxml.jackson.module:jackson-module-kotlin:2.9.0'
|
||||
|
||||
api "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
||||
api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
|
||||
api 'commons-io:commons-io:2.4'
|
||||
|
||||
def appCenterSdkVersion = '1.11.4'
|
||||
noFreeImplementation "com.microsoft.appcenter:appcenter-analytics:${appCenterSdkVersion}"
|
||||
noFreeImplementation "com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}"
|
||||
|
||||
debugImplementation 'com.facebook.stetho:stetho:1.4.2'
|
||||
debugImplementation 'com.facebook.stetho:stetho-okhttp3:1.4.2'
|
||||
debugImplementation 'com.facebook.stetho:stetho-okhttp:1.4.2'
|
||||
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.3'
|
||||
|
||||
testImplementation "org.mockito:mockito-core:2.11.0"
|
||||
testImplementation 'junit:junit:4.12'
|
||||
testImplementation 'org.robolectric:robolectric:4.1'
|
||||
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1', {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
})
|
||||
|
||||
}
|
136
common/build.gradle.kts
Normal file
136
common/build.gradle.kts
Normal file
|
@ -0,0 +1,136 @@
|
|||
import org.gradle.internal.impldep.org.junit.experimental.categories.Categories.CategoryFilter.exclude
|
||||
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
kotlin("android")
|
||||
kotlin("kapt")
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion (rootProject.ext.compileSdkVersion)
|
||||
buildToolsVersion (rootProject.ext.buildToolsVersion)
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion = rootProject.ext.minSDK
|
||||
targetSdkVersion = rootProject.ext.targetSDK
|
||||
versionCode = 1
|
||||
versionName = "2.0.0"
|
||||
|
||||
javaCompileOptions {
|
||||
annotationProcessorOptions {
|
||||
arguments = mapOf("room.schemaLocation" to "$projectDir/schemas".toString())
|
||||
}
|
||||
}
|
||||
|
||||
testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"
|
||||
|
||||
buildConfigField("String", "STREAMING_API_BASE_URL", "\"https://streaming.media.ccc.de\"")
|
||||
buildConfigField("String", "STREAMING_API_OFFERS_PATH", "\"/streams/v2.json\"")
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError = false
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
minifyEnabled = false
|
||||
useProguard = false
|
||||
}
|
||||
|
||||
release {
|
||||
minifyEnabled=true
|
||||
useProguard=true
|
||||
proguardFiles(getDefaultProguardFile("proguard-android.txt"),"proguard-rules.pro")
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions("stage", "libs")
|
||||
|
||||
productFlavors {
|
||||
prod {
|
||||
dimension("stage")
|
||||
buildConfigField("String", "APPCENTER_ID", appcenterId)
|
||||
}
|
||||
|
||||
dev {
|
||||
dimension("stage")
|
||||
buildConfigField("String", "APPCENTER_ID", appcenterDevId)
|
||||
}
|
||||
|
||||
mock {
|
||||
dimension("stage")
|
||||
buildConfigField("String", "APPCENTER_ID", appcenterDevId)
|
||||
buildConfigField("String", "STREAMING_API_BASE_URL", "\"https://gist.githubusercontent.com\"")
|
||||
buildConfigField("String", "STREAMING_API_OFFERS_PATH", "\"/NiciDieNase/1ca017f180242f0ee683a1f592efc4ed/raw/0104592b57f4b29863fd0684a510462af276f30e/example_streams_v2.json\"")
|
||||
}
|
||||
|
||||
free {
|
||||
dimension("libs")
|
||||
}
|
||||
noFree{
|
||||
dimension("libs")
|
||||
}
|
||||
}
|
||||
|
||||
variantFilter { variant ->
|
||||
if (variant.buildType.name == "mockRelease") {
|
||||
setIgnore(true)
|
||||
}
|
||||
}
|
||||
|
||||
dataBinding {
|
||||
enabled = true
|
||||
}
|
||||
|
||||
testOptions {
|
||||
unitTests {
|
||||
includeAndroidResources = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api ( "com.android.support:appcompat-v7:${rootProject.ext.supportLibraryVersion}" )
|
||||
|
||||
api ( "android.arch.lifecycle:extensions:${rootProject.ext.archCompVersion}" )
|
||||
kapt ( "android.arch.lifecycle:compiler:${rootProject.ext.archCompVersion}" )
|
||||
api ( "android.arch.lifecycle:common-java8:${rootProject.ext.archCompVersion}" )
|
||||
|
||||
api ( "android.arch.persistence.room:runtime:${rootProject.ext.archCompVersion}" )
|
||||
kapt ( "android.arch.persistence.room:compiler:${rootProject.ext.archCompVersion}" )
|
||||
|
||||
implementation ( "com.squareup.retrofit2:retrofit:2.3.0" )
|
||||
implementation ( "com.squareup.retrofit2:converter-gson:2.3.0" )
|
||||
|
||||
api ( "com.google.android.exoplayer:exoplayer:2.9.6" )
|
||||
|
||||
implementation ( "com.fasterxml.jackson.module:jackson-module-kotlin:2.9.0" )
|
||||
|
||||
api ( "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" )
|
||||
api ( "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" )
|
||||
|
||||
api ( "commons-io:commons-io:2.4" )
|
||||
|
||||
val appCenterSdkVersion = "1.11.4"
|
||||
noFreeImplementation ( "com.microsoft.appcenter:appcenter-analytics:${appCenterSdkVersion}" )
|
||||
noFreeImplementation ( "com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}" )
|
||||
|
||||
debugImplementation ( "com.facebook.stetho:stetho:1.4.2" )
|
||||
debugImplementation ( "com.facebook.stetho:stetho-okhttp3:1.4.2" )
|
||||
debugImplementation ( "com.facebook.stetho:stetho-okhttp:1.4.2" )
|
||||
debugImplementation ( "com.squareup.leakcanary:leakcanary-android:1.6.3" )
|
||||
|
||||
testImplementation ( "org.mockito:mockito-core:2.11.0" )
|
||||
testImplementation ( "junit:junit:4.12" )
|
||||
testImplementation ( "org.robolectric:robolectric:4.1" )
|
||||
androidTestImplementation ("com.android.support.test.espresso:espresso-core:3.0.1"){
|
||||
exclude( "com.android.support", "support-annotations")
|
||||
}
|
||||
|
||||
}
|
|
@ -1,134 +0,0 @@
|
|||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-kapt'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
|
||||
String appName = "Chaosflix"
|
||||
|
||||
android {
|
||||
buildToolsVersion '27.0.3'
|
||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||
buildToolsVersion rootProject.ext.buildToolsVersion
|
||||
defaultConfig {
|
||||
applicationId "de.nicidienase.chaosflix"
|
||||
manifestPlaceholders = [label: appName]
|
||||
minSdkVersion rootProject.ext.minSDK
|
||||
targetSdkVersion rootProject.ext.targetSDK
|
||||
// odd for touch, even for leanback
|
||||
versionCode rootProject.ext.leanbackVersionCode
|
||||
versionName rootProject.ext.leanbackVersionName
|
||||
// multiDexEnabled true
|
||||
}
|
||||
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."
|
||||
}
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
debug {
|
||||
manifestPlaceholders = [label: appName + "-dev"]
|
||||
minifyEnabled false
|
||||
useProguard false
|
||||
}
|
||||
release {
|
||||
useProguard false
|
||||
minifyEnabled false
|
||||
shrinkResources false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
|
||||
if (project.hasProperty("chaosflixKeystore") && file(chaosflixKeystore).exists() && file(chaosflixKeystore).isFile()) {
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions "stage", "libs"
|
||||
|
||||
productFlavors {
|
||||
prod {
|
||||
dimension "stage"
|
||||
}
|
||||
dev {
|
||||
dimension "stage"
|
||||
applicationIdSuffix ".dev"
|
||||
}
|
||||
mock {
|
||||
dimension "stage"
|
||||
applicationIdSuffix ".mock"
|
||||
}
|
||||
free {
|
||||
dimension "libs"
|
||||
}
|
||||
noFree{
|
||||
dimension "libs"
|
||||
}
|
||||
}
|
||||
|
||||
variantFilter { variant ->
|
||||
if (variant.buildType.name == "mockRelease") {
|
||||
setIgnore(true)
|
||||
}
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
exclude 'META-INF/ASL2.0'
|
||||
exclude 'META-INF/LICENSE'
|
||||
exclude 'META-INF/license.txt'
|
||||
exclude 'META-INF/NOTICE'
|
||||
exclude 'META-INF/notice.txt'
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
dataBinding {
|
||||
enabled = true
|
||||
}
|
||||
|
||||
buildToolsVersion rootProject.ext.buildToolsVersion
|
||||
}
|
||||
|
||||
configurations {
|
||||
mockDebugCompile
|
||||
prodDebugCompile
|
||||
prodReleaseCompile
|
||||
}
|
||||
|
||||
|
||||
dependencies {
|
||||
implementation project(':common')
|
||||
implementation "com.android.support:cardview-v7:${rootProject.ext.supportLibraryVersion}"
|
||||
implementation "com.android.support:design:${rootProject.ext.supportLibraryVersion}"
|
||||
implementation "com.android.support:leanback-v17:${rootProject.ext.supportLibraryVersion}"
|
||||
implementation "com.android.support:preference-leanback-v17:${rootProject.ext.supportLibraryVersion}"
|
||||
implementation "com.android.support:recyclerview-v7:${rootProject.ext.supportLibraryVersion}"
|
||||
implementation 'com.google.android.exoplayer:extension-leanback:2.9.6'
|
||||
implementation 'com.github.bumptech.glide:glide:4.6.1'
|
||||
androidTestImplementation('com.android.support.test:rules:0.5') {
|
||||
exclude module: 'support-annotations'
|
||||
}
|
||||
androidTestImplementation('com.android.support.test:runner:0.5') {
|
||||
exclude module: 'support-annotations'
|
||||
}
|
||||
androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.3'
|
||||
androidTestImplementation 'org.hamcrest:hamcrest-library:1.3'
|
||||
androidTestImplementation 'com.squareup.okhttp3:mockwebserver:3.6.0'
|
||||
}
|
136
leanback/build.gradle.kts
Normal file
136
leanback/build.gradle.kts
Normal file
|
@ -0,0 +1,136 @@
|
|||
plugins {
|
||||
id("com.android.application")
|
||||
kotlin("android")
|
||||
kotlin("kapt")
|
||||
kotlin("android-extensions")
|
||||
}
|
||||
|
||||
val appName = "Chaosflix"
|
||||
|
||||
android {
|
||||
buildToolsVersion = "27.0.3"
|
||||
compileSdkVersion = rootProject.ext.compileSdkVersion
|
||||
buildToolsVersion = rootProject.ext.buildToolsVersion
|
||||
defaultConfig {
|
||||
applicationId = "de.nicidienase.chaosflix"
|
||||
manifestPlaceholders = [label: appName]
|
||||
minSdkVersion = rootProject.ext.minSDK
|
||||
targetSdkVersion = rootProject.ext.targetSDK
|
||||
// odd for touch, even for leanback
|
||||
versionCode = rootProject.ext.leanbackVersionCode
|
||||
versionName = rootProject.ext.leanbackVersionName
|
||||
// multiDexEnabled true
|
||||
}
|
||||
signingConfigs {
|
||||
//noinspection GroovyMissingReturnStatement, GroovyAssignabilityCheck
|
||||
getByName("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.")
|
||||
}
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
getByName("debug") {
|
||||
manifestPlaceholders = [label = appName + "-dev"]
|
||||
minifyEnabled = false
|
||||
useProguard = false
|
||||
}
|
||||
getByName("release") {
|
||||
useProguard = false
|
||||
minifyEnabled = false
|
||||
shrinkResources = false
|
||||
proguardFiles(getDefaultProguardFile("proguard-android.txt"),"proguard-rules.pro")
|
||||
if (project.hasProperty("chaosflixKeystore") && file(chaosflixKeystore).exists() && file(chaosflixKeystore).isFile()) {
|
||||
signingConfig = signingConfigs.release
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions "stage", "libs"
|
||||
|
||||
productFlavors {
|
||||
prod {
|
||||
dimension = "stage"
|
||||
}
|
||||
dev {
|
||||
dimension = "stage"
|
||||
applicationIdSuffix ".dev"
|
||||
}
|
||||
mock {
|
||||
dimension = "stage"
|
||||
applicationIdSuffix ".mock"
|
||||
}
|
||||
free {
|
||||
dimension = "libs"
|
||||
}
|
||||
noFree{
|
||||
dimension = "libs"
|
||||
}
|
||||
}
|
||||
|
||||
variantFilter { variant ->
|
||||
if (variant.buildType.name == "mockRelease") {
|
||||
setIgnore(true)
|
||||
}
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
exclude("META-INF/ASL2.0")
|
||||
exclude("META-INF/LICENSE")
|
||||
exclude("META-INF/license.txt")
|
||||
exclude("META-INF/NOTICE")
|
||||
exclude("META-INF/notice.txt")
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError = false
|
||||
}
|
||||
|
||||
dataBinding {
|
||||
enabled = true
|
||||
}
|
||||
|
||||
buildToolsVersion = rootProject.ext.buildToolsVersion
|
||||
}
|
||||
|
||||
configurations {
|
||||
mockDebugCompile
|
||||
prodDebugCompile
|
||||
prodReleaseCompile
|
||||
}
|
||||
|
||||
|
||||
dependencies {
|
||||
implementation(project(":common"))
|
||||
implementation("com.android.support:cardview-v7:${rootProject.ext.supportLibraryVersion}")
|
||||
implementation("com.android.support:design:${rootProject.ext.supportLibraryVersion}")
|
||||
implementation("com.android.support:leanback-v17:${rootProject.ext.supportLibraryVersion}")
|
||||
implementation("com.android.support:preference-leanback-v17:${rootProject.ext.supportLibraryVersion}")
|
||||
implementation("com.android.support:recyclerview-v7:${rootProject.ext.supportLibraryVersion}")
|
||||
implementation("com.google.android.exoplayer:extension-leanback:2.9.6")
|
||||
implementation("com.github.bumptech.glide:glide:4.6.1")
|
||||
androidTestImplementation("com.android.support.test:rules:0.5") {
|
||||
exclude module: "support-annotations"
|
||||
}
|
||||
androidTestImplementation("com.android.support.test:runner:0.5") {
|
||||
exclude module: "support-annotations"
|
||||
}
|
||||
androidTestImplementation("com.android.support.test.uiautomator:uiautomator-v18:2.1.3")
|
||||
androidTestImplementation("org.hamcrest:hamcrest-library:1.3")
|
||||
androidTestImplementation("com.squareup.okhttp3:mockwebserver:3.6.0")
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
include ':touch', ':common', ':leanback'
|
1
settings.gradle.kts
Normal file
1
settings.gradle.kts
Normal file
|
@ -0,0 +1 @@
|
|||
include(":touch", ":common", ":leanback")
|
|
@ -1,161 +0,0 @@
|
|||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-kapt'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
|
||||
String appName = "Chaosflix"
|
||||
|
||||
android {
|
||||
|
||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||
buildToolsVersion rootProject.ext.buildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
applicationId "de.nicidienase.chaosflix"
|
||||
minSdkVersion rootProject.ext.minSDK
|
||||
targetSdkVersion rootProject.ext.targetSDK
|
||||
manifestPlaceholders = [label: appName]
|
||||
// odd for touch, even for leanback
|
||||
versionCode rootProject.ext.touchVersionCode
|
||||
versionName rootProject.ext.touchVersionName
|
||||
}
|
||||
|
||||
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."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
applicationIdSuffix ".dev"
|
||||
manifestPlaceholders = [label: appName + "-dev"]
|
||||
minifyEnabled false
|
||||
useProguard false
|
||||
}
|
||||
release {
|
||||
useProguard true
|
||||
minifyEnabled true
|
||||
shrinkResources true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'),
|
||||
'proguard-rules.pro'
|
||||
if (project.hasProperty("chaosflixKeystore") && file(chaosflixKeystore).exists() && file(chaosflixKeystore).isFile()) {
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions "stage", "libs"
|
||||
|
||||
productFlavors {
|
||||
prod {
|
||||
dimension "stage"
|
||||
}
|
||||
dev {
|
||||
dimension "stage"
|
||||
applicationIdSuffix ".dev"
|
||||
}
|
||||
mock {
|
||||
dimension "stage"
|
||||
applicationIdSuffix ".mock"
|
||||
}
|
||||
free {
|
||||
dimension "libs"
|
||||
}
|
||||
noFree{
|
||||
dimension "libs"
|
||||
}
|
||||
}
|
||||
|
||||
variantFilter { variant ->
|
||||
if (variant.buildType.name == "mockRelease") {
|
||||
setIgnore(true)
|
||||
}
|
||||
}
|
||||
packagingOptions {
|
||||
exclude 'META-INF/ASL2.0'
|
||||
exclude 'META-INF/LICENSE'
|
||||
exclude 'META-INF/license.txt'
|
||||
exclude 'META-INF/NOTICE'
|
||||
exclude 'META-INF/notice.txt'
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
dataBinding {
|
||||
enabled = true
|
||||
}
|
||||
|
||||
testOptions {
|
||||
unitTests {
|
||||
includeAndroidResources = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
mockDebugCompile
|
||||
prodDebugCompile
|
||||
prodReleaseCompile
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':common')
|
||||
implementation('com.mikepenz:aboutlibraries:6.1.1@aar') {
|
||||
transitive = true
|
||||
}
|
||||
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}"
|
||||
implementation "com.android.support.constraint:constraint-layout:${rootProject.ext.constraintLayoutVersion}"
|
||||
implementation "com.android.support:design:${rootProject.ext.supportLibraryVersion}"
|
||||
implementation "com.android.support:preference-v14:${rootProject.ext.supportLibraryVersion}"
|
||||
implementation "com.android.support:mediarouter-v7:${rootProject.ext.supportLibraryVersion}"
|
||||
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'
|
||||
}
|
||||
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'
|
||||
// implementation 'com.gu:option:1.3'
|
||||
implementation 'com.github.guardian:Option:-SNAPSHOT'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
testImplementation 'org.mockito:mockito-core:2.11.0'
|
||||
testImplementation 'org.robolectric:robolectric:4.1'
|
||||
androidTestImplementation('com.android.support.test:rules:0.5') {
|
||||
exclude module: 'support-annotations'
|
||||
}
|
||||
androidTestImplementation('com.android.support.test:runner:0.5') {
|
||||
exclude module: 'support-annotations'
|
||||
}
|
||||
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', {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
}
|
||||
}
|
168
touch/build.gradle.kts
Normal file
168
touch/build.gradle.kts
Normal file
|
@ -0,0 +1,168 @@
|
|||
import org.gradle.internal.impldep.com.amazonaws.PredefinedClientConfigurations.defaultConfig
|
||||
import de.nicidienase.chaosflix.build.Versions
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
kotlin("android")
|
||||
kotlin("kapt")
|
||||
kotlin("android.extensions")
|
||||
}
|
||||
|
||||
val appName: String = "Chaosflix"
|
||||
|
||||
android {
|
||||
|
||||
compileSdkVersion(rootProject.ext.compileSdkVersion)
|
||||
buildToolsVersion (rootProject.ext.buildToolsVersion )
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "de.nicidienase.chaosflix"
|
||||
minSdkVersion(22)
|
||||
targetSdkVersion(28)
|
||||
manifestPlaceholders = [label to appName]
|
||||
// odd for touch, even for leanback
|
||||
versionCode = rootProject.ext.touchVersionCode
|
||||
versionName = rootProject.ext.touchVersionName
|
||||
testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
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."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
applicationIdSuffix = ".dev"
|
||||
manifestPlaceholders = [label: appName + "-dev"]
|
||||
minifyEnabled = false
|
||||
useProguard = false
|
||||
}
|
||||
release {
|
||||
useProguard = true
|
||||
minifyEnabled = true
|
||||
shrinkResources = true
|
||||
proguardFiles = getDefaultProguardFile("proguard-android.txt"),"proguard-rules.pro"
|
||||
if (project.hasProperty("chaosflixKeystore") && file(chaosflixKeystore).exists() && file(chaosflixKeystore).isFile()) {
|
||||
signingConfig = signingConfigs.release
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions "stage", "libs"
|
||||
|
||||
productFlavors {
|
||||
create("prod") {
|
||||
require(this is ExtensionAware)
|
||||
dimension = "stage"
|
||||
}
|
||||
create("dev") {
|
||||
require(this is ExtensionAware)
|
||||
dimension = "stage"
|
||||
applicationIdSuffix = ".dev"
|
||||
}
|
||||
create("mock") {
|
||||
require(this is ExtensionAware)
|
||||
dimension = "stage"
|
||||
applicationIdSuffix = ".mock"
|
||||
}
|
||||
create("free") {
|
||||
require(this is ExtensionAware)
|
||||
dimension = "libs"
|
||||
}
|
||||
create("noFree"){
|
||||
require(this is ExtensionAware)
|
||||
dimension = "libs"
|
||||
}
|
||||
}
|
||||
|
||||
variantFilter { variant ->
|
||||
if (variant.buildType.name == "mockRelease") {
|
||||
setIgnore(true)
|
||||
}
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
exclude("META-INF/ASL2.0")
|
||||
exclude("META-INF/LICENSE")
|
||||
exclude("META-INF/license.txt")
|
||||
exclude("META-INF/NOTICE")
|
||||
exclude("META-INF/notice.txt")
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError = false
|
||||
}
|
||||
|
||||
dataBinding {
|
||||
enabled = true
|
||||
}
|
||||
|
||||
testOptions {
|
||||
unitTests {
|
||||
includeAndroidResources = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
mockDebugCompile
|
||||
prodDebugCompile
|
||||
prodReleaseCompile
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":common"))
|
||||
implementation("com.mikepenz:aboutlibraries:6.1.1@aar") {
|
||||
transitive = true
|
||||
}
|
||||
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}")
|
||||
implementation ("com.android.support.constraint:constraint-layout:${rootProject.ext.constraintLayoutVersion}")
|
||||
implementation ("com.android.support:design:${rootProject.ext.supportLibraryVersion}")
|
||||
implementation ("com.android.support:preference-v14:${rootProject.ext.supportLibraryVersion}")
|
||||
implementation ("com.android.support:mediarouter-v7:${rootProject.ext.supportLibraryVersion}")
|
||||
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"
|
||||
}
|
||||
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")
|
||||
// implementation ("com.gu:option:1.3")
|
||||
implementation ("com.github.guardian:Option:-SNAPSHOT")
|
||||
testImplementation ("junit:junit:4.12")
|
||||
testImplementation ("org.mockito:mockito-core:2.11.0")
|
||||
testImplementation ("org.robolectric:robolectric:4.1")
|
||||
androidTestImplementation("com.android.support.test:rules:0.5") {
|
||||
exclude module: "support-annotations"
|
||||
}
|
||||
androidTestImplementation("com.android.support.test:runner:0.5") {
|
||||
exclude module: "support-annotations"
|
||||
}
|
||||
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", {
|
||||
exclude group: "com.android.support", module: "support-annotations"
|
||||
})
|
||||
}
|
Loading…
Reference in a new issue