-
Notifications
You must be signed in to change notification settings - Fork 65
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
Fixed multiple jvm targets #62
Conversation
Thanks! Currently I'm busy with other things, but I'll try to return to this PR by the end of this week |
works by: - renaming the tasks to include the target (except for jvm - for some compatibility) - storing/building the api in subdirectories named after the target Note that for single-target projects the names are not changed. Author: Paul de Vrieze <[email protected]>
…or kotlin multi platform projects, just have two collector tasks "apiDump" and "apiCheck" that depend on the platform specific versions. It improves consistency, compatibility and usability.
d7a9356
to
ad0bdad
Compare
The pull request has been rebased upon 0.7.1 |
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.
Sorry for the delay!
The build does not pass as the plugin now creates the same task twice for any multiplatform project with a single JVM source set, this definitely should not be the case. In fact, it's impossible to apply it to any multiplatform project
…droid target. When there is only one jvm/android target, don't create target specific api dirs. A future version could use the extension to make the behaviour configurable.
This should be fixed in the new pull request. |
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.
Great job, thanks!
Please address few minor comments and then the PR will be ready to go: I will do a few minor stylistic cleanups and will release 0.8.0-RC next week
build.gradle.kts
Outdated
@@ -36,6 +36,9 @@ tasks.register<Test>("functionalTest") { | |||
} | |||
tasks.check { dependsOn(tasks["functionalTest"]) } | |||
|
|||
// Hack (from guidance on gradle forums) needed to handle optional plugin dependencies |
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.
Could you please add a link to the source of the suggestion?
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.
Looking it up, there should actually be a better way: https://docs.gradle.org/current/userguide/test_kit.html#sub:test-kit-automatic-classpath-injection (rather than https://docs.gradle.org/2.14/userguide/test_kit.html?_ga=2.33896865.1010618029.1633210343-1565008009.1633210343#sub:test-kit-classpath-injection). I'll try to use the better way.
…nal dependencies used as classpath for the plugin under test. This is needed for optional dependencies (as used by this plugin) that would normally be found through other applied plugins (testkit isolates the classpath, unlike regular gradle).
All three changes have been processed in the latest push. I found a better source for the code, and documented what is happening much better. |
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.
That's a great job, thanks for taking care of it!
Make the plugin work with Kotlin multiplatform for multiple targets: * Rename tasks to include the target (except for the JVM - for backwards compatibility) * Rather than having separate tasks where some use the original name, just have two collector tasks "apiDump" and "apiCheck" that depend on the platform-specific versions. It improves consistency, compatibility, and usability. * Store and build .api files in subdirectories named after the target Author: Paul de Vrieze <[email protected]> Co-authored-by: Vsevolod Tolstopyatov <[email protected]> Pull request Kotlin/binary-compatibility-validator#62
Make the plugin work with Kotlin multiplatform for multiple targets: * Rename tasks to include the target (except for the JVM - for backwards compatibility) * Rather than having separate tasks where some use the original name, just have two collector tasks "apiDump" and "apiCheck" that depend on the platform-specific versions. It improves consistency, compatibility, and usability. * Store and build .api files in subdirectories named after the target Author: Paul de Vrieze <[email protected]> Co-authored-by: Vsevolod Tolstopyatov <[email protected]> Pull request Kotlin/binary-compatibility-validator#62
Make the plugin work with Kotlin multiplatform for multiple targets: * Rename tasks to include the target (except for the JVM - for backwards compatibility) * Rather than having separate tasks where some use the original name, just have two collector tasks "apiDump" and "apiCheck" that depend on the platform-specific versions. It improves consistency, compatibility, and usability. * Store and build .api files in subdirectories named after the target Author: Paul de Vrieze <[email protected]> Co-authored-by: Vsevolod Tolstopyatov <[email protected]> Pull request Kotlin/binary-compatibility-validator#62
Make the plugin work with Kotlin multiplatform for multiple targets: * Rename tasks to include the target (except for the JVM - for backwards compatibility) * Rather than having separate tasks where some use the original name, just have two collector tasks "apiDump" and "apiCheck" that depend on the platform-specific versions. It improves consistency, compatibility, and usability. * Store and build .api files in subdirectories named after the target Author: Paul de Vrieze <[email protected]> Co-authored-by: Vsevolod Tolstopyatov <[email protected]> Pull request Kotlin/binary-compatibility-validator#62 Moved from Kotlin/binary-compatibility-validator@6a3180b
Make the plugin work with Kotlin multiplatform for multiple targets: * Rename tasks to include the target (except for the JVM - for backwards compatibility) * Rather than having separate tasks where some use the original name, just have two collector tasks "apiDump" and "apiCheck" that depend on the platform-specific versions. It improves consistency, compatibility, and usability. * Store and build .api files in subdirectories named after the target Author: Paul de Vrieze <[email protected]> Co-authored-by: Vsevolod Tolstopyatov <[email protected]> Pull request Kotlin/binary-compatibility-validator#62 Moved from Kotlin/binary-compatibility-validator@6a3180b
This is a rework of the multiple-jvm-targets branch that actually works. The testing is "fixed" and the implementation is fixed. Note that this is not 100% compatible with existing projects as it uses target-specific subdirectories (only for multiplatform projects).