Add kotlin to project

This commit is contained in:
Shinokuni 2019-09-14 12:56:10 +02:00
parent 3afa5b2b08
commit 530632f0f2
3 changed files with 16 additions and 2 deletions

View File

@ -1,4 +1,6 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'
android { android {
compileSdkVersion 28 compileSdkVersion 28
@ -71,4 +73,8 @@ dependencies {
implementation 'com.mikepenz:materialdrawer:6.1.2' implementation 'com.mikepenz:materialdrawer:6.1.2'
implementation 'com.facebook.stetho:stetho:1.5.1' implementation 'com.facebook.stetho:stetho:1.5.1'
implementation "androidx.core:core-ktx:1.1.0"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.1.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
} }

View File

@ -1,14 +1,16 @@
// 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.50'
repositories { repositories {
google() google()
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.5.0' classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
@ -19,6 +21,7 @@ allprojects {
repositories { repositories {
google() google()
jcenter() jcenter()
mavenCentral()
} }
afterEvaluate { afterEvaluate {
tasks.withType(JavaCompile.class) { tasks.withType(JavaCompile.class) {

View File

@ -1,4 +1,6 @@
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'
android { android {
compileSdkVersion 28 compileSdkVersion 28
@ -45,4 +47,7 @@ dependencies {
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1' implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'org.jsoup:jsoup:1.11.3' implementation 'org.jsoup:jsoup:1.11.3'
implementation 'com.facebook.stetho:stetho-okhttp3:1.5.1' implementation 'com.facebook.stetho:stetho-okhttp3:1.5.1'
implementation "androidx.core:core-ktx:1.1.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
} }