Skip to content

Instantly share code, notes, and snippets.

@erluxman
Created May 24, 2017 05:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erluxman/80a5aebee00beee4bc1f4abbd3b813ac to your computer and use it in GitHub Desktop.
Save erluxman/80a5aebee00beee4bc1f4abbd3b813ac to your computer and use it in GitHub Desktop.
Kotlin data binding setup of app level build.gradle
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.example.adventure.learningbycomparing"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin/com/dougritter/marvelmovies'
}
dataBinding {
enabled = true
}
}
kapt {
generateStubs = true
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':domain')
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
compile 'com.android.support:appcompat-v7:25.3.1'
testCompile 'junit:junit:4.12'
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-vector-drawable:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
kapt 'com.android.databinding:compiler:2.3.0'
}
kapt {
generateStubs = true
}
buildscript {
ext.kotlin_version = '1.1.2-2'
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
}
}
repositories {
jcenter()
mavenCentral()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment