diff --git a/app/build.gradle b/app/build.gradle index 6ce2c03..75f8c26 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,5 +1,9 @@ apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' + +apply plugin: 'kotlin-android-extensions' + android { compileSdkVersion 25 buildToolsVersion "25.0.2" @@ -21,6 +25,7 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) + implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) diff --git a/build.gradle b/build.gradle index c2eea8e..f08173b 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,15 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { + ext.kotlin_version = '1.3.50' repositories { + google() jcenter() + } dependencies { - classpath 'com.android.tools.build:gradle:2.3.3' - + classpath 'com.android.tools.build:gradle:3.5.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 } @@ -14,7 +17,9 @@ buildscript { allprojects { repositories { + google() jcenter() + } } diff --git a/gradle.properties b/gradle.properties index aac7c9b..1c1df4c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,3 +15,11 @@ org.gradle.jvmargs=-Xmx1536m # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Automatically convert third-party libraries to use AndroidX +android.enableJetifier=true +# Kotlin code style for this project: "official" or "obsolete": +kotlin.code.style=official \ No newline at end of file