diff --git a/README.md b/README.md index 2c20886..5ee1e54 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ # 依赖版本 | Dependency | Version | |--|--| +| kotlin | 1.4.0 | | kotlinx-coroutines-android | 1.3.9 | | retrofit | 2.9.0 | @@ -25,7 +26,7 @@ allprojects { ```kotlin dependencies { - implementation 'com.github.chenxyu:retrofit-adapter-flow:1.0.5' + implementation 'com.github.chenxyu:retrofit-adapter-flow:1.1.0' } ``` diff --git a/adapter-flow/build.gradle b/adapter-flow/build.gradle index 22e9c1f..6016d08 100644 --- a/adapter-flow/build.gradle +++ b/adapter-flow/build.gradle @@ -11,8 +11,8 @@ android { defaultConfig { minSdkVersion 21 targetSdkVersion 30 - versionCode 5 - versionName "1.0.5" + versionCode 7 + versionName "1.0.6" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles 'consumer-rules.pro' @@ -25,16 +25,16 @@ android { } } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.appcompat:appcompat:1.2.0' - implementation 'androidx.core:core-ktx:1.3.1' - testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test.ext:junit:1.1.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9' implementation 'com.squareup.retrofit2:retrofit:2.9.0' } diff --git a/adapter-flow/src/androidTest/java/com/chenxyu/retrofit/adapter/ExampleInstrumentedTest.kt b/adapter-flow/src/androidTest/java/com/chenxyu/retrofit/adapter/ExampleInstrumentedTest.kt deleted file mode 100644 index 3110ece..0000000 --- a/adapter-flow/src/androidTest/java/com/chenxyu/retrofit/adapter/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,24 +0,0 @@ -package com.chenxyu.retrofit.adapter - -import androidx.test.platform.app.InstrumentationRegistry -import androidx.test.ext.junit.runners.AndroidJUnit4 - -import org.junit.Test -import org.junit.runner.RunWith - -import org.junit.Assert.* - -/** - * Instrumented test, which will execute on an Android device. - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -@RunWith(AndroidJUnit4::class) -class ExampleInstrumentedTest { - @Test - fun useAppContext() { - // Context of the app under test. - val appContext = InstrumentationRegistry.getInstrumentation().targetContext - assertEquals("com.chenxyu.retrofit.adapter.test", appContext.packageName) - } -} diff --git a/adapter-flow/src/test/java/com/chenxyu/retrofit/adapter/ExampleUnitTest.kt b/adapter-flow/src/test/java/com/chenxyu/retrofit/adapter/ExampleUnitTest.kt deleted file mode 100644 index 95448fe..0000000 --- a/adapter-flow/src/test/java/com/chenxyu/retrofit/adapter/ExampleUnitTest.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.chenxyu.retrofit.adapter - -import org.junit.Test - -import org.junit.Assert.* - -/** - * Example local unit test, which will execute on the development machine (host). - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -class ExampleUnitTest { - @Test - fun addition_isCorrect() { - assertEquals(4, 2 + 2) - } -} diff --git a/app/build.gradle b/app/build.gradle index 58b685b..f47e765 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,13 +3,13 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' android { - compileSdkVersion 29 - buildToolsVersion "29.0.3" + compileSdkVersion 30 + buildToolsVersion "30.0.2" defaultConfig { applicationId "com.chenxyu.example" minSdkVersion 21 - targetSdkVersion 29 + targetSdkVersion 30 versionCode 1 versionName "1.0" @@ -23,16 +23,21 @@ android { } } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.appcompat:appcompat:1.1.0' - implementation 'androidx.core:core-ktx:1.2.0' - implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'androidx.core:core-ktx:1.3.1' + implementation 'androidx.constraintlayout:constraintlayout:2.0.1' testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test.ext:junit:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + androidTestImplementation 'androidx.test.ext:junit:1.1.2' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' implementation project(path: ':adapter-flow') }