adding kotlin in gradle files

This commit is contained in:
tibbi
2017-11-05 21:55:08 +01:00
parent 38773aacf8
commit a856156f76
2 changed files with 30 additions and 4 deletions

View File

@@ -1,14 +1,16 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
apply plugin: 'android-apt' apply plugin: 'android-apt'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android { android {
compileSdkVersion 25 compileSdkVersion 26
buildToolsVersion "25.0.2" buildToolsVersion "26.0.2"
defaultConfig { defaultConfig {
applicationId "com.simplemobiletools.flashlight" applicationId "com.simplemobiletools.flashlight"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 25 targetSdkVersion 26
versionCode 22 versionCode 22
versionName "1.22" versionName "1.22"
} }
@@ -24,17 +26,39 @@ android {
signingConfig signingConfigs.release signingConfig signingConfigs.release
} }
} }
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
} }
dependencies { dependencies {
compile 'com.android.support:appcompat-v7:25.2.0' compile 'com.simplemobiletools:commons:2.35.6'
compile 'com.jakewharton:butterknife:8.0.1' compile 'com.jakewharton:butterknife:8.0.1'
compile 'com.squareup:otto:1.3.8' compile 'com.squareup:otto:1.3.8'
compile 'com.github.yukuku:ambilwarna:2.0.1' compile 'com.github.yukuku:ambilwarna:2.0.1'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
apt 'com.jakewharton:butterknife-compiler:8.0.1' apt 'com.jakewharton:butterknife-compiler:8.0.1'
} }
buildscript {
ext.kotlin_version = '1.1.51'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
}
}
def Properties props = new Properties() def Properties props = new Properties()
def propFile = new File('signing.properties') def propFile = new File('signing.properties')
if (propFile.canRead()) { if (propFile.canRead()) {

View File

@@ -16,6 +16,8 @@ buildscript {
allprojects { allprojects {
repositories { repositories {
jcenter() jcenter()
maven { url "https://jitpack.io" }
maven { url "https://maven.google.com" }
} }
} }