antimine-android/common/build.gradle

106 lines
3.2 KiB
Groovy
Raw Normal View History

2020-02-07 01:50:47 +00:00
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
2020-06-20 15:01:27 +00:00
apply plugin: 'dagger.hilt.android.plugin'
2020-02-07 01:50:47 +00:00
android {
2020-07-01 02:52:35 +00:00
compileSdkVersion 30
2020-02-07 01:50:47 +00:00
defaultConfig {
// versionCode and versionName must be hardcoded to support F-droid
2020-07-31 14:09:25 +00:00
versionCode 703021
versionName '7.3.2'
minSdkVersion 16
2020-07-01 02:52:35 +00:00
targetSdkVersion 30
2020-03-11 02:22:46 +00:00
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
2020-02-07 01:50:47 +00:00
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
2020-02-07 01:50:47 +00:00
}
2020-06-20 15:01:27 +00:00
kapt {
correctErrorTypes true
}
hilt {
enableTransformForLocalTests true
}
2020-02-07 01:50:47 +00:00
dependencies {
// Dependencies must be hardcoded to support F-droid
2020-02-07 01:50:47 +00:00
implementation fileTree(dir: 'libs', include: ['*.jar'])
// AndroidX
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.preference:preference:1.1.1'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.activity:activity-ktx:1.1.0'
2020-06-27 23:36:53 +00:00
implementation "androidx.fragment:fragment-ktx:1.2.5"
2020-03-11 02:22:46 +00:00
// Constraint
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
2020-02-07 01:50:47 +00:00
// Lifecycle
api 'android.arch.lifecycle:extensions:1.1.1'
implementation 'android.arch.lifecycle:viewmodel:1.1.1'
2020-02-07 01:50:47 +00:00
// Dagger
2020-06-23 01:55:46 +00:00
implementation 'com.google.dagger:hilt-android:2.28.1-alpha'
kapt 'com.google.dagger:hilt-android-compiler:2.28.1-alpha'
testImplementation 'com.google.dagger:hilt-android-testing:2.28.1-alpha'
kaptTest 'com.google.dagger:hilt-android-compiler:2.28.1-alpha'
2020-06-20 15:01:27 +00:00
implementation "androidx.hilt:hilt-lifecycle-viewmodel:1.0.0-alpha01"
kapt "androidx.hilt:hilt-compiler:1.0.0-alpha01"
2020-02-07 01:50:47 +00:00
// Room
api 'androidx.room:room-runtime:2.2.5'
api 'androidx.room:room-ktx:2.2.5'
kapt 'androidx.room:room-compiler:2.2.5'
testImplementation 'androidx.room:room-testing:2.2.5'
2020-02-07 01:50:47 +00:00
// Moshi - Json
api 'com.squareup.moshi:moshi:1.9.1'
api 'com.squareup.moshi:moshi-kotlin:1.9.1'
kapt 'com.squareup.moshi:moshi-kotlin-codegen:1.9.1'
2020-02-07 01:50:47 +00:00
// Coroutines
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.5'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.5'
2020-07-16 12:50:35 +00:00
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.3.5'
2020-02-07 01:50:47 +00:00
2020-03-08 14:43:32 +00:00
// Kotlin Lib
2020-07-01 02:52:35 +00:00
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72'
2020-02-07 01:50:47 +00:00
2020-03-08 14:43:32 +00:00
// Unit Tests
2020-07-01 02:52:35 +00:00
testImplementation 'junit:junit:4.13'
testImplementation 'org.mockito:mockito-core:2.24.0'
testImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0'
2020-06-28 03:54:24 +00:00
testImplementation "io.mockk:mockk:1.10.0"
2020-02-07 01:50:47 +00:00
2020-03-08 14:43:32 +00:00
// Core library
androidTestImplementation 'androidx.test:core:1.2.0'
2020-03-08 14:43:32 +00:00
// AndroidJUnitRunner and JUnit Rules
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test:rules:1.2.0'
androidTestUtil 'androidx.test:orchestrator:1.2.0'
2020-02-07 01:50:47 +00:00
}
2020-04-29 16:57:32 +00:00
tasks.withType(Test) {
testLogging {
exceptionFormat "full"
}
afterTest { desc, result ->
println "Executing test ${desc.name} [${desc.className}] with result: ${result.resultType}"
}
}