@@ -33,7 +33,7 @@ class InstrumentationNamingPlugin : Plugin<Project> {
3333
3434 doLast {
3535 val instrumentationsDir = target.rootProject.file(extension.instrumentationsDir)
36- val exclusions = extension.exclusions.get().toSet()
36+ val exclusions = extension.exclusions.get()
3737 val suffixes = extension.suffixes.get()
3838
3939 if (! instrumentationsDir.exists() || ! instrumentationsDir.isDirectory) {
@@ -62,8 +62,8 @@ class InstrumentationNamingPlugin : Plugin<Project> {
6262
6363 To exclude specific modules or customize suffixes, configure the plugin:
6464 instrumentationNaming {
65- exclusions.set(listOf ("module-name"))
66- suffixes.set(listOf ("-common", "-stubs"))
65+ exclusions.set(setOf ("module-name"))
66+ suffixes.set(setOf ("-common", "-stubs"))
6767 }
6868 """ .trimIndent())
6969 }
@@ -78,7 +78,7 @@ class InstrumentationNamingPlugin : Plugin<Project> {
7878 private fun validateInstrumentations (
7979 instrumentationsDir : File ,
8080 exclusions : Set <String >,
81- suffixes : List <String >
81+ suffixes : Set <String >
8282 ): List <NamingViolation > {
8383 val violations = mutableListOf<NamingViolation >()
8484
@@ -123,7 +123,7 @@ class InstrumentationNamingPlugin : Plugin<Project> {
123123 moduleName : String ,
124124 parentName : String ,
125125 relativePath : String ,
126- suffixes : List <String >
126+ suffixes : Set <String >
127127 ): List <NamingViolation > {
128128 // Rule 1: Module name must end with version pattern or one of the configured suffixes
129129 validateVersionOrSuffix(moduleName, relativePath, suffixes)?.let { return listOf (it) }
@@ -146,7 +146,7 @@ class InstrumentationNamingPlugin : Plugin<Project> {
146146 private fun validateLeafModuleName (
147147 moduleName : String ,
148148 relativePath : String ,
149- suffixes : List <String >
149+ suffixes : Set <String >
150150 ): NamingViolation ? {
151151 return validateVersionOrSuffix(moduleName, relativePath, suffixes)
152152 }
@@ -157,7 +157,7 @@ class InstrumentationNamingPlugin : Plugin<Project> {
157157 private fun validateVersionOrSuffix (
158158 moduleName : String ,
159159 relativePath : String ,
160- suffixes : List <String >
160+ suffixes : Set <String >
161161 ): NamingViolation ? {
162162 val endsWithSuffix = suffixes.any { moduleName.endsWith(it) }
163163 val endsWithVersion = versionPattern.containsMatchIn(moduleName)
0 commit comments