Skip to content

Commit 24273ee

Browse files
committed
Update extract dependencies task to match bom properties
1 parent 6268dce commit 24273ee

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

grails-gradle/docs-core/src/main/groovy/org/apache/grails/gradle/tasks/bom/ExtractDependenciesTask.groovy

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,13 @@ abstract class ExtractDependenciesTask extends DefaultTask {
133133
String artifactId = constraint.module.name as String
134134
String artifactVersion = constraint.version as String
135135

136-
if (constraint instanceof DefaultProjectDependencyConstraint) {
137-
if(artifactIdMappings.containsKey(constraint.name)) {
138-
artifactId = artifactIdMappings.get(constraint.name)
139-
}
136+
if(artifactIdMappings.containsKey(constraint.name)) {
137+
artifactId = artifactIdMappings.get(constraint.name)
140138
}
141139

142140
ExtractedDependencyConstraint extractConstraint = propertyNameCalculator.calculate(groupId, artifactId, artifactVersion, false) ?: new ExtractedDependencyConstraint(groupId: groupId, artifactId: artifactId, version: artifactVersion)
143141
extractConstraint.source = getProjectName().get()
142+
extractConstraint.versionPropertyReference = "\${${artifactId.replaceAll('-', '.')}.version}"
144143
constraints.put(new CoordinateHolder(groupId: extractConstraint.groupId, artifactId: extractConstraint.artifactId), extractConstraint)
145144
}
146145
}

0 commit comments

Comments
 (0)