Skip to content

Commit 3a1f2b4

Browse files
Sandra Thiemevlsi
Sandra Thieme
authored andcommitted
Use relative path sensitivity in the license gather plugin
This adds relative path sensitivity for configurations and extra licenses. This will avoid build caching issues with the extra licenses directory because cache keys will no longer depend on absolute paths.
1 parent 7944230 commit 3a1f2b4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

plugins/license-gather-plugin/src/main/kotlin/com/github/vlsi/gradle/license/GatherLicenseTask.kt

+4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ import org.gradle.api.tasks.InputFiles
4242
import org.gradle.api.tasks.Internal
4343
import org.gradle.api.tasks.Optional
4444
import org.gradle.api.tasks.OutputDirectory
45+
import org.gradle.api.tasks.PathSensitive
46+
import org.gradle.api.tasks.PathSensitivity
4547
import org.gradle.api.tasks.TaskAction
4648
import org.gradle.internal.component.external.model.DefaultModuleComponentIdentifier
4749
import org.gradle.kotlin.dsl.dependencies
@@ -106,6 +108,7 @@ open class GatherLicenseTask @Inject constructor(
106108
}
107109

108110
@InputFiles
111+
@PathSensitive(PathSensitivity.RELATIVE)
109112
val configurations = objectFactory.setProperty<Configuration>()
110113

111114
@Input
@@ -172,6 +175,7 @@ open class GatherLicenseTask @Inject constructor(
172175

173176
@InputFiles
174177
@Optional
178+
@PathSensitive(PathSensitivity.RELATIVE)
175179
val extraLicenseDir = objectFactory.directoryProperty().convention(
176180
project.layout.projectDirectory.dir("licenses")
177181
)

0 commit comments

Comments
 (0)