add kotlin library

add kotlin library
pull/166/head
xufulong 4 years ago
parent 2800d5d5df
commit d52b84ef84
  1. 13
      app/build.gradle
  2. 3
      build.gradle
  3. 2
      gradle.properties

@ -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 rootProject.ext.compileSdkVersion compileSdkVersion rootProject.ext.compileSdkVersion
@ -41,8 +43,12 @@ android {
useLibrary "org.apache.http.legacy" useLibrary "org.apache.http.legacy"
compileOptions { compileOptions {
sourceCompatibility = 1.8 sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = 1.8 targetCompatibility = JavaVersion.VERSION_1_8
}
packagingOptions {
exclude 'META-INF/proguard/coroutines.pro'
} }
} }
@ -52,4 +58,7 @@ dependencies {
implementation "androidx.recyclerview:recyclerview:$rootProject.recyclerviewVersion" implementation "androidx.recyclerview:recyclerview:$rootProject.recyclerviewVersion"
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
implementation project(':Live') implementation project(':Live')
implementation "androidx.core:core-ktx:$rootProject.core_ktx"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$rootProject.lifecycle_ktx"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
} }

@ -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.50'
repositories { repositories {
jcenter() jcenter()
maven { maven {
@ -10,7 +11,7 @@ buildscript {
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.2.0' classpath 'com.android.tools.build:gradle:3.2.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
} }

@ -25,3 +25,5 @@ preferenceVersion=1.1.0
annotationVersion=1.1.0 annotationVersion=1.1.0
ottoVersion=1.3.8 ottoVersion=1.3.8
ijkVersion=0.8.8 ijkVersion=0.8.8
core_ktx=1.3.2
lifecycle_ktx=2.2.0
Loading…
Cancel
Save