Skip to content

Instantly share code, notes, and snippets.

@unixc3t
Created April 16, 2017 01:04
Show Gist options
  • Save unixc3t/d8b5f4935e3b2087108ceb191eb664b2 to your computer and use it in GitHub Desktop.
Save unixc3t/d8b5f4935e3b2087108ceb191eb664b2 to your computer and use it in GitHub Desktop.
kotlin for android studio config
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "zl.com.kotlinapp"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile "com.android.support:appcompat-v7:$support_version"
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.jetbrains.anko:anko-sdk15:$anko_version"
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha9'
compile "org.jetbrains.anko:anko-appcompat-v7:$anko_version"
compile "org.jetbrains.anko:anko-design:$anko_version"
compile "org.jetbrains.anko:anko-recyclerview-v7:$anko_version"
testCompile 'junit:junit:4.12'
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.support_version = '25.3.1'
ext.kotlin_version = '1.1.1'
ext.anko_version = '0.9.1'
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url 'https://dl.bintray.com/jetbrains/anko' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment