-
-
Notifications
You must be signed in to change notification settings - Fork 124
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
Failed to apply plugin with Gradle 7.1 #435
Comments
How are you applying this plugin to your project? It is tested against Gradle 7.1, so I'm not sure why this issue would only trigger for your project. A reproducer would be useful in this case. |
Hmm. I'm applying via the plugins block in the root build script:
I also have some configuration in the root build script:
And some further configuration in various subprojects, e.g.:
I'll see if I can come up with a reproducer. |
I seem to have resolved the issue. I found this in our root build script:
Since it seemed to do with evaluation order, on a whim I tried commenting it out to see what happened. The Dependency Analysis plugin applied successfully. At least after some initial testing that Gradle classloader locking issue hasn't cropped up. I've been progressively reworking the build from cross-project configuration to convention plugins, so perhaps the need for the workaround has been overcome by events. I'll report back if there are any further developments, but for now I'd say this can be closed. Thanks for the great plugin. |
Glad to hear it. Thanks for the quick follow up.
On July 1, 2021, GitHub ***@***.***> wrote:
I seem to have resolved the issue. I found this in our root build
script:
subprojects { // Without this, we were getting: //
***@***.***
// must be locked before it can be used to compute a classpath! // See
this workaround: https://github.com/gradle/kotlin-
dsl/issues/607#issuecomment-375687119 // for this open Gradle bug:
gradle/gradle#4823 parent!!.path.takeIf { it
!= rootProject.path }?.let { evaluationDependsOn(it) } ... }
Since it seemed to do with evaluation order, on a whim I tried
commenting it out to see what happened. The Dependency Analysis plugin
applied successfully.
At least after some initial testing that Gradle classloader locking
issue hasn't cropped up. I've been progressively reworking the build
from cross-project configuration to convention plugins, so perhaps the
need for the workaround has been overcome by events.
I'll report back if there are any further developments, but for now
I'd say this can be closed. Thanks for the great plugin.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/autonomousapps/dependency-analysis-android-gradle-
plugin/issues/435#issuecomment-872310565>, or unsubscribe
<https://github.com/notifications/unsubscribe-
auth/ABJG5PIC4UXSQQ2OHUVWZSTTVR55VANCNFSM47TKPEXQ>.
|
Please take a look at autonomousapps#435
@autonomousapps I have a similar problem installing this plugin in my project. It is a multiple module project with multiple dependencies. Adding the plugin in the project level build.gradle file gives the following error: Cannot run Project.afterEvaluate(Action) when the project is already evaluated |
Do you have a reproducer? |
The project is closed source so sadly not, I will however try to create a sample project on Github to try and reproduce the issue. |
Build scan link
Unfortunately I'm not permitted to provide a build scan of my project for security reasons. If necessary I can try to create a minimal reproducer and provide a scan of that, but this looks like a fairly straightforward case of deprecated API use. That is, straightforward from a cause standpoint, which is not to say that it's necessarily easy to fix.
Plugin version
0.74.0
Gradle version
7.1
(Optional) Android Gradle Plugin (AGP) version
Not an Android project.
Describe the bug
After upgrading to Gradle 7.1 I get a
ProjectConfigurationException
when applying the plugin.To Reproduce
Steps to reproduce the behavior:
Expected behavior
The project configures successfully.
Additional context
https://docs.gradle.org/7.1/userguide/upgrading_version_6.html#calling_project_afterevaluate_after_project_evaluation_is_now_an_error
The text was updated successfully, but these errors were encountered: