diff --git a/src/main/kotlin/com/autonomousapps/tasks/AndroidScoreTask.kt b/src/main/kotlin/com/autonomousapps/tasks/AndroidScoreTask.kt index a94bf85df..c7806579a 100644 --- a/src/main/kotlin/com/autonomousapps/tasks/AndroidScoreTask.kt +++ b/src/main/kotlin/com/autonomousapps/tasks/AndroidScoreTask.kt @@ -13,6 +13,7 @@ import org.gradle.api.DefaultTask import org.gradle.api.file.DirectoryProperty import org.gradle.api.file.RegularFileProperty import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE import org.gradle.workers.WorkAction import org.gradle.workers.WorkParameters import org.gradle.workers.WorkerExecutor @@ -27,11 +28,11 @@ abstract class AndroidScoreTask @Inject constructor( description = "Infers if Android project could instead be a JVM project" } - @get:PathSensitive(PathSensitivity.NONE) + @get:PathSensitive(RELATIVE) @get:InputFile abstract val syntheticProject: RegularFileProperty - @get:PathSensitive(PathSensitivity.NONE) + @get:PathSensitive(RELATIVE) @get:InputDirectory abstract val dependencies: DirectoryProperty diff --git a/src/main/kotlin/com/autonomousapps/tasks/ArtifactsReportTask.kt b/src/main/kotlin/com/autonomousapps/tasks/ArtifactsReportTask.kt index d8a7bf7a5..ea79fe95d 100644 --- a/src/main/kotlin/com/autonomousapps/tasks/ArtifactsReportTask.kt +++ b/src/main/kotlin/com/autonomousapps/tasks/ArtifactsReportTask.kt @@ -16,6 +16,7 @@ import org.gradle.api.file.FileCollection import org.gradle.api.file.RegularFileProperty import org.gradle.api.provider.Property import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE /** * Produces a report of all the artifacts required to build the given project; i.e., the artifacts on the compile @@ -46,12 +47,9 @@ abstract class ArtifactsReportTask : DefaultTask() { /** * This is the "official" input for wiring task dependencies correctly, but is otherwise - * unused. This needs to use [InputFiles] and [PathSensitivity.ABSOLUTE] because the path to the - * jars really does matter here. Using [Classpath] is an error, as it looks only at content and - * not name or path, and we really do need to know the actual path to the artifact, even if its - * contents haven't changed. + * unused. */ - @PathSensitive(PathSensitivity.ABSOLUTE) + @Classpath @InputFiles fun getClasspathArtifactFiles(): FileCollection = artifacts.artifactFiles diff --git a/src/main/kotlin/com/autonomousapps/tasks/AssetSourceExploderTask.kt b/src/main/kotlin/com/autonomousapps/tasks/AssetSourceExploderTask.kt index e877169ed..17ba84e6b 100644 --- a/src/main/kotlin/com/autonomousapps/tasks/AssetSourceExploderTask.kt +++ b/src/main/kotlin/com/autonomousapps/tasks/AssetSourceExploderTask.kt @@ -13,6 +13,7 @@ import org.gradle.api.file.DirectoryProperty import org.gradle.api.file.ProjectLayout import org.gradle.api.file.RegularFileProperty import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE import org.gradle.workers.WorkAction import org.gradle.workers.WorkParameters import org.gradle.workers.WorkerExecutor @@ -28,7 +29,7 @@ abstract class AssetSourceExploderTask @Inject constructor( description = "Produces a report of all assets in this project" } - @get:PathSensitive(PathSensitivity.RELATIVE) + @get:PathSensitive(RELATIVE) @get:InputFiles abstract val androidLocalAssets: ConfigurableFileCollection diff --git a/src/main/kotlin/com/autonomousapps/tasks/BuildHealthTask.kt b/src/main/kotlin/com/autonomousapps/tasks/BuildHealthTask.kt index babf08192..225a7b3de 100644 --- a/src/main/kotlin/com/autonomousapps/tasks/BuildHealthTask.kt +++ b/src/main/kotlin/com/autonomousapps/tasks/BuildHealthTask.kt @@ -11,6 +11,7 @@ import org.gradle.api.tasks.Input import org.gradle.api.tasks.InputFile import org.gradle.api.tasks.PathSensitive import org.gradle.api.tasks.PathSensitivity +import org.gradle.api.tasks.PathSensitivity.RELATIVE import org.gradle.api.tasks.TaskAction abstract class BuildHealthTask : DefaultTask() { @@ -20,11 +21,11 @@ abstract class BuildHealthTask : DefaultTask() { description = "Generates holistic advice for whole project, and can fail the build if desired" } - @get:PathSensitive(PathSensitivity.NONE) + @get:PathSensitive(RELATIVE) @get:InputFile abstract val shouldFail: RegularFileProperty - @get:PathSensitive(PathSensitivity.NONE) + @get:PathSensitive(RELATIVE) @get:InputFile abstract val consoleReport: RegularFileProperty diff --git a/src/main/kotlin/com/autonomousapps/tasks/CodeSourceExploderTask.kt b/src/main/kotlin/com/autonomousapps/tasks/CodeSourceExploderTask.kt index 0d83e8048..96f025f58 100644 --- a/src/main/kotlin/com/autonomousapps/tasks/CodeSourceExploderTask.kt +++ b/src/main/kotlin/com/autonomousapps/tasks/CodeSourceExploderTask.kt @@ -14,6 +14,7 @@ import org.gradle.api.file.DirectoryProperty import org.gradle.api.file.ProjectLayout import org.gradle.api.file.RegularFileProperty import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE import org.gradle.workers.WorkAction import org.gradle.workers.WorkParameters import org.gradle.workers.WorkerExecutor @@ -33,22 +34,22 @@ abstract class CodeSourceExploderTask @Inject constructor( } /** The Groovy source of the current project. */ - @get:PathSensitive(PathSensitivity.RELATIVE) + @get:PathSensitive(RELATIVE) @get:InputFiles abstract val groovySourceFiles: ConfigurableFileCollection /** The Java source of the current project. */ - @get:PathSensitive(PathSensitivity.RELATIVE) + @get:PathSensitive(RELATIVE) @get:InputFiles abstract val javaSourceFiles: ConfigurableFileCollection /** The Kotlin source of the current project. */ - @get:PathSensitive(PathSensitivity.RELATIVE) + @get:PathSensitive(RELATIVE) @get:InputFiles abstract val kotlinSourceFiles: ConfigurableFileCollection /** The Scala source of the current project. */ - @get:PathSensitive(PathSensitivity.RELATIVE) + @get:PathSensitive(RELATIVE) @get:InputFiles abstract val scalaSourceFiles: ConfigurableFileCollection diff --git a/src/main/kotlin/com/autonomousapps/tasks/ComputeAdviceTask.kt b/src/main/kotlin/com/autonomousapps/tasks/ComputeAdviceTask.kt index d6239ad1c..49846d4cb 100644 --- a/src/main/kotlin/com/autonomousapps/tasks/ComputeAdviceTask.kt +++ b/src/main/kotlin/com/autonomousapps/tasks/ComputeAdviceTask.kt @@ -24,6 +24,7 @@ import org.gradle.api.provider.ListProperty import org.gradle.api.provider.Property import org.gradle.api.provider.SetProperty import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE import org.gradle.workers.WorkAction import org.gradle.workers.WorkParameters import org.gradle.workers.WorkerExecutor @@ -49,19 +50,19 @@ abstract class ComputeAdviceTask @Inject constructor( @get:Input abstract val buildPath: Property - @get:PathSensitive(PathSensitivity.RELATIVE) + @get:PathSensitive(RELATIVE) @get:InputFiles abstract val dependencyUsageReports: ListProperty - @get:PathSensitive(PathSensitivity.RELATIVE) + @get:PathSensitive(RELATIVE) @get:InputFiles abstract val dependencyGraphViews: ListProperty - @get:PathSensitive(PathSensitivity.RELATIVE) + @get:PathSensitive(RELATIVE) @get:InputFiles abstract val androidScoreReports: ListProperty - @get:PathSensitive(PathSensitivity.NONE) + @get:PathSensitive(RELATIVE) @get:InputFile abstract val declarations: RegularFileProperty @@ -81,7 +82,7 @@ abstract class ComputeAdviceTask @Inject constructor( abstract val kapt: Property @get:Optional - @get:PathSensitive(PathSensitivity.NONE) + @get:PathSensitive(RELATIVE) @get:InputFile abstract val redundantJvmPluginReport: RegularFileProperty diff --git a/src/main/kotlin/com/autonomousapps/tasks/ComputeDominatorTreeTask.kt b/src/main/kotlin/com/autonomousapps/tasks/ComputeDominatorTreeTask.kt index 99bc056f7..2bcce98cd 100644 --- a/src/main/kotlin/com/autonomousapps/tasks/ComputeDominatorTreeTask.kt +++ b/src/main/kotlin/com/autonomousapps/tasks/ComputeDominatorTreeTask.kt @@ -18,6 +18,7 @@ import org.gradle.api.DefaultTask import org.gradle.api.file.RegularFileProperty import org.gradle.api.provider.Property import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE import java.io.File @CacheableTask @@ -31,11 +32,11 @@ abstract class ComputeDominatorTreeTask : DefaultTask() { @get:Input abstract val projectPath: Property - @get:PathSensitive(PathSensitivity.NONE) + @get:PathSensitive(RELATIVE) @get:InputFile abstract val physicalArtifacts: RegularFileProperty - @get:PathSensitive(PathSensitivity.NONE) + @get:PathSensitive(RELATIVE) @get:InputFile abstract val graphView: RegularFileProperty diff --git a/src/main/kotlin/com/autonomousapps/tasks/ComputeDuplicateDependenciesTask.kt b/src/main/kotlin/com/autonomousapps/tasks/ComputeDuplicateDependenciesTask.kt index 6c2c69986..57687fc1a 100644 --- a/src/main/kotlin/com/autonomousapps/tasks/ComputeDuplicateDependenciesTask.kt +++ b/src/main/kotlin/com/autonomousapps/tasks/ComputeDuplicateDependenciesTask.kt @@ -11,6 +11,7 @@ import org.gradle.api.DefaultTask import org.gradle.api.file.ConfigurableFileCollection import org.gradle.api.file.RegularFileProperty import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE import java.util.SortedSet @CacheableTask @@ -21,7 +22,7 @@ abstract class ComputeDuplicateDependenciesTask : DefaultTask() { description = "Computes 'duplicate' external dependencies across entire build." } - @get:PathSensitive(PathSensitivity.RELATIVE) + @get:PathSensitive(RELATIVE) @get:InputFiles abstract val resolvedDependenciesReports: ConfigurableFileCollection diff --git a/src/main/kotlin/com/autonomousapps/tasks/ComputeResolvedDependenciesTask.kt b/src/main/kotlin/com/autonomousapps/tasks/ComputeResolvedDependenciesTask.kt index d4ba1f6da..7f7e55634 100644 --- a/src/main/kotlin/com/autonomousapps/tasks/ComputeResolvedDependenciesTask.kt +++ b/src/main/kotlin/com/autonomousapps/tasks/ComputeResolvedDependenciesTask.kt @@ -12,6 +12,7 @@ import org.gradle.api.file.RegularFile import org.gradle.api.file.RegularFileProperty import org.gradle.api.provider.ListProperty import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE @CacheableTask abstract class ComputeResolvedDependenciesTask : DefaultTask() { @@ -21,7 +22,7 @@ abstract class ComputeResolvedDependenciesTask : DefaultTask() { description = "Computes resolved external dependencies for all variants." } - @get:PathSensitive(PathSensitivity.RELATIVE) + @get:PathSensitive(RELATIVE) @get:InputFiles abstract val externalDependencies: ListProperty diff --git a/src/main/kotlin/com/autonomousapps/tasks/ComputeUsagesTask.kt b/src/main/kotlin/com/autonomousapps/tasks/ComputeUsagesTask.kt index d65835bb0..7c5d7b113 100644 --- a/src/main/kotlin/com/autonomousapps/tasks/ComputeUsagesTask.kt +++ b/src/main/kotlin/com/autonomousapps/tasks/ComputeUsagesTask.kt @@ -17,6 +17,7 @@ import org.gradle.api.file.DirectoryProperty import org.gradle.api.file.RegularFileProperty import org.gradle.api.provider.Property import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE import org.gradle.workers.WorkAction import org.gradle.workers.WorkParameters import org.gradle.workers.WorkerExecutor @@ -32,19 +33,19 @@ abstract class ComputeUsagesTask @Inject constructor( description = "Computes actual dependency usage" } - @get:PathSensitive(PathSensitivity.NONE) + @get:PathSensitive(RELATIVE) @get:InputFile abstract val graph: RegularFileProperty - @get:PathSensitive(PathSensitivity.NONE) + @get:PathSensitive(RELATIVE) @get:InputFile abstract val declarations: RegularFileProperty - @get:PathSensitive(PathSensitivity.NONE) + @get:PathSensitive(RELATIVE) @get:InputDirectory abstract val dependencies: DirectoryProperty - @get:PathSensitive(PathSensitivity.NONE) + @get:PathSensitive(RELATIVE) @get:InputFile abstract val syntheticProject: RegularFileProperty diff --git a/src/main/kotlin/com/autonomousapps/tasks/ExplodeJarTask.kt b/src/main/kotlin/com/autonomousapps/tasks/ExplodeJarTask.kt index b9cd1dd30..96bb67d9d 100644 --- a/src/main/kotlin/com/autonomousapps/tasks/ExplodeJarTask.kt +++ b/src/main/kotlin/com/autonomousapps/tasks/ExplodeJarTask.kt @@ -17,6 +17,7 @@ import org.gradle.api.file.ConfigurableFileCollection import org.gradle.api.file.RegularFileProperty import org.gradle.api.provider.Property import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE import org.gradle.workers.WorkAction import org.gradle.workers.WorkParameters import org.gradle.workers.WorkerExecutor @@ -40,13 +41,13 @@ abstract class ExplodeJarTask @Inject constructor( abstract val compileClasspath: ConfigurableFileCollection /** [`Set`][com.autonomousapps.model.PhysicalArtifact]. */ - @get:PathSensitive(PathSensitivity.RELATIVE) + @get:PathSensitive(RELATIVE) @get:InputFile abstract val physicalArtifacts: RegularFileProperty /** [`Set?`][com.autonomousapps.model.intermediates.AndroidLinterDependency] */ @get:Optional - @get:PathSensitive(PathSensitivity.NONE) + @get:PathSensitive(RELATIVE) @get:InputFile abstract val androidLinters: RegularFileProperty diff --git a/src/main/kotlin/com/autonomousapps/tasks/FilterAdviceTask.kt b/src/main/kotlin/com/autonomousapps/tasks/FilterAdviceTask.kt index 94f98ea1e..7006525c8 100644 --- a/src/main/kotlin/com/autonomousapps/tasks/FilterAdviceTask.kt +++ b/src/main/kotlin/com/autonomousapps/tasks/FilterAdviceTask.kt @@ -18,6 +18,7 @@ import org.gradle.api.file.RegularFileProperty import org.gradle.api.provider.ListProperty import org.gradle.api.provider.Property import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE import org.gradle.workers.WorkAction import org.gradle.workers.WorkParameters import org.gradle.workers.WorkerExecutor @@ -33,7 +34,7 @@ abstract class FilterAdviceTask @Inject constructor( description = "Filter merged advice based on user preferences" } - @get:PathSensitive(PathSensitivity.NONE) + @get:PathSensitive(RELATIVE) @get:InputFile abstract val projectAdvice: RegularFileProperty diff --git a/src/main/kotlin/com/autonomousapps/tasks/FindAndroidAssetProviders.kt b/src/main/kotlin/com/autonomousapps/tasks/FindAndroidAssetProviders.kt index da05f8f36..b0a1740d6 100644 --- a/src/main/kotlin/com/autonomousapps/tasks/FindAndroidAssetProviders.kt +++ b/src/main/kotlin/com/autonomousapps/tasks/FindAndroidAssetProviders.kt @@ -13,6 +13,7 @@ import org.gradle.api.artifacts.ArtifactCollection import org.gradle.api.file.FileCollection import org.gradle.api.file.RegularFileProperty import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE abstract class FindAndroidAssetProviders : DefaultTask() { @@ -27,7 +28,7 @@ abstract class FindAndroidAssetProviders : DefaultTask() { this.assetDirs = assets } - @PathSensitive(PathSensitivity.RELATIVE) + @PathSensitive(RELATIVE) @InputFiles fun getAssetArtifactFiles(): FileCollection = assetDirs.artifactFiles diff --git a/src/main/kotlin/com/autonomousapps/tasks/FindInlineMembersTask.kt b/src/main/kotlin/com/autonomousapps/tasks/FindInlineMembersTask.kt index d1706c3af..2f51ebc00 100644 --- a/src/main/kotlin/com/autonomousapps/tasks/FindInlineMembersTask.kt +++ b/src/main/kotlin/com/autonomousapps/tasks/FindInlineMembersTask.kt @@ -23,6 +23,7 @@ import org.gradle.api.file.ConfigurableFileCollection import org.gradle.api.file.RegularFileProperty import org.gradle.api.provider.Property import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE import org.gradle.workers.WorkAction import org.gradle.workers.WorkParameters import org.gradle.workers.WorkerExecutor @@ -49,7 +50,7 @@ abstract class FindInlineMembersTask @Inject constructor( abstract val compileClasspath: ConfigurableFileCollection /** [PhysicalArtifact]s used to compile this project. */ - @get:PathSensitive(PathSensitivity.RELATIVE) + @get:PathSensitive(RELATIVE) @get:InputFile abstract val artifacts: RegularFileProperty diff --git a/src/main/kotlin/com/autonomousapps/tasks/FindNativeLibsTask.kt b/src/main/kotlin/com/autonomousapps/tasks/FindNativeLibsTask.kt index 3abf61479..b63609031 100644 --- a/src/main/kotlin/com/autonomousapps/tasks/FindNativeLibsTask.kt +++ b/src/main/kotlin/com/autonomousapps/tasks/FindNativeLibsTask.kt @@ -11,6 +11,7 @@ import org.gradle.api.artifacts.ArtifactCollection import org.gradle.api.file.FileCollection import org.gradle.api.file.RegularFileProperty import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE @CacheableTask abstract class FindNativeLibsTask : DefaultTask() { @@ -26,7 +27,7 @@ abstract class FindNativeLibsTask : DefaultTask() { this.androidJni = androidJni } - @PathSensitive(PathSensitivity.RELATIVE) + @PathSensitive(RELATIVE) @InputFiles fun getAndroidJniFiles(): FileCollection = androidJni.artifactFiles diff --git a/src/main/kotlin/com/autonomousapps/tasks/GenerateBuildHealthTask.kt b/src/main/kotlin/com/autonomousapps/tasks/GenerateBuildHealthTask.kt index c00b5c339..6cd5fb333 100644 --- a/src/main/kotlin/com/autonomousapps/tasks/GenerateBuildHealthTask.kt +++ b/src/main/kotlin/com/autonomousapps/tasks/GenerateBuildHealthTask.kt @@ -19,6 +19,7 @@ import org.gradle.api.file.RegularFileProperty import org.gradle.api.provider.MapProperty import org.gradle.api.provider.Property import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE @CacheableTask abstract class GenerateBuildHealthTask : DefaultTask() { @@ -28,7 +29,7 @@ abstract class GenerateBuildHealthTask : DefaultTask() { description = "Generates json report for build health" } - @get:PathSensitive(PathSensitivity.RELATIVE) + @get:PathSensitive(RELATIVE) @get:InputFiles abstract val projectHealthReports: ConfigurableFileCollection diff --git a/src/main/kotlin/com/autonomousapps/tasks/SynthesizeDependenciesTask.kt b/src/main/kotlin/com/autonomousapps/tasks/SynthesizeDependenciesTask.kt index d06ccd509..2c04b1e84 100644 --- a/src/main/kotlin/com/autonomousapps/tasks/SynthesizeDependenciesTask.kt +++ b/src/main/kotlin/com/autonomousapps/tasks/SynthesizeDependenciesTask.kt @@ -12,6 +12,7 @@ import org.gradle.api.file.DirectoryProperty import org.gradle.api.file.RegularFileProperty import org.gradle.api.provider.Property import org.gradle.api.tasks.* +import org.gradle.api.tasks.PathSensitivity.RELATIVE import org.gradle.workers.WorkAction import org.gradle.workers.WorkParameters import org.gradle.workers.WorkerExecutor @@ -35,31 +36,31 @@ abstract class SynthesizeDependenciesTask @Inject constructor( @get:Input abstract val projectPath: Property - @get:PathSensitive(PathSensitivity.NONE) + @get:PathSensitive(RELATIVE) @get:InputFile abstract val compileDependencies: RegularFileProperty - @get:PathSensitive(PathSensitivity.NONE) + @get:PathSensitive(RELATIVE) @get:InputFile abstract val physicalArtifacts: RegularFileProperty - @get:PathSensitive(PathSensitivity.NONE) + @get:PathSensitive(RELATIVE) @get:InputFile abstract val explodedJars: RegularFileProperty - @get:PathSensitive(PathSensitivity.NONE) + @get:PathSensitive(RELATIVE) @get:InputFile abstract val inlineMembers: RegularFileProperty - @get:PathSensitive(PathSensitivity.NONE) + @get:PathSensitive(RELATIVE) @get:InputFile abstract val typealiases: RegularFileProperty - @get:PathSensitive(PathSensitivity.NONE) + @get:PathSensitive(RELATIVE) @get:InputFile abstract val serviceLoaders: RegularFileProperty - @get:PathSensitive(PathSensitivity.NONE) + @get:PathSensitive(RELATIVE) @get:InputFile abstract val annotationProcessors: RegularFileProperty @@ -68,22 +69,22 @@ abstract class SynthesizeDependenciesTask @Inject constructor( */ @get:Optional - @get:PathSensitive(PathSensitivity.NONE) + @get:PathSensitive(RELATIVE) @get:InputFile abstract val manifestComponents: RegularFileProperty @get:Optional - @get:PathSensitive(PathSensitivity.NONE) + @get:PathSensitive(RELATIVE) @get:InputFile abstract val androidRes: RegularFileProperty @get:Optional - @get:PathSensitive(PathSensitivity.NONE) + @get:PathSensitive(RELATIVE) @get:InputFile abstract val nativeLibs: RegularFileProperty @get:Optional - @get:PathSensitive(PathSensitivity.NONE) + @get:PathSensitive(RELATIVE) @get:InputFile abstract val androidAssets: RegularFileProperty