Skip to content

Commit

Permalink
POM generation now works when the platform project is used
Browse files Browse the repository at this point in the history
The POM is generated based on the declared dependency. This is good
enough for the snapshot builds (and could in fact be good enough for
release builds, too).
  • Loading branch information
sergej-koscejev committed Sep 16, 2024
1 parent ee8adf4 commit 5053fee
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions build/com.mbeddr/languages/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,22 @@ publishing {
artifact(package_mbeddr) {}
pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
configurations.mbeddrPlatform.resolvedConfiguration.firstLevelModuleDependencies.each{
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.moduleGroup)
dependencyNode.appendNode('artifactId', it.moduleName)
dependencyNode.appendNode('version', it.moduleVersion)
dependencyNode.appendNode('type', it.moduleArtifacts[0].type)
if (usePrebuiltPlatform) {
configurations.mbeddrPlatform.resolvedConfiguration.firstLevelModuleDependencies.each {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.moduleGroup)
dependencyNode.appendNode('artifactId', it.moduleName)
dependencyNode.appendNode('version', it.moduleVersion)
dependencyNode.appendNode('type', it.moduleArtifacts[0].type)
}
} else {
configurations.mbeddrPlatform.allDependencies.each {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
dependencyNode.appendNode('type', 'zip')
}
}
}
pom additionalPomInfo
Expand Down

0 comments on commit 5053fee

Please sign in to comment.