Last active
May 27, 2023 01:39
-
-
Save booknara/cfd780fd414b7cd4d070269748348e83 to your computer and use it in GitHub Desktop.
Android library dependency information
This file contains hidden or 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
// build.gradle in root folder | |
buildscript { | |
ext.hilt_version = '2.46.1' | |
dependencies { | |
classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version" | |
} | |
} | |
// hilt and kotlin version(org.jetbrains.kotlin.android) should be inter-compatible | |
plugins { | |
id 'com.android.application' version '7.2.0' apply false | |
id 'com.android.library' version '7.2.0' apply false | |
id 'org.jetbrains.kotlin.android' version '1.8.10' apply false | |
} | |
task clean(type: Delete) { | |
delete rootProject.buildDir | |
} | |
// app/build.gradle | |
plugins { | |
id 'com.android.application' | |
id 'kotlin-android' | |
id 'kotlin-kapt' | |
} | |
android { | |
compileSdkVersion 33 | |
defaultConfig { | |
applicationId "<package name>" | |
minSdkVersion 23 | |
targetSdkVersion 33 | |
versionCode 1 | |
versionName "1.0" | |
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | |
} | |
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' | |
} | |
// NOTE: Enable view-binding feature | |
buildFeatures { | |
viewBinding true | |
} | |
} | |
// Plugin for Hilt DI | |
apply plugin: 'kotlin-kapt' | |
apply plugin: 'dagger.hilt.android.plugin' | |
dependencies { | |
implementation 'androidx.core:core-ktx:1.9.0' | |
implementation 'androidx.appcompat:appcompat:1.6.0' | |
implementation 'com.google.android.material:material:1.8.0' | |
implementation 'androidx.constraintlayout:constraintlayout:2.1.4' | |
// Recycler View (ConcatAdapter) | |
implementation 'androidx.recyclerview:recyclerview:1.3.0' | |
// LiveData | |
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1' | |
// ViewModel | |
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1' | |
// viewModels() extension function | |
implementation 'androidx.fragment:fragment-ktx:1.5.5' | |
// Retrofit & Gson converter | |
implementation 'com.google.code.gson:gson:2.9.0' | |
implementation 'com.squareup.retrofit2:retrofit:2.9.0' | |
implementation 'com.squareup.retrofit2:converter-gson:2.9.0' | |
implementation 'com.squareup.okhttp3:logging-interceptor:4.11.0' | |
// Material Design | |
implementation 'com.google.android.material:material:1.8.0' | |
// Glide image library | |
implementation 'com.github.bumptech.glide:glide:4.13.0' | |
kapt 'com.github.bumptech.glide:compiler:4.8.0' | |
// Hilt DI (ext.hilt_version = '2.46.1') | |
implementation "com.google.dagger:hilt-android:$hilt_version" | |
kapt "com.google.dagger:hilt-android-compiler:$hilt_version" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment