Add common configuration for android modules.
This commit is contained in:
parent
8f65b37605
commit
eb59e3ccc1
|
@ -25,7 +25,7 @@ jobs:
|
|||
- run:
|
||||
name: unit-tests
|
||||
command: |
|
||||
./gradlew ciTest :ultrasonic:testDebugUnitTest
|
||||
./gradlew ciTest testDebugUnitTest
|
||||
./gradlew jacocoFullReport
|
||||
bash <(curl -s https://codecov.io/bash)
|
||||
- run:
|
||||
|
|
|
@ -4,6 +4,7 @@ buildscript {
|
|||
|
||||
ext.bootstrap = [
|
||||
kotlinModule : "${project.rootDir}/gradle_scripts/kotlin-module-bootstrap.gradle",
|
||||
androidModule : "${project.rootDir}/gradle_scripts/android-module-bootstrap.gradle"
|
||||
]
|
||||
|
||||
repositories {
|
||||
|
|
|
@ -0,0 +1,70 @@
|
|||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
apply plugin: 'jacoco-android'
|
||||
apply from: "${project.rootDir}/gradle_scripts/code_quality.gradle"
|
||||
|
||||
androidExtensions {
|
||||
experimental = true
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion versions.compileSdk
|
||||
|
||||
defaultConfig {
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
minSdkVersion versions.minSdk
|
||||
targetSdkVersion versions.targetSdk
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main.java.srcDirs += "${projectDir}/src/main/kotlin"
|
||||
test.java.srcDirs += "${projectDir}/src/test/kotlin"
|
||||
test.java.srcDirs += "${projectDir}/src/integrationTest/kotlin"
|
||||
test.resources.srcDirs += "${projectDir}/src/integrationTest/resources"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
minifyEnabled false
|
||||
debuggable true
|
||||
}
|
||||
release {
|
||||
minifyEnabled false
|
||||
}
|
||||
}
|
||||
|
||||
// Disable generating BuildConfig class by default
|
||||
// Replace it with https://issuetracker.google.com/issues/72050365 once released.
|
||||
libraryVariants.all {
|
||||
generateBuildConfig.enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
dependencies {
|
||||
api other.kotlinStdlib
|
||||
}
|
||||
|
||||
jacoco {
|
||||
toolVersion(versions.jacoco)
|
||||
}
|
||||
|
||||
ext {
|
||||
jacocoExclude = []
|
||||
}
|
||||
|
||||
jacocoAndroidUnitTestReport {
|
||||
excludes += jacocoExclude
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
testDebugUnitTest.finalizedBy jacocoTestDebugUnitTestReport
|
||||
}
|
|
@ -44,6 +44,7 @@ test.finalizedBy jacocoTestReport
|
|||
test {
|
||||
jacoco {
|
||||
excludes += jacocoExclude
|
||||
includeNoLocationClasses = true
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,20 +1,7 @@
|
|||
apply from: bootstrap.androidModule
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion versions.compileSdk
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion versions.minSdk
|
||||
targetSdkVersion versions.targetSdk
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
||||
}
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
baselineFile file("lint-baseline.xml")
|
||||
abortOnError true
|
||||
|
|
|
@ -1,20 +1,6 @@
|
|||
apply plugin: 'com.android.library'
|
||||
apply from: bootstrap.androidModule
|
||||
|
||||
android {
|
||||
compileSdkVersion versions.compileSdk
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion versions.minSdk
|
||||
targetSdkVersion versions.targetSdk
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
||||
}
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
baselineFile file("lint-baseline.xml")
|
||||
abortOnError true
|
||||
|
|
|
@ -1,20 +1,6 @@
|
|||
apply plugin: 'com.android.library'
|
||||
apply from: bootstrap.androidModule
|
||||
|
||||
android {
|
||||
compileSdkVersion versions.compileSdk
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion versions.minSdk
|
||||
targetSdkVersion versions.targetSdk
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
||||
}
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
baselineFile file("lint-baseline.xml")
|
||||
abortOnError true
|
||||
|
|
|
@ -1,43 +1,14 @@
|
|||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply from: '../gradle_scripts/code_quality.gradle'
|
||||
apply plugin: 'jacoco'
|
||||
|
||||
|
||||
ext {
|
||||
jacocoExclude = []
|
||||
}
|
||||
|
||||
jacoco {
|
||||
toolVersion(versions.jacoco)
|
||||
}
|
||||
|
||||
tasks.withType(Test) {
|
||||
jacoco.includeNoLocationClasses = true
|
||||
}
|
||||
apply from: bootstrap.androidModule
|
||||
|
||||
android {
|
||||
compileSdkVersion(versions.compileSdk)
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion(versions.minSdk)
|
||||
targetSdkVersion(versions.targetSdk)
|
||||
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
test.java.srcDirs += 'src/test/kotlin'
|
||||
test.java.srcDirs += "${projectDir}/src/integrationTest/kotlin"
|
||||
test.resources.srcDirs += "${projectDir}/src/integrationTest/resources"
|
||||
libraryVariants.all {
|
||||
generateBuildConfig.enabled = true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api project(':domain')
|
||||
api project(':subsonic-api')
|
||||
api other.kotlinStdlib
|
||||
api(other.picasso) {
|
||||
exclude group: "com.android.support"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue