Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Fix missing builtBy() using Gradle 5 #179

Merged
merged 1 commit into from Mar 9, 2019
Merged

Fix missing builtBy() using Gradle 5 #179

merged 1 commit into from Mar 9, 2019

Conversation

mr-archano
Copy link
Contributor

Problem

I quickly tried to apply SNAPSHOT-43 to an existing project using Gradle 5.x and I experienced the following error:

> No signature of method: org.gradle.api.internal.file.UnionFileTree.builtBy() is applicable for argument types: (org.gradle.api.internal.tasks.DefaultSourceSetOutput_Decorated) values: [main classes]
  Possible solutions: filter(groovy.lang.Closure), filter(org.gradle.api.specs.Spec), filter(org.gradle.api.specs.Spec), countBy(groovy.lang.Closure)

Solution

The tree used to accumulate the content of each dir in classesDirs using plus() is of type UnionFileTree, so does not contain builtBy() (while ConfigurableTree does). The simplest solution is to apply builtBy to each subtree instead of the cumulative one.

@mr-archano mr-archano merged commit 661dbfe into develop Mar 9, 2019
@mr-archano mr-archano deleted the fix_built_by branch March 9, 2019 15:10
@mr-archano mr-archano added this to the 0.8.1 milestone Mar 9, 2019
@mr-archano mr-archano mentioned this pull request Mar 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants