diff --git a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/build.gradle-template.ftl b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/build.gradle-template.ftl index b94baf6e2f4be..12c28408aa14a 100644 --- a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/build.gradle-template.ftl +++ b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/kotlin/build.gradle-template.ftl @@ -21,7 +21,7 @@ repositories { } dependencies { - implementation enforcedPlatform("io.quarkus:quarkus-bom:${quarkusVersion}") + implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}") implementation 'io.quarkus:quarkus-resteasy' implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8' diff --git a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/build.gradle-template.ftl b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/build.gradle-template.ftl index a46c098e91d7a..91ce5f938489a 100644 --- a/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/build.gradle-template.ftl +++ b/devtools/platform-descriptor-json/src/main/resources/templates/basic-rest/scala/build.gradle-template.ftl @@ -21,7 +21,7 @@ repositories { } dependencies { - implementation enforcedPlatform("io.quarkus:quarkus-bom:${quarkusVersion}") + implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}") implementation 'io.quarkus:quarkus-resteasy' testImplementation 'io.quarkus:quarkus-junit5' diff --git a/independent-projects/tools/common/src/main/java/io/quarkus/cli/commands/file/GradleBuildFile.java b/independent-projects/tools/common/src/main/java/io/quarkus/cli/commands/file/GradleBuildFile.java index fb7d1ce0d6ab6..7487ac3e87639 100644 --- a/independent-projects/tools/common/src/main/java/io/quarkus/cli/commands/file/GradleBuildFile.java +++ b/independent-projects/tools/common/src/main/java/io/quarkus/cli/commands/file/GradleBuildFile.java @@ -192,7 +192,9 @@ protected boolean hasDependency(Extension extension) throws IOException { @Override protected boolean containsBOM() throws IOException { - return getModel().getBuildContent().contains("enforcedPlatform(\"${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:"); + String buildContent = getModel().getBuildContent(); + return buildContent.contains("enforcedPlatform(\"${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:") + || buildContent.contains("enforcedPlatform(\"" + MojoUtils.getBomGroupId() + ":" + MojoUtils.getBomArtifactId() + ":"); } @Override