kotlin support

This commit is contained in:
AdrianLxM 2019-04-10 00:33:05 +02:00
parent 9ca179ec14
commit 6c0853d49a
2 changed files with 9 additions and 0 deletions

View file

@ -10,6 +10,8 @@ buildscript {
} }
} }
apply plugin: "com.android.application" apply plugin: "com.android.application"
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'
apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.gms.google-services'
apply plugin: "io.fabric" apply plugin: "io.fabric"
apply plugin: "jacoco-android" apply plugin: "jacoco-android"
@ -27,6 +29,7 @@ ext {
repositories { repositories {
maven { url 'https://maven.fabric.io/public' } maven { url 'https://maven.fabric.io/public' }
jcenter { url "https://jcenter.bintray.com/" } jcenter { url "https://jcenter.bintray.com/" }
mavenCentral()
} }
def generateGitBuild = { -> def generateGitBuild = { ->
@ -75,6 +78,9 @@ android {
moduleName "BleCommandUtil" moduleName "BleCommandUtil"
} }
} }
kotlinOptions {
jvmTarget = '1.8'
}
lintOptions { lintOptions {
// TODO remove once wear dependency com.google.android.gms:play-services-wearable:7.3.0 // TODO remove once wear dependency com.google.android.gms:play-services-wearable:7.3.0
// has been upgraded (requiring significant code changes), which currently fails release // has been upgraded (requiring significant code changes), which currently fails release
@ -233,6 +239,7 @@ dependencies {
androidTestImplementation "org.mockito:mockito-core:2.8.47" androidTestImplementation "org.mockito:mockito-core:2.8.47"
androidTestImplementation "com.google.dexmaker:dexmaker:${dexmakerVersion}" androidTestImplementation "com.google.dexmaker:dexmaker:${dexmakerVersion}"
androidTestImplementation "com.google.dexmaker:dexmaker-mockito:${dexmakerVersion}" androidTestImplementation "com.google.dexmaker:dexmaker-mockito:${dexmakerVersion}"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
} }
task unzip(type: Copy) { task unzip(type: Copy) {

View file

@ -1,6 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { buildscript {
ext.kotlin_version = '1.3.21'
repositories { repositories {
google() google()
jcenter() jcenter()
@ -16,6 +17,7 @@ buildscript {
// in the individual module build.gradle files // in the individual module build.gradle files
classpath 'com.jakewharton:butterknife-gradle-plugin:9.0.0-SNAPSHOT' classpath 'com.jakewharton:butterknife-gradle-plugin:9.0.0-SNAPSHOT'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
} }
} }