Skip to content

Instantly share code, notes, and snippets.

@ChaituPenju
Last active July 20, 2020 08:40
Show Gist options
  • Save ChaituPenju/031392eebd93e94b3036c5547c703752 to your computer and use it in GitHub Desktop.
Save ChaituPenju/031392eebd93e94b3036c5547c703752 to your computer and use it in GitHub Desktop.
A List of all the Android (Kotlin) Jetpack and other important and mostly used(depends on requirement) libraries' dependencies(app level build.gradle).
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
// for databinding
buildFeatures {
dataBinding true
}
// for java 8 support
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
// for java 8 kotlin support
kotlinOptions {
jvmTarget = "1.8"
}
defaultConfig {
// change it to your applicationId
applicationId "com.example.appname"
minSdkVersion 21
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'
}
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
// core and appcompat
implementation 'androidx.core:core-ktx:1.3.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
// constraint layout
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
// google material theme
def material_version = "1.1.0"
implementation "com.google.android.material:material:$material_version"
// kotlin coroutines
def coroutines_version = "1.3.7"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
// viewmodel and live data
def lifecycle_version = "2.2.0"
// for viewmodel
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
// for livedata
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
// for lifecyclescope
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
// for java 8 support
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
// retrofit
implementation 'com.squareup.retrofit2:retrofit:2.8.1'
// gson core
implementation 'com.google.code.gson:gson:2.8.6'
// gson converter(retrofit)
implementation 'com.squareup.retrofit2:converter-gson:2.8.1'
// room
def room_version = "2.2.5"
// room with compiler(annotation processor)
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version" // For Kotlin use kapt instead of annotationProcessor
// optional - Kotlin Extensions and Coroutines support for Room
implementation "androidx.room:room-ktx:$room_version"
// fragments
def fragment_version = "1.2.5"
implementation "androidx.fragment:fragment-ktx:$fragment_version"
// Navigation(fragments in activity)
def nav_version = "2.3.0"
// Navigation Fragment
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
// Navigation UI
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
// testing
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
@ChaituPenju
Copy link
Author

The version numbers of all libraries are taken as of July 2020, the latest version of libraries may change, and the Android Studio IDE will autosuggest if any libraries get old.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment