-
Notifications
You must be signed in to change notification settings - Fork 20
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
Remove legacy kotlin-compiler-embeddable
dependency to prevent potential Kotlin version conflicts
#223
Conversation
…fferent kotlin versions and kotlin version 1.9.10
…onCompatibilityTest to a project with kotlin version 1.9.10
…ully to projects with different kotlin versions
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.
This is amazing @simonhauck thanks for looking into it. I've left a couple of comments
@@ -99,6 +94,8 @@ signing { | |||
useInMemoryPgpKeys(signingKey, signingPwd) | |||
} | |||
|
|||
tasks.withType<Sign>().configureEach { onlyIf { project.properties["skip-signing"] != "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.
Q: Is this really needed? I believe the .gradle
files inside the resources/
folder are ignored no?
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.
When calling gradlew :plugin-build:plugin:publishToMavenLocal
I get an error about an unconfigured signatory, because the signing task is an implicit dependency.
The publish task is executed from the parent project, so the build.gradle.kts file in the resources directory are unrelated to this.
I am not aware of another easy solution to disable the signing task conditionally for the test.
As a note, you should probably also merge this before the next release ;) |
Seems like bump to Kotlin 1.9.21 made it automatically: #229 Are those changes necessary then? |
I would recommend to remove any unused dependency. Especially if it can cause conflicts like the kotlin-compiler-embeddable. Its up to you if you want to have the integration test. It just gives additional reassurance that the plugin can be correctly applied to all sorts of Kotlin versions. In the end its a tradeoff. |
Makes sense 👍 Could you rebase your change and then we can merge it |
… to prevent conflicts with renovate
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…v1.9.21 (#228) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Done, I just noticed two small things left. I have increased the version of the plugin in the test to And I forgot to remove the dependency from the |
kotlin-compiler-embeddable
dependency to prevent potential Kotlin version conflicts
🚀 Description
See this issue.
Increase the Kotlin version to 1.9.20
Add a test to verify the plugin is applied correctly to projects with different kotlin versions
📄 Motivation and Context
Keeping dependencies up to date is always a good idea.
🧪 How Has This Been Tested?
A new integration test is added, where the plugin is applied to projects with different kotlin versions.
Unfortunately, this required some creative workaround. Maybe you have a better idea.
Normally you use
withPluginClasspath()
onGradleRunner.create()
to have access to the plugin. This overrides the specified kotlin version in thebuild.gradle.kts
of the genereated project in the test. I suspect this happens, because Kotlin can only be applied once per project and the dependency is taken from the parent project.I publish the project to mavenLocal and then apply it completly decoupled of the project. It works, but I am happy for any suggestion :)
📦 Types of changes
✅ Checklist