Skip to content

Instantly share code, notes, and snippets.

@jaydp17
Created October 30, 2015 03:31
Show Gist options
  • Save jaydp17/9960fdb0e5a1ba85e82d to your computer and use it in GitHub Desktop.
Save jaydp17/9960fdb0e5a1ba85e82d to your computer and use it in GitHub Desktop.
Kotlin and dataBinding
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
}
@jaredsburrows
Copy link

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