mirror of
https://github.com/theapache64/topcorn.git
synced 2025-08-06 13:48:36 +08:00
157 lines
6.2 KiB
Groovy
157 lines
6.2 KiB
Groovy
plugins {
|
|
id 'com.android.application'
|
|
id 'kotlin-android'
|
|
id 'kotlin-kapt'
|
|
id 'kotlin-android-extensions'
|
|
id "org.jetbrains.kotlin.plugin.allopen" version "$kotlin_version"
|
|
}
|
|
allOpen {
|
|
annotation("com.theapache64.topcorn.utils.test.OpenForTesting")
|
|
}
|
|
|
|
android {
|
|
compileSdkVersion compile_sdk_version
|
|
defaultConfig {
|
|
applicationId "com.theapache64.topcorn"
|
|
minSdkVersion min_sdk_version
|
|
targetSdkVersion target_sdk_version
|
|
versionCode 10404
|
|
versionName "1.0.4-alpha04"
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
multiDexEnabled true
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
|
|
buildFeatures {
|
|
dataBinding true
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = JavaVersion.VERSION_1_8.toString()
|
|
}
|
|
|
|
// Setting sharedTest file should be shared with both `test` and `androidTest`
|
|
sourceSets {
|
|
String sharedTestDir = 'src/sharedTest/java'
|
|
String resourceDir = 'src/sharedTest/resources'
|
|
test {
|
|
java.srcDir sharedTestDir
|
|
res.srcDirs resourceDir
|
|
}
|
|
androidTest {
|
|
java.srcDir sharedTestDir
|
|
res.srcDirs resourceDir
|
|
}
|
|
}
|
|
|
|
// Always show the result of every unit test when running via command line, even if it passes.
|
|
testOptions.unitTests {
|
|
includeAndroidResources true
|
|
returnDefaultValues true
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
|
|
//Core
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
implementation "androidx.appcompat:appcompat:$appcompat_version"
|
|
implementation "androidx.core:core-ktx:$ktx_version"
|
|
implementation "androidx.constraintlayout:constraintlayout:$constraint_version"
|
|
implementation "com.google.android.material:material:$material_version"
|
|
implementation "androidx.activity:activity-ktx:1.2.0-alpha04"
|
|
implementation "androidx.recyclerview:recyclerview:1.2.0-alpha03"
|
|
|
|
|
|
// Coroutines
|
|
def coroutines_version = '1.3.5'
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
|
|
|
|
// Lifecycle extension
|
|
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
|
|
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
|
|
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
|
|
|
|
// Dagger 2
|
|
def dagger_version = '2.27'
|
|
implementation "com.google.dagger:dagger:$dagger_version"
|
|
implementation "com.google.dagger:dagger-android-support:$dagger_version"
|
|
kapt "com.google.dagger:dagger-compiler:$dagger_version"
|
|
kapt "com.google.dagger:dagger-android-processor:$dagger_version"
|
|
|
|
|
|
// Retrofit
|
|
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
|
|
implementation 'com.squareup.okhttp3:logging-interceptor:4.2.1'
|
|
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofit_version"
|
|
|
|
// Moshi
|
|
implementation 'com.squareup.moshi:moshi:1.9.2'
|
|
|
|
|
|
// MaterialColors
|
|
implementation 'com.theah64.materialcolors:materialcolors:1.0.0'
|
|
|
|
// TwinKill
|
|
def twinkill_version = '1.0.0-alpha06'
|
|
implementation "com.theapache64.twinkill:core:$twinkill_version"
|
|
implementation "com.theapache64.twinkill:logger:$twinkill_version"
|
|
implementation "com.theapache64.twinkill:network:$twinkill_version"
|
|
implementation "com.theapache64.twinkill:google_sans:$twinkill_version"
|
|
|
|
// Room
|
|
def room_version = "2.2.5"
|
|
implementation "androidx.room:room-runtime:$room_version"
|
|
implementation "androidx.room:room-ktx:$room_version"
|
|
kapt "androidx.room:room-compiler:$room_version"
|
|
|
|
// Test Support
|
|
implementation "androidx.test.espresso:espresso-idling-resource:$espresso_version"
|
|
|
|
// Test
|
|
testImplementation "junit:junit:$junit_version"
|
|
testImplementation "org.mockito:mockito-core:$mockito_version"
|
|
testImplementation "org.mockito:mockito-inline:$mockito_version"
|
|
testImplementation('com.winterbe:expekt:0.5.0') {
|
|
exclude group: "org.jetbrains.kotlin"
|
|
}
|
|
|
|
testImplementation "androidx.arch.core:core-testing:2.1.0"
|
|
testImplementation "androidx.test.ext:junit:1.1.1"
|
|
testImplementation "androidx.test.espresso:espresso-core:$espresso_version"
|
|
testImplementation "androidx.test.espresso:espresso-intents:$espresso_version"
|
|
testImplementation "androidx.test.espresso:espresso-contrib:$espresso_version"
|
|
testImplementation 'androidx.test:runner:1.2.0'
|
|
testImplementation 'androidx.test:rules:1.2.0'
|
|
testImplementation "androidx.fragment:fragment-testing:1.3.0-alpha04"
|
|
testImplementation "org.robolectric:robolectric:4.3.1"
|
|
testImplementation 'com.github.fabioCollini.daggermock:daggermock:0.8.5'
|
|
testImplementation 'com.github.fabioCollini.daggermock:daggermock-kotlin:0.8.5'
|
|
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines_version"
|
|
|
|
androidTestImplementation "androidx.arch.core:core-testing:2.1.0"
|
|
androidTestImplementation "androidx.test.ext:junit:1.1.1"
|
|
androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_version"
|
|
androidTestImplementation "androidx.test.espresso:espresso-intents:$espresso_version"
|
|
androidTestImplementation "androidx.test.espresso:espresso-contrib:$espresso_version"
|
|
androidTestImplementation 'androidx.test:runner:1.2.0'
|
|
androidTestImplementation 'androidx.test:rules:1.2.0'
|
|
androidTestImplementation "org.mockito:mockito-core:$mockito_version"
|
|
androidTestImplementation "org.mockito:mockito-android:$mockito_version"
|
|
androidTestImplementation "androidx.fragment:fragment-testing:1.3.0-alpha04"
|
|
androidTestImplementation 'com.github.fabioCollini.daggermock:daggermock:0.8.5'
|
|
androidTestImplementation 'com.github.fabioCollini.daggermock:daggermock-kotlin:0.8.5'
|
|
androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines_version"
|
|
}
|