Skip to content

Commit

Permalink
Merge pull request #3715 from square/jw/kotlin/2022-03-29
Browse files Browse the repository at this point in the history
Migrate Kotlin tests to separate project
  • Loading branch information
JakeWharton authored Mar 30, 2022
2 parents 00ff27e + fb62d2c commit 4910b3c
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 7 deletions.
2 changes: 0 additions & 2 deletions retrofit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ dependencies {
testImplementation libs.assertj
testImplementation libs.guava
testImplementation libs.mockwebserver
testImplementation libs.kotlinStdLib
testImplementation libs.kotlinCoroutines
}

jar {
Expand Down
2 changes: 2 additions & 0 deletions retrofit/gradle.properties
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions retrofit/kotlin-test/build.gradle
Original file line number Diff line number Diff line change
@@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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() {}
}
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down

0 comments on commit 4910b3c

Please sign in to comment.