|
plugins { |
|
id 'com.android.application' |
|
id 'org.jetbrains.kotlin.android' |
|
id 'kotlin-kapt' |
|
id 'com.google.dagger.hilt.android' |
|
} |
|
|
|
android { |
|
namespace '<com.replace.your>' |
|
compileSdk 33 |
|
|
|
defaultConfig { |
|
applicationId "<com.replace.your>" |
|
minSdk 25 |
|
targetSdk 33 |
|
versionCode 1 |
|
versionName "1.0" |
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
|
vectorDrawables { |
|
useSupportLibrary true |
|
} |
|
} |
|
|
|
buildTypes { |
|
release { |
|
minifyEnabled false |
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' |
|
} |
|
} |
|
compileOptions { |
|
sourceCompatibility JavaVersion.VERSION_1_8 |
|
targetCompatibility JavaVersion.VERSION_1_8 |
|
} |
|
kotlinOptions { |
|
jvmTarget = '1.8' |
|
} |
|
buildFeatures { |
|
compose true |
|
} |
|
composeOptions { |
|
kotlinCompilerExtensionVersion '1.1.1' |
|
} |
|
packagingOptions { |
|
resources { |
|
excludes += '/META-INF/{AL2.0,LGPL2.1}' |
|
} |
|
} |
|
|
|
testOptions { |
|
unitTests { |
|
includeAndroidResources = true |
|
} |
|
} |
|
} |
|
|
|
dependencies { |
|
|
|
implementation 'androidx.core:core-ktx:1.9.0' |
|
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1' |
|
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$androidx_lifecycle_viewmodel_version" |
|
implementation "androidx.lifecycle:lifecycle-viewmodel:$androidx_lifecycle_viewmodel_version" |
|
implementation 'androidx.activity:activity-compose:1.6.1' |
|
implementation "androidx.compose.ui:ui:$compose_ui_version" |
|
implementation "androidx.compose.ui:ui-tooling-preview:$compose_ui_version" |
|
implementation "androidx.compose.material3:material3:$material3_version" |
|
implementation "androidx.compose.material:material:$compose_ui_version" |
|
debugImplementation "androidx.compose.ui:ui-tooling:$compose_ui_version" |
|
debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_ui_version" |
|
|
|
//networking |
|
implementation "com.squareup.retrofit2:retrofit:$retrofit_version" |
|
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version" |
|
|
|
//Hilt DI |
|
implementation("com.google.dagger:hilt-android:$hilt_di_version") |
|
kapt("com.google.dagger:hilt-android-compiler:$hilt_di_version") |
|
|
|
// For instrumentation tests |
|
androidTestImplementation "com.google.dagger:hilt-android-testing:$hilt_di_version" |
|
androidTestAnnotationProcessor "com.google.dagger:hilt-compiler:$hilt_di_version" |
|
|
|
// For local unit tests |
|
testImplementation "com.google.dagger:hilt-android-testing:$hilt_di_version" |
|
testAnnotationProcessor "com.google.dagger:hilt-compiler:$hilt_di_version" |
|
|
|
//Testing Frameworks |
|
//mockito |
|
testImplementation "org.mockito:mockito-core:4.8.1" |
|
testImplementation "org.mockito.kotlin:mockito-kotlin:4.0.0" |
|
//junit |
|
testImplementation 'junit:junit:4.13.2' |
|
androidTestImplementation 'androidx.test.ext:junit:1.1.3' |
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' |
|
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_ui_version" |
|
//robolectric |
|
testImplementation 'org.robolectric:robolectric:4.8' |
|
//Google Truth |
|
testImplementation "com.google.truth:truth:1.1.3" |
|
|
|
|
|
|
|
//Jetpack Navigation |
|
// Java language implementation |
|
implementation "androidx.navigation:navigation-fragment:$nav_version" |
|
implementation "androidx.navigation:navigation-ui:$nav_version" |
|
|
|
// Kotlin |
|
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version" |
|
implementation "androidx.navigation:navigation-ui-ktx:$nav_version" |
|
|
|
// Feature module Support |
|
implementation "androidx.navigation:navigation-dynamic-features-fragment:$nav_version" |
|
|
|
// Testing Navigation |
|
androidTestImplementation "androidx.navigation:navigation-testing:$nav_version" |
|
|
|
// Jetpack Compose Integration |
|
implementation "androidx.navigation:navigation-compose:$nav_version" |
|
|
|
//material icons |
|
implementation("androidx.compose.material:material-icons-extended:$compose_ui_version") |
|
|
|
// 4. Android - Use Guava types |
|
implementation("com.google.guava:guava:31.1-android") |
|
|
|
// Coil - Imageloader |
|
implementation("io.coil-kt:coil:2.2.2") |
|
implementation("io.coil-kt:coil-compose:2.2.2") |
|
|
|
|
|
// Room (DB) |
|
implementation "androidx.room:room-runtime:$room_version" |
|
annotationProcessor "androidx.room:room-compiler:$room_version" |
|
|
|
// To use Kotlin annotation processing tool (kapt) |
|
kapt "androidx.room:room-compiler:$room_version" |
|
|
|
// optional - RxJava3 support for Room |
|
implementation "androidx.room:room-rxjava3:$room_version" |
|
|
|
// optional - Guava support for Room, including Optional and ListenableFuture |
|
implementation "androidx.room:room-guava:$room_version" |
|
|
|
// optional - Test helpers |
|
testImplementation "androidx.room:room-testing:$room_version" |
|
|
|
// optional - Paging 3 Integration |
|
implementation "androidx.room:room-paging:$room_version" |
|
} |
|
|
|
// Allow references to generated code |
|
kapt { |
|
correctErrorTypes = true |
|
} |