Skip to content

Instantly share code, notes, and snippets.

@igoticecream
Created February 21, 2017 22:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save igoticecream/08ba3b6d1e3b6d6d31cfa6671590144d to your computer and use it in GitHub Desktop.
Save igoticecream/08ba3b6d1e3b6d6d31cfa6671590144d to your computer and use it in GitHub Desktop.
Kotlin setup for Android Studio project
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
applicationId 'hellokotlin'
minSdkVersion 16
targetSdkVersion 25
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 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support:support-annotations:25.2.0'
compile 'com.android.support:support-v13:25.2.0'
compile 'com.android.support:design:25.2.0'
compile 'org.jetbrains.kotlin:kotlin-stdlib:1.1.0-rc-91'
compile 'org.jetbrains.kotlin:kotlin-reflect:1.1.0-rc-91'
testCompile 'junit:junit:4.12'
testCompile 'org.jetbrains.kotlin:kotlin-test:1.1.0-rc-91'
testCompile 'org.jetbrains.kotlin:kotlin-test-junit:1.1.0-rc-91'
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
maven {
url 'http://dl.bintray.com/kotlin/kotlin-eap-1.1'
}
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0-rc1'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.0-rc-91'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven {
url 'http://dl.bintray.com/kotlin/kotlin-eap-1.1'
}
jcenter()
}
}
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