-
Notifications
You must be signed in to change notification settings - Fork 395
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
Plugin is incompatible with isolated projects feature #907
Comments
Some limitations are tracked in gradle/gradle#22514. |
Couple of things:
|
There are two violations of project isolation in this plugin:
|
liutikas
added a commit
to liutikas/shadow
that referenced
this issue
Oct 1, 2024
Configuring develocity build scan additional detail publishing breaks Gradle project isolation GradleUp#907 This change adds a new property com.gradleup.shadow.enableDevelocityIntegration that defaults to true, however it allows folks to set it to false and make shadow plugin usage project isolation safe.
1 task
Created #993 to help users disable this develocity integration. |
Could we have a release to pick this up? |
Can close this now then? Thanks for turning this around so quickly both of you! I think I have one incompatible plugin to go before we can use this in detekt project. |
copybara-service bot
pushed a commit
to androidx/androidx
that referenced
this issue
Oct 2, 2024
Pulls in a fix GradleUp/shadow#907 to avoid project isolation violations Bug: 358128051 Test: ./gradlew bOS --dry-run Change-Id: Ib5f62c6e5616fddb0eef6849b3291fc38339c1b1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please check the User Guide before submitting "how do I do 'x'?" questions!
Shadow Version
8.1.1
Gradle Version
8.5
Expected Behavior
Plugin does not violate project isolation constraints, no errors are raised when a project to which the plugin is applied which also enables project isolation is being imported into IntelliJ.
Actual Behavior
An error is thrown when a project to which the plugin is applied which also enables project isolation is being imported into IntelliJ. The following stacktrace is present in the configuration cache report generated upon the error:
That's because the plugin calls
getPlugins()
on therootProject
instance from sub projects which is not compatible with isolated projects.One fix for this problem would be to check if
com.gradle.enterprise
plugin is applied to theSettings
object (because that's what you should be applying the plugin in newer versions to according to the docs) rather than the root project object but sadly you cannot get to an instance ofSettings
from an instance ofProject
. Another fix would be for thecom.gradle.enterprise
plugin to register itself as a plugin onGradle
instance (to which you can get from an instance ofProject
) together with an instance ofGradleEnterpriseExtension
but for that we would probably need core Gradle team to change the implementation as I don't believe this is happening now (hard to tell givencom.gradle.enterprise
is closed source).As a workaround, I will reverse engineer
com.github.jengelman.gradle.plugins.shadow.ShadowPlugin
as I have a convention plugin applying it in my project and simply boil it down to:Nevertheless, it would be good if this plugin was compatible with project isolation out of the box.
The text was updated successfully, but these errors were encountered: