File tree Expand file tree Collapse file tree
variant-artifacts/src/main/kotlin/com/autonomousapps/artifacts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,9 +54,10 @@ public class Publisher<T : Named>(
5454 artifactDescription : ArtifactDescription <* >,
5555 ): Publisher <out Named > {
5656 val artifactName = artifactDescription.name.camelCase()
57- return if (project.extensions.extraProperties.has(artifactName)) {
57+ val key = " $artifactName -publisher"
58+ return if (project.extensions.extraProperties.has(key)) {
5859 @Suppress(" UNCHECKED_CAST" )
59- project.extensions.extraProperties[artifactName ] as Publisher <Named >
60+ project.extensions.extraProperties[key ] as Publisher <Named >
6061 } else {
6162 // Register new attribute with attribute schema
6263 val strategy = project.dependencies.attributesSchema.attribute(artifactDescription.attribute)
@@ -69,7 +70,7 @@ public class Publisher<T : Named>(
6970 attributeMatchingStrategy = strategy,
7071 ).also {
7172 // memoize the value
72- project.extensions.extraProperties[artifactName ] = it
73+ project.extensions.extraProperties[key ] = it
7374 }
7475 }
7576 }
Original file line number Diff line number Diff line change @@ -54,9 +54,10 @@ public class Resolver<T : Named>(
5454 artifactDescription : ArtifactDescription <* >,
5555 ): Resolver <out Named > {
5656 val artifactName = artifactDescription.name.camelCase()
57- return if (project.extensions.extraProperties.has(artifactName)) {
57+ val key = " $artifactName -resolver"
58+ return if (project.extensions.extraProperties.has(key)) {
5859 @Suppress(" UNCHECKED_CAST" )
59- project.extensions.extraProperties[artifactName ] as Resolver <Named >
60+ project.extensions.extraProperties[key ] as Resolver <Named >
6061 } else {
6162 // Register new attribute with attribute schema
6263 val strategy = project.dependencies.attributesSchema.attribute(artifactDescription.attribute)
@@ -69,7 +70,7 @@ public class Resolver<T : Named>(
6970 attributeMatchingStrategy = strategy,
7071 ).also {
7172 // memoize the value
72- project.extensions.extraProperties[artifactName ] = it
73+ project.extensions.extraProperties[key ] = it
7374 }
7475 }
7576 }
You can’t perform that action at this time.
0 commit comments