diff --git a/retrofit/build.gradle b/retrofit/build.gradle index 83acc0c330..8d425cf80a 100644 --- a/retrofit/build.gradle +++ b/retrofit/build.gradle @@ -17,8 +17,6 @@ dependencies { testImplementation libs.assertj testImplementation libs.guava testImplementation libs.mockwebserver - testImplementation libs.kotlinStdLib - testImplementation libs.kotlinCoroutines } jar { diff --git a/retrofit/gradle.properties b/retrofit/gradle.properties index 774fe0fe97..f018996fb2 100644 --- a/retrofit/gradle.properties +++ b/retrofit/gradle.properties @@ -1,3 +1,5 @@ POM_ARTIFACT_ID=retrofit POM_NAME=Retrofit POM_DESCRIPTION=A type-safe HTTP client for Android and Java. + +kotlin.stdlib.default.dependency=false diff --git a/retrofit/kotlin-test/build.gradle b/retrofit/kotlin-test/build.gradle new file mode 100644 index 0000000000..b39ed4e17c --- /dev/null +++ b/retrofit/kotlin-test/build.gradle @@ -0,0 +1,11 @@ +apply plugin: 'org.jetbrains.kotlin.jvm' + +dependencies { + testImplementation projects.retrofit + testImplementation projects.retrofit.testHelpers + testImplementation libs.junit + testImplementation libs.assertj + testImplementation libs.mockwebserver + testImplementation libs.kotlinStdLib + testImplementation libs.kotlinCoroutines +} diff --git a/retrofit/src/test/java/retrofit2/KotlinExtensionsTest.kt b/retrofit/kotlin-test/src/test/java/retrofit2/KotlinExtensionsTest.kt similarity index 100% rename from retrofit/src/test/java/retrofit2/KotlinExtensionsTest.kt rename to retrofit/kotlin-test/src/test/java/retrofit2/KotlinExtensionsTest.kt diff --git a/retrofit/src/test/java/retrofit2/KotlinSuspendRawTest.java b/retrofit/kotlin-test/src/test/java/retrofit2/KotlinSuspendRawTest.java similarity index 100% rename from retrofit/src/test/java/retrofit2/KotlinSuspendRawTest.java rename to retrofit/kotlin-test/src/test/java/retrofit2/KotlinSuspendRawTest.java diff --git a/retrofit/src/test/java/retrofit2/KotlinSuspendTest.kt b/retrofit/kotlin-test/src/test/java/retrofit2/KotlinSuspendTest.kt similarity index 100% rename from retrofit/src/test/java/retrofit2/KotlinSuspendTest.kt rename to retrofit/kotlin-test/src/test/java/retrofit2/KotlinSuspendTest.kt diff --git a/retrofit/src/test/java/retrofit2/KotlinUnitTest.java b/retrofit/kotlin-test/src/test/java/retrofit2/KotlinUnitTest.java similarity index 89% rename from retrofit/src/test/java/retrofit2/KotlinUnitTest.java rename to retrofit/kotlin-test/src/test/java/retrofit2/KotlinUnitTest.java index 74216fe867..389441b166 100644 --- a/retrofit/src/test/java/retrofit2/KotlinUnitTest.java +++ b/retrofit/kotlin-test/src/test/java/retrofit2/KotlinUnitTest.java @@ -21,7 +21,6 @@ import kotlin.Unit; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; -import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import retrofit2.http.GET; @@ -45,8 +44,4 @@ public void unitOnClasspath() throws IOException { assertThat(response.isSuccessful()).isTrue(); assertThat(response.body()).isSameAs(Unit.INSTANCE); } - - @Ignore("This is implicitly tested by integration tests of the adapters and converters") - @Test - public void unitMissingFromClasspath() {} } diff --git a/settings.gradle b/settings.gradle index f9c04c9998..efd5ab00ee 100644 --- a/settings.gradle +++ b/settings.gradle @@ -2,6 +2,7 @@ rootProject.name = 'retrofit-root' include ':retrofit' include ':retrofit:android-test' +include ':retrofit:kotlin-test' include ':retrofit:robovm-test' include ':retrofit:test-helpers'