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

When used in a multi-project build, forces all other project's 'jar' tasks to be built regardless of if it depends on them or not #76

Closed
mkobit opened this issue Aug 13, 2019 · 1 comment

Comments

@mkobit
Copy link

mkobit commented Aug 13, 2019

Caused by

def jarTasks = project.rootProject.getTasksByName('jar', true).toArray()

Would it be possible to use only dependencies on other projects? Possibly use variant-aware dependency management to select the jar variant from other projects instead?

@siordache
Copy link
Member

siordache commented Aug 25, 2019

In release 2.15.0, dependsOn is called only for the jar tasks of the projects on which this project depends:

project.afterEvaluate {
def projects = Util.getAllDependentProjects(project) + project
def jarTasks = projects*.getTasksByName('jar', true).flatten() as Task[]
dependsOn(jarTasks)
}

I know this is not an ideal solution. It would be great if you can submit a pull request that uses variant-aware dependency management.

EDIT: please use 2.15.1 to avoid the StackOverflowError reported in issue #79.

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