Created
November 29, 2020 08:31
-
-
Save theapache64/706b242cd53f921e205a91a9dc00c8ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id 'com.android.application' | |
id 'kotlin-android' | |
id 'kotlin-android-extensions' | |
id 'kotlin-kapt' | |
id 'dagger.hilt.android.plugin' | |
} | |
android { | |
compileSdkVersion 29 | |
buildToolsVersion "29.0.3" | |
defaultConfig { | |
applicationId "com.theapache64.nemo" | |
minSdkVersion 19 | |
targetSdkVersion 29 | |
versionCode 1 | |
versionName "1.0" | |
multiDexEnabled true | |
testInstrumentationRunner "com.theapache64.nemo.NemoTestRunner" | |
} | |
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 { | |
dataBinding true | |
} | |
kotlinOptions { | |
jvmTarget = '1.8' | |
} | |
androidExtensions { | |
experimental = true | |
} | |
// 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 "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" | |
implementation 'androidx.core:core-ktx:1.3.2' | |
implementation 'androidx.appcompat:appcompat:1.2.0' | |
implementation 'com.google.android.material:material:1.2.1' | |
implementation 'androidx.constraintlayout:constraintlayout:2.0.4' | |
implementation 'androidx.activity:activity-ktx:1.2.0-beta01' | |
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' | |
implementation 'androidx.fragment:fragment-ktx:1.3.0-beta01' | |
implementation "androidx.test.espresso:espresso-idling-resource:$espresso_version" | |
// Hilt | |
implementation "com.google.dagger:hilt-android:$hilt_version" | |
kapt "com.google.dagger:hilt-android-compiler:$hilt_version" | |
implementation "androidx.hilt:hilt-lifecycle-viewmodel:$androidx_hilt_version" | |
kapt "androidx.hilt:hilt-lifecycle-viewmodel:$androidx_hilt_version" | |
kapt "androidx.hilt:hilt-compiler:$androidx_hilt_version" | |
// Retrofit : A type-safe HTTP client for Android and Java. | |
implementation 'com.squareup.retrofit2:retrofit:2.9.0' | |
// Glide : A fast and efficient image loading library for Android focused on smooth scrolling. | |
implementation 'com.github.bumptech.glide:glide:4.11.0' | |
// Moshi : Moshi | |
implementation 'com.squareup.moshi:moshi:1.11.0' | |
// Converter: Moshi : A Retrofit Converter which uses Moshi for serialization. | |
implementation 'com.squareup.retrofit2:converter-moshi:2.9.0' | |
// Moshi Kotlin Codegen : Moshi Kotlin Codegen | |
kapt 'com.squareup.moshi:moshi-kotlin-codegen:1.11.0' | |
// LiveData Kotlin Extensions : Kotlin extensions for 'livedata' artifact | |
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.0-beta01' | |
// Material Components For Android : Material Components for Android is a static library that you can add to your Android | |
// application in order to use APIs that provide implementations of the Material Design | |
// specification. Compatible on devices running API 14 or later. | |
implementation 'com.google.android.material:material:1.3.0-alpha03' | |
// To turn spreadsheet to JSON endpoint | |
implementation 'com.theapache64:retrosheet:1.2.3' | |
// Timber : No-nonsense injectable logging. | |
implementation 'com.jakewharton.timber:timber:4.7.1' | |
implementation 'com.squareup.okhttp3:logging-interceptor:4.8.1' | |
// MaterialRatingBar Library : A Material Design RatingBar with consistent appearance | |
implementation 'me.zhanghai.android.materialratingbar:library:1.4.0' | |
// Android Preferences KTX : Kotlin extensions for preferences | |
implementation 'androidx.preference:preference-ktx:1.1.1' | |
// Calligraphy : Custom Font injection through styles and attributes. | |
implementation 'io.github.inflationx:calligraphy3:3.1.1' | |
// ViewPump : View inflation with pre/post-inflation interceptors | |
implementation 'io.github.inflationx:viewpump:2.0.3' | |
// Banner | |
implementation 'com.github.zhpanvip:BannerViewPager:3.1.6' | |
// CircleImageView : A fast circular ImageView for Android | |
implementation 'de.hdodenhof:circleimageview:3.1.0' | |
// 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" | |
// QuantityView | |
implementation 'me.himanshusoni.quantityview:quantity-view:1.2.0' | |
// **************************** UNIT TEST **************************** | |
// Mockito Core : Mockito mock objects library core API and implementation | |
testImplementation 'org.mockito:mockito-core:3.5.15' | |
testImplementation 'androidx.test.ext:junit:1.1.2' | |
testImplementation 'junit:junit:4.13.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 "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.3.5" | |
testImplementation "androidx.arch.core:core-testing:2.1.0" | |
testImplementation "androidx.test:core:1.3.0" | |
// Mockito Inline : Mockito preconfigured inline mock maker (intermediate and to be superseeded by automatic | |
// usage in a future version) | |
testImplementation 'org.mockito:mockito-inline:3.5.15' | |
// Expekt : An assertion library for Kotlin | |
testImplementation 'com.theapache64:expekt:0.0.1' | |
// **************************** INSTRUMENTATION TEST **************************** | |
androidTestImplementation "androidx.arch.core:core-testing:2.1.0" | |
androidTestImplementation 'androidx.test.ext:junit:1.1.2' | |
androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_version" | |
// Coroutines Test | |
androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.3.5" | |
// Hilt | |
testImplementation "com.google.dagger:hilt-android-testing:$hilt_version" | |
androidTestImplementation "com.google.dagger:hilt-android-testing:$hilt_version" | |
// ...with Kotlin. | |
kaptAndroidTest "com.google.dagger:hilt-android-compiler:$hilt_version" | |
// Barista | |
androidTestImplementation('com.schibsted.spain:barista:3.7.0') { | |
exclude group: 'org.jetbrains.kotlin' | |
} | |
testImplementation('com.schibsted.spain:barista:3.7.0') { | |
exclude group: 'org.jetbrains.kotlin' | |
} | |
// Mockito | |
androidTestImplementation 'org.mockito:mockito-core:3.5.15' | |
// Mockito Inline : Mockito preconfigured inline mock maker (intermediate and to be superseeded by automatic | |
// usage in a future version) | |
androidTestImplementation "org.mockito:mockito-android:3.5.15" | |
// Mockito Kotlin : Using Mockito with Kotlin. | |
testImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0' | |
androidTestImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0' | |
// Expekt : An assertion library for Kotlin | |
androidTestImplementation 'com.theapache64:expekt:0.0.1' | |
testImplementation "org.robolectric:robolectric:4.3.1" | |
} | |
hilt { | |
enableTransformForLocalTests = true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment