Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,22 @@ public abstract class ShadowJar : Jar() {

@get:Classpath
public open val toMinimize: ConfigurableFileCollection = objectFactory.fileCollection {
_minimizeJar.map {
if (it) (_minimizeSpec.resolve(configurations.get()) - apiJars) else emptySet()
// Avoid resolving classpath files during task input snapshotting when minimization is disabled.
_minimizeJar.flatMap {
if (it) {
configurations.map { configs -> _minimizeSpec.resolve(configs) - apiJars }
} else {
project.provider { emptySet() }
Comment thread
Goooler marked this conversation as resolved.
}
}
}

@get:Classpath
public open val apiJars: ConfigurableFileCollection = objectFactory.fileCollection {
_minimizeJar.map { if (it) project.getApiJars() else emptySet<File>() }
// Avoid resolving classpath files during task input snapshotting when minimization is disabled.
_minimizeJar.flatMap {
if (it) project.getApiJars() else project.provider { emptyList() }
}
}

@get:InputFiles
Expand Down