Skip to content

Commit 6fa4102

Browse files
committed
Add implicit dependency from gradle to platform
The Gradle plugin depends on Micronaut Platform, but it is not visible as a runtime dependency, because it's a dependency which is added at runtime _when the plugin is applied_. If we released the Gradle plugin simply considering the current graph, then a user applying the plugin would get a SNAPSHOT version of the platform. This commit updates the report tool to add a dependency so that it's clearly visible.
1 parent fc812dc commit 6fa4102

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

buildSrc/src/main/kotlin/io/micronaut/build/ProjectGraphBuilder.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,11 @@ abstract class ProjectGraphBuilder : DefaultTask() {
292292
allDependencies.split(",").forEach { dependency ->
293293
dependencies.add(dependency.toProjectName())
294294
}
295+
if (name == "gradle") {
296+
// Add an implicit dependency to platform, which is not captured by the tool
297+
// because it's added at runtime only by the plugin
298+
dependencies.add("platform")
299+
}
295300
}
296301
if (projectToMetadata.containsKey(name)) {
297302
throw IllegalStateException("Duplicate project name: $name, also found in $dependencyFile")

0 commit comments

Comments
 (0)