Skip to content
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

Apply plugin in multi project gradle configure error #265

Closed
DaiYuANg opened this issue Mar 4, 2024 · 2 comments
Closed

Apply plugin in multi project gradle configure error #265

DaiYuANg opened this issue Mar 4, 2024 · 2 comments

Comments

@DaiYuANg
Copy link
Contributor

DaiYuANg commented Mar 4, 2024

I have a root project include subproject like

  • root project
    • subproject 1
    • subproject 2

When my root project applies this plugin and implementation my subproject 1 and 2 that will show this error

Cause: org.gradle.api.internal.initialization.DefaultClassLoaderScope@xxxx must be locked before it can be used to compute a classpath!
@DaiYuANg
Copy link
Contributor Author

DaiYuANg commented Mar 5, 2024

This error at
PrepareMergedJarsDirTask.groovy:70

 PrepareMergedJarsDirTask() {
        description = 'Merges all non-modularized jars into a single module'
        project.afterEvaluate {
            def projects = Util.getAllDependentProjects(project) + project
            def jarTasks = projects*.getTasksByName('jar', true).flatten() as Task[]
            dependsOn(jarTasks)
        }
    }

@xzel23
Copy link
Collaborator

xzel23 commented Nov 6, 2024

Included in 3.1.0-rc-1. It would be nice if you could provide a PR that includes a test case anyway. I use multiple modules in some of my own projects and they work with your changes, but these also worked before including the change, probably because of another project structure.

@xzel23 xzel23 closed this as completed Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants