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

UnusedTracker: path may not be null or empty string. path='null' with versioned project api dependency #495

Closed
jd3nn1s opened this issue Jun 2, 2019 · 0 comments
Milestone

Comments

@jd3nn1s
Copy link

jd3nn1s commented Jun 2, 2019

Shadow Version

5.0.0

Gradle Version

5.4.0

Expected Behavior

Shadow jar is produced, no exception occurs

Actual Behavior

Caused by: java.lang.IllegalArgumentException: path may not be null or empty string. path='null' at org.gradle.api.internal.file.AbstractBaseDirFileResolver.doResolve(AbstractBaseDirFileResolver.java:64) at org.gradle.api.internal.file.AbstractFileResolver.resolve(AbstractFileResolver.java:79) at org.gradle.api.internal.file.AbstractFileResolver.resolve(AbstractFileResolver.java:58) at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext$FileCollectionConverter.convertInto(DefaultFileCollectionResolveContext.java:180) at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve(DefaultFileCollectionResolveContext.java:135) at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileCollections(DefaultFileCollectionResolveContext.java:92) at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext$FileCollectionConverter.convertInto(DefaultFileCollectionResolveContext.java:164) at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve(DefaultFileCollectionResolveContext.java:109) at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileCollections(DefaultFileCollectionResolveContext.java:92) at org.gradle.api.internal.file.CompositeFileCollection.getSourceCollections(CompositeFileCollection.java:192) at org.gradle.api.internal.file.CompositeFileCollection.iterator(CompositeFileCollection.java:59) at com.github.jengelman.gradle.plugins.shadow.internal.UnusedTracker.<init>(UnusedTracker.groovy:22) at com.github.jengelman.gradle.plugins.shadow.internal.UnusedTracker.forProject(UnusedTracker.groovy:49) at com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar.createCopyAction(ShadowJar.java:80)

shadowJar adds a null entry to the list of api dependencies. The jar file that is missing is the jar file for an API project dependency that has a version number:

apiJars.add(runtimeConfiguration.find { it.name.endsWith("${dep.name}.jar") } as File)

#477 fixes this error for me.

@johnrengelman johnrengelman added this to the 5.1.0 milestone Jun 29, 2019
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