-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
refreshVersions plugin causes classpath issues when applied with wire plugin #707
Comments
Follow up: (Workaround) adding okio dependency to the buildscript classpath right before applying refreshVersions plugin in
|
Do you know which okio versions are requested by both plugins? |
Wire 4.9.1 seems to bring 3.5.0 version of okio, while if I have wire plugin coordinates declared as follows in
gradle sync fails and it looks like refreshVersions can't detect a version for it, (it doesn't add a new version in
and if I added okio dependency explicitly in |
There's no reason to use the version placeholder in libs.toml.versions now as we can update this version catalog FYI. Also, the version placeholder is not supported for the plugins DSL. |
Good to know that version placeholder is not supported in plugins DSL, speaking of version placeholders for libraries, does this section in the documentation need updating?
If I understand correctly what you said, this looks like to be outdated. |
You're right, we should write the limitation, and also document versions catalog support better |
🐛 Describe the bug
It seems like refreshVersions plugin is incompatible with square/wire gradle plugin which makes it impossible to use them together in a single project without disabling one of them.
I've a project that is using refreshVersions plugin, when I tried to apply wire gradle plugin to my project and run gradle task
gradlew generate[SourceSet]Protos
(e.ggenerateCommonMainProtos
), the task execution failed withjava.lang.NoSuchMethodError
saying it couldn't findokio.FileSystem okio.Okio.asResourceFileSystem(java.lang.ClassLoader)
method that is used by wire internally here, I disabled refreshVersions plugin and I was able to rungenerateCommonMainProtos
successfully.Running
./gradlew generateCommonMainProtos
fails withNoSuchMethodError
, stacktrace:✅ Expected behavior
Running
./gradlew generateCommonMainProtos
should complete successfully with kotlin/java models being generated for proto definitions.💣 Steps to reproduce
I've a sample reproducer here https://github.com/mr3y-the-programmer/refreshVersions-bug, running
./gradlew generateCommonMainProtos
on the main branch completes successfully, while running the task on with refreshVersions branch fails with the aforementioned error.📱 Tech info
The text was updated successfully, but these errors were encountered: