144 lines
No EOL
5.9 KiB
Groovy
144 lines
No EOL
5.9 KiB
Groovy
plugins {
|
|
id 'com.android.application'
|
|
id 'kotlin-android'
|
|
id 'kotlin-kapt'
|
|
}
|
|
|
|
android {
|
|
compileSdkVersion 30
|
|
buildToolsVersion "30.0.3"
|
|
|
|
defaultConfig {
|
|
applicationId "org.fnives.test.showcase"
|
|
minSdkVersion 21
|
|
targetSdkVersion 30
|
|
versionCode 1
|
|
versionName "1.0"
|
|
buildConfigField "String", "BASE_URL", '"https://606844a10add49001733fe6b.mockapi.io/"'
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
buildFeatures {
|
|
viewBinding true
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = '1.8'
|
|
}
|
|
|
|
sourceSets {
|
|
androidTest {
|
|
java.srcDirs += "src/sharedTest/java"
|
|
}
|
|
test {
|
|
java.srcDirs += "src/sharedTest/java"
|
|
java.srcDirs += "src/robolectricTest/java"
|
|
}
|
|
}
|
|
|
|
testOptions.unitTests.all {
|
|
useJUnitPlatform()
|
|
testLogging {
|
|
events 'started', 'passed', 'skipped', 'failed'
|
|
exceptionFormat "full"
|
|
showStandardStreams true
|
|
}
|
|
}
|
|
testOptions {
|
|
unitTests {
|
|
includeAndroidResources = true
|
|
}
|
|
}
|
|
// needed for androidTest
|
|
packagingOptions {
|
|
exclude 'META-INF/LGPL2.1'
|
|
exclude 'META-INF/AL2.0'
|
|
exclude 'META-INF/LICENSE.md'
|
|
exclude 'META-INF/LICENSE-notice.md'
|
|
}
|
|
|
|
lintOptions {
|
|
warningsAsErrors true
|
|
abortOnError true
|
|
textReport true
|
|
ignore 'Overdraw'
|
|
textOutput "stdout"
|
|
}
|
|
}
|
|
|
|
afterEvaluate {
|
|
// making sure the :mockserver is assembled after :clean when running tests
|
|
testDebugUnitTest.dependsOn tasks.getByPath(':mockserver:assemble')
|
|
testReleaseUnitTest.dependsOn tasks.getByPath(':mockserver:assemble')
|
|
}
|
|
|
|
dependencies {
|
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
implementation "androidx.core:core-ktx:$androidx_core_version"
|
|
implementation "androidx.appcompat:appcompat:$androidx_appcompat_version"
|
|
implementation "com.google.android.material:material:$androidx_material_version"
|
|
implementation "androidx.constraintlayout:constraintlayout:$androidx_constraintlayout_version"
|
|
implementation "androidx.lifecycle:lifecycle-livedata-core-ktx:$androidx_livedata_version"
|
|
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$androidx_livedata_version"
|
|
implementation "androidx.swiperefreshlayout:swiperefreshlayout:$androidx_swiperefreshlayout_version"
|
|
|
|
// Koin
|
|
implementation "org.koin:koin-androidx-scope:$koin_version"
|
|
implementation "org.koin:koin-androidx-viewmodel:$koin_version"
|
|
implementation "org.koin:koin-androidx-fragment:$koin_version"
|
|
|
|
implementation "androidx.room:room-runtime:$androidx_room_version"
|
|
kapt "androidx.room:room-compiler:$androidx_room_version"
|
|
implementation "androidx.room:room-ktx:$androidx_room_version"
|
|
|
|
implementation "io.coil-kt:coil:$coil_version"
|
|
|
|
implementation project(":core")
|
|
releaseImplementation project(":core")
|
|
|
|
testImplementation "androidx.room:room-testing:$androidx_room_version"
|
|
testImplementation "org.junit.jupiter:junit-jupiter-engine:$testing_junit5_version"
|
|
testImplementation "org.junit.jupiter:junit-jupiter-params:$testing_junit5_version"
|
|
testImplementation "org.mockito.kotlin:mockito-kotlin:$testing_kotlin_mockito_version"
|
|
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines_version"
|
|
testImplementation "com.jraska.livedata:testing-ktx:$testing_livedata_version"
|
|
testImplementation "org.koin:koin-test:$koin_version"
|
|
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$testing_junit5_version"
|
|
|
|
// robolectric specific
|
|
testImplementation "junit:junit:$testing_junit4_version"
|
|
testImplementation "org.robolectric:robolectric:$testing_robolectric_version"
|
|
testImplementation "androidx.test:core:$testing_androidx_code_version"
|
|
testImplementation "androidx.test:runner:$testing_androidx_code_version"
|
|
testImplementation "androidx.test.ext:junit:$testing_androidx_junit_version"
|
|
testImplementation "androidx.test.espresso:espresso-core:$testing_espresso_version"
|
|
testImplementation "androidx.test.espresso:espresso-intents:$testing_espresso_version"
|
|
testImplementation project(':mockserver')
|
|
testImplementation "com.jakewharton.espresso:okhttp3-idling-resource:$testing_okhttp3_idling_resource_version"
|
|
testImplementation "androidx.arch.core:core-testing:$testing_androidx_arch_core_version"
|
|
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:$testing_junit5_version"
|
|
|
|
androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines_version"
|
|
androidTestImplementation "org.koin:koin-test:$koin_version"
|
|
androidTestImplementation "junit:junit:$testing_junit4_version"
|
|
androidTestImplementation "androidx.test:core:$testing_androidx_code_version"
|
|
androidTestImplementation "androidx.test:runner:$testing_androidx_code_version"
|
|
androidTestImplementation "androidx.test.ext:junit:$testing_androidx_junit_version"
|
|
androidTestImplementation "androidx.test.espresso:espresso-core:$testing_espresso_version"
|
|
androidTestImplementation "androidx.test.espresso:espresso-intents:$testing_espresso_version"
|
|
androidTestImplementation project(':mockserver')
|
|
androidTestImplementation "com.jakewharton.espresso:okhttp3-idling-resource:$testing_okhttp3_idling_resource_version"
|
|
androidTestImplementation "androidx.arch.core:core-testing:$testing_androidx_arch_core_version"
|
|
androidTestRuntimeOnly "org.junit.vintage:junit-vintage-engine:$testing_junit5_version"
|
|
} |