mirror of
https://github.com/hmalik144/StackExchangeUsers.git
synced 2025-12-10 03:05:25 +00:00
Added more units tests - room database test Amended ui Changed how recycler view loads data
107 lines
3.9 KiB
Groovy
107 lines
3.9 KiB
Groovy
apply plugin: 'com.android.application'
|
|
apply plugin: 'kotlin-android'
|
|
apply plugin: 'kotlin-android-extensions'
|
|
apply plugin: 'kotlin-kapt'
|
|
|
|
apply plugin: "androidx.navigation.safeargs"
|
|
|
|
android {
|
|
compileSdkVersion 29
|
|
buildToolsVersion "29.0.3"
|
|
|
|
defaultConfig {
|
|
applicationId "com.example.h_mal.stackexchangeusers"
|
|
minSdkVersion 24
|
|
targetSdkVersion 29
|
|
versionCode 1
|
|
versionName "1.0"
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
// To inline the bytecode built with JVM target 1.8 into
|
|
// bytecode that is being built with JVM target 1.6. (e.g. navArgs)
|
|
compileOptions {
|
|
sourceCompatibility = 1.8
|
|
targetCompatibility = 1.8
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = "1.8"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
implementation 'androidx.appcompat:appcompat:1.1.0'
|
|
implementation 'androidx.core:core-ktx:1.2.0'
|
|
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
|
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
|
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
|
|
implementation 'com.google.android.material:material:1.1.0'
|
|
implementation 'androidx.annotation:annotation:1.1.0'
|
|
implementation "androidx.fragment:fragment-ktx:1.2.5"
|
|
implementation 'androidx.navigation:navigation-fragment-ktx:2.2.2'
|
|
implementation 'androidx.navigation:navigation-ui-ktx:2.2.2'
|
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
|
implementation 'androidx.preference:preference:1.1.1'
|
|
testImplementation 'junit:junit:4.12'
|
|
androidTestImplementation 'androidx.test:rules:1.2.0'
|
|
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
|
|
implementation "org.jetbrains.kotlin:kotlin-test:1.3.71"
|
|
|
|
// android unit testing and espresso
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
|
implementation 'androidx.test.espresso:espresso-core:3.2.0'
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
|
//mock websever for testing retrofit responses
|
|
testImplementation "com.squareup.okhttp3:mockwebserver:4.6.0"
|
|
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
|
|
|
|
//mockito and livedata testing
|
|
testImplementation 'org.mockito:mockito-inline:2.13.0'
|
|
implementation 'android.arch.core:core-testing'
|
|
androidTestImplementation 'androidx.test:rules:1.3.0-rc01'
|
|
|
|
// Mockk
|
|
def mockk_ver = "1.10.2"
|
|
testImplementation "io.mockk:mockk:$mockk_ver"
|
|
androidTestImplementation "io.mockk:mockk-android:$mockk_ver"
|
|
|
|
//Retrofit and GSON
|
|
implementation 'com.squareup.retrofit2:retrofit:2.8.1'
|
|
implementation 'com.squareup.retrofit2:converter-gson:2.8.1'
|
|
|
|
//Kotlin Coroutines
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.4"
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.4"
|
|
|
|
//Kodein Dependency Injection
|
|
implementation "org.kodein.di:kodein-di-generic-jvm:6.2.1"
|
|
implementation "org.kodein.di:kodein-di-framework-android-x:6.2.1"
|
|
|
|
// Shared prefs
|
|
implementation "androidx.preference:preference-ktx:1.1.1"
|
|
|
|
// Picasso image display
|
|
implementation 'com.squareup.picasso:picasso:2.71828'
|
|
|
|
//Android Room
|
|
implementation "androidx.room:room-runtime:2.3.0-alpha01"
|
|
implementation "androidx.room:room-ktx:2.3.0-alpha01"
|
|
kapt "androidx.room:room-compiler:2.3.0-alpha01"
|
|
|
|
// Circle Image View
|
|
implementation 'com.mikhaellopez:circularimageview:4.2.0'
|
|
|
|
// Latest version of JSONObject - needed to pass unit tests
|
|
testImplementation 'org.json:json:20180813'
|
|
}
|