Created
October 30, 2015 03:31
-
-
Save jaydp17/9960fdb0e5a1ba85e82d to your computer and use it in GitHub Desktop.
Kotlin and dataBinding
This file contains 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
apply plugin: 'com.android.application' | |
apply plugin: 'com.android.databinding' | |
apply plugin: 'kotlin-android' | |
android { | |
compileSdkVersion 23 | |
buildToolsVersion "23.0.1" | |
defaultConfig { | |
applicationId "com.example.mvptestkotlin" | |
minSdkVersion 15 | |
targetSdkVersion 23 | |
versionCode 1 | |
versionName "1.0" | |
} | |
buildTypes { | |
release { | |
minifyEnabled false | |
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
} | |
} | |
sourceSets { | |
main.java.srcDirs += ['src/main/kotlin', | |
'build/intermediates/classes/debug'] | |
} | |
} | |
dependencies { | |
compile fileTree(dir: 'libs', include: ['*.jar']) | |
testCompile 'junit:junit:4.12' | |
compile 'com.android.support:appcompat-v7:23.1.0' | |
compile 'com.android.support:recyclerview-v7:23.1.0' | |
compile 'com.android.support:design:23.1.0' | |
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" | |
// Dagger 2 | |
compile 'com.google.dagger:dagger:2.0.1' | |
kapt 'com.google.dagger:dagger-compiler:2.0.1' | |
provided 'org.glassfish:javax.annotation:10.0-b28' | |
// Data Binding | |
kapt 'com.android.databinding:compiler:1.0-rc4' | |
} | |
buildscript { | |
ext.kotlin_version = '1.0.0-beta-1038' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | |
} | |
} | |
repositories { | |
mavenCentral() | |
} | |
kapt { | |
generateStubs = true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updates to this are on StackOverflow: https://stackoverflow.com/questions/44035504/how-to-use-data-binding-and-kotlin-in-android-studio-3-0-0