From 4d0889d5745ae130949b0a2973a8e371a4d162b8 Mon Sep 17 00:00:00 2001 From: Zongle Wang Date: Fri, 6 Dec 2024 09:55:15 -0500 Subject: [PATCH] Use SetProperty on includes and excludes (#1092) --- api/shadow.api | 4 ++-- src/docs/changes/README.md | 4 ++-- .../gradle/plugins/shadow/relocation/SimpleRelocator.kt | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/api/shadow.api b/api/shadow.api index 1aefba242..c73a61e14 100644 --- a/api/shadow.api +++ b/api/shadow.api @@ -196,8 +196,8 @@ public class com/github/jengelman/gradle/plugins/shadow/relocation/SimpleRelocat public fun canRelocateClass (Ljava/lang/String;)Z public fun canRelocatePath (Ljava/lang/String;)Z public fun exclude (Ljava/lang/String;)Lcom/github/jengelman/gradle/plugins/shadow/relocation/SimpleRelocator; - public final fun getExcludes ()Lorg/gradle/api/provider/ListProperty; - public final fun getIncludes ()Lorg/gradle/api/provider/ListProperty; + public final fun getExcludes ()Lorg/gradle/api/provider/SetProperty; + public final fun getIncludes ()Lorg/gradle/api/provider/SetProperty; public fun include (Ljava/lang/String;)Lcom/github/jengelman/gradle/plugins/shadow/relocation/SimpleRelocator; public fun relocateClass (Lcom/github/jengelman/gradle/plugins/shadow/relocation/RelocateClassContext;)Ljava/lang/String; public fun relocatePath (Lcom/github/jengelman/gradle/plugins/shadow/relocation/RelocatePathContext;)Ljava/lang/String; diff --git a/src/docs/changes/README.md b/src/docs/changes/README.md index 2501e53dd..c3f88ef81 100644 --- a/src/docs/changes/README.md +++ b/src/docs/changes/README.md @@ -4,11 +4,11 @@ ## [Unreleased] -## [v9.0.0-beta3] (2024-12-06) +## [v9.0.0-beta] (2024-12-06) **Changed** -- **BREAKING CHANGE:** Some public getters are removed from `SimpleRelocator`, `includes` and `excludes` are exposed as `ListProperty`s. ([#1079](https://github.com/GradleUp/shadow/pull/1079)) +- **BREAKING CHANGE:** Some public getters are removed from `SimpleRelocator`, `includes` and `excludes` are exposed as `SetProperty`s. ([#1079](https://github.com/GradleUp/shadow/pull/1079)) **Fixed** diff --git a/src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/relocation/SimpleRelocator.kt b/src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/relocation/SimpleRelocator.kt index 327a80310..1fa662d35 100644 --- a/src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/relocation/SimpleRelocator.kt +++ b/src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/relocation/SimpleRelocator.kt @@ -3,7 +3,7 @@ package com.github.jengelman.gradle.plugins.shadow.relocation import java.util.regex.Pattern import org.codehaus.plexus.util.SelectorUtils import org.gradle.api.model.ObjectFactory -import org.gradle.api.provider.ListProperty +import org.gradle.api.provider.SetProperty import org.gradle.api.tasks.Input /** @@ -28,10 +28,10 @@ public open class SimpleRelocator @JvmOverloads constructor( private val shadedPathPattern: String @get:Input - public val includes: ListProperty = objectFactory.listProperty(String::class.java) + public val includes: SetProperty = objectFactory.setProperty(String::class.java) @get:Input - public val excludes: ListProperty = objectFactory.listProperty(String::class.java) + public val excludes: SetProperty = objectFactory.setProperty(String::class.java) init { if (rawString) {