-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Experiment with splitting okhttp core into Android and JVM #8600
base: master
Are you sure you want to change the base?
Conversation
It's noisier because something is persistently picking up the main source set in the android build, and warning about it. Worse it makes builds fail because of duplicate sources. |
Also more invasive because a lot is changing here, so building this against 1.9.24 and AGP 8.2 sounds like a dead end. |
build.gradle.kts
Outdated
apply(plugin = "org.jetbrains.dokka") | ||
apply(plugin = "com.diffplug.spotless") | ||
//apply(plugin = "org.jetbrains.dokka") | ||
//apply(plugin = "com.diffplug.spotless") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disabled because of Gradle Sync issues when enabled.
okhttp/build.gradle.kts
Outdated
kotlin("plugin.serialization") | ||
id("org.jetbrains.dokka") | ||
id("com.vanniktech.maven.publish.base") | ||
// id("com.vanniktech.maven.publish.base") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- needs something!
@@ -360,15 +360,17 @@ class TaskFaker : Closeable { | |||
timeout: Long, | |||
unit: TimeUnit, | |||
): T? { | |||
taskRunner.withLock { | |||
return taskRunner.withLock { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what’s with this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kotlin 2 didn't like the inline with return?
} | ||
//animalsniffer { | ||
// isIgnoreFailures = true | ||
//} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- needs something
build.gradle.kts
Outdated
// tasks.withType<JavaCompile> { | ||
// sourceCompatibility = JavaVersion.VERSION_17.toString() | ||
// targetCompatibility = JavaVersion.VERSION_17.toString() | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love it. There’s some Gradle stuff to clean up before landing though!
14cf0c7
to
7ea2b89
Compare
@swankjesse not sure how to avoid plugins that pull in java? |
Uses this approach for a shared Java core between Android and JVM.
https://jeroenmols.com/blog/2021/03/17/share-code-kotlin-multiplatform/
Source structure under okhttp
Outputs
TODO