Skip to content

Instantly share code, notes, and snippets.

@zhuqling
Created January 11, 2016 08:43
Show Gist options
  • Save zhuqling/3188a60116f2a91edcde to your computer and use it in GitHub Desktop.
Save zhuqling/3188a60116f2a91edcde to your computer and use it in GitHub Desktop.
Kotlin and anko gradle config
buildscript {
ext.kotlin_version = '1.0.0-beta-4584'
ext.anko_version = '0.8'
repositories {
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
}
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.zhuqling.weatherapp"
minSdkVersion 21
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'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.jetbrains.anko:anko-sdk15:$anko_version"
// sdk19, sdk21, sdk23 are also available
// compile "org.jetbrains.anko:anko-support-v4:$anko_version" // In case you need support-v4 bindings
// compile "org.jetbrains.anko:anko-appcompat-v7:$anko_version" // For appcompat-v7 bindings
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment