Skip to content

Instantly share code, notes, and snippets.

@wheeliechamp
Last active October 8, 2021 13:39
Show Gist options
  • Save wheeliechamp/2b91adb2b7960e02d4114dd73ca5a437 to your computer and use it in GitHub Desktop.
Save wheeliechamp/2b91adb2b7960e02d4114dd73ca5a437 to your computer and use it in GitHub Desktop.
build.gradle databinding設定
plugins {
id 'com.android.application'
id 'kotlin-android'
// add
id 'kotlin-android-extensions' // kotlinx
id 'kotlin-kapt' // databinding
}
android {
compileSdk 30
defaultConfig {
applicationId "com.example.webscrapingtest"
minSdk 26
targetSdk 30
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'
}
// add
buildFeatures {
dataBinding = true
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.6.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment