Skip to content
This repository was archived by the owner on Dec 20, 2025. It is now read-only.

Commit 1b0682a

Browse files
authored
refactor(deprecation): remove deprecated gradle constructs/features to be consumed by other spinnaker components (#194)
While executing the build script with --warning-mode=fail for fiat, gate, clouddriver, orca, front50, igor, echo and halyard received below error: ``` Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0 ``` And the common deprecated gradle feature is: ``` Copying or archiving duplicate paths with the default duplicates strategy has been deprecated. This is scheduled to be removed in Gradle 7.0. Explicitly set the duplicates strategy to 'DuplicatesStrategy.INCLUDE' if we want to allow duplicate paths. Consult the upgrading guide for further information: https://docs.gradle.org/6.8.3/userguide/upgrading_version_5.html#implicit_duplicate_strategy_for_copy_or_archive_tasks_has_been_deprecated ``` The issue is raised by `processResources` and `sourceJar` tasks and both inherit from `AbstractCopyTask`. So updated the tasks of type `AbstractCopyTask` with `duplicatesStrategy` property explicitly in `spinnaker-project-plugin`, that makes the property consumable by all spinnaker components.
1 parent 1a6d17b commit 1b0682a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

spinnaker-project-plugin/src/main/groovy/com/netflix/spinnaker/gradle/project/SpinnakerProjectPlugin.groovy

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ import com.netflix.spinnaker.gradle.publishing.PublishingPlugin
2222
import com.netflix.spinnaker.gradle.publishing.nexus.NexusPublishPlugin
2323
import org.gradle.api.Plugin
2424
import org.gradle.api.Project
25+
import org.gradle.api.file.DuplicatesStrategy
26+
import org.gradle.api.tasks.AbstractCopyTask
2527

2628
class SpinnakerProjectPlugin implements Plugin<Project> {
2729

@@ -31,5 +33,8 @@ class SpinnakerProjectPlugin implements Plugin<Project> {
3133
project.plugins.apply(PublishingPlugin)
3234
project.plugins.apply(ArtifactRegistryPublishPlugin)
3335
project.plugins.apply(NexusPublishPlugin)
36+
project.tasks.withType(AbstractCopyTask) {
37+
it.configure {setProperty("duplicatesStrategy",DuplicatesStrategy.EXCLUDE)}
38+
}
3439
}
3540
}

0 commit comments

Comments
 (0)