Skip to content

Commit 849b699

Browse files
authored
Merge pull request #48670 from Malandril/fix-gradle-dev
2 parents cd14dd9 + 254cfc1 commit 849b699

File tree

11 files changed

+181
-2
lines changed

11 files changed

+181
-2
lines changed

devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/QuarkusPlugin.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,11 +660,12 @@ private void setupQuarkusBuildTaskDeps(Project project, Project dep, Set<String>
660660
.ifPresent(quarkusTask -> quarkusTask.configure(t -> t.dependsOn(jarTask)));
661661
}
662662
});
663-
664663
getLazyTask(project, QUARKUS_DEV_TASK_NAME).ifPresent(quarkusDev -> {
665664
getLazyTask(project, JavaPlugin.PROCESS_RESOURCES_TASK_NAME)
666665
.ifPresent(t -> quarkusDev.configure(qd -> qd.dependsOn(t)));
667-
addDependencyOnJandexIfConfigured(dep, quarkusDev);
666+
if (project.getRootProject().equals(dep.getRootProject())) {
667+
addDependencyOnJandexIfConfigured(dep, quarkusDev);
668+
}
668669
});
669670

670671
visitProjectDependencies(project, dep, visited);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
plugins {
2+
java
3+
id("org.kordamp.gradle.jandex")
4+
}
5+
6+
repositories {
7+
mavenLocal {
8+
content {
9+
includeGroupByRegex("io.quarkus.*")
10+
includeGroup("org.hibernate.orm")
11+
}
12+
}
13+
mavenCentral()
14+
}
15+
16+
val quarkusPlatformGroupId: String by project
17+
val quarkusPlatformArtifactId: String by project
18+
val quarkusPlatformVersion: String by project
19+
20+
dependencies {
21+
implementation(enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}"))
22+
implementation("io.quarkus:quarkus-arc")
23+
implementation("io.quarkus:quarkus-rest")
24+
testImplementation("io.quarkus:quarkus-junit5")
25+
testImplementation("io.rest-assured:rest-assured")
26+
}
27+
28+
group = "org.acme"
29+
version = "1.0-SNAPSHOT"
30+
31+
tasks.withType<Test> {
32+
systemProperty("java.util.logging.manager", "org.jboss.logmanager.LogManager")
33+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package org.acme.nested;
2+
3+
import jakarta.enterprise.context.ApplicationScoped;
4+
5+
@ApplicationScoped
6+
public class SimpleService {
7+
public String hello(){
8+
return "included-kordamp";
9+
}
10+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
group = "org.acme"
3+
version = "1.0-SNAPSHOT"
4+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Quarkus Gradle TS
2+
#Tue May 06 21:43:16 CEST 2025
3+
quarkusPlatformArtifactId=quarkus-bom
4+
quarkusPlatformGroupId=io.quarkus
5+
quarkusPlatformVersion=${project.version}
6+
kordampJandexVersion=2.1.0
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
pluginManagement {
2+
val kordampJandexVersion: String by settings
3+
repositories {
4+
mavenLocal {
5+
content {
6+
includeGroupByRegex("io.quarkus.*")
7+
includeGroup("org.hibernate.orm")
8+
}
9+
}
10+
mavenCentral()
11+
gradlePluginPortal()
12+
}
13+
plugins {
14+
id("org.kordamp.gradle.jandex") version kordampJandexVersion
15+
}
16+
}
17+
18+
rootProject.name = "jandex-included-build-kordamp-subproject-nested"
19+
20+
include("acme-nested")
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
plugins {
2+
java
3+
id("io.quarkus")
4+
}
5+
6+
repositories {
7+
mavenLocal {
8+
content {
9+
includeGroupByRegex("io.quarkus.*")
10+
includeGroup("org.hibernate.orm")
11+
}
12+
}
13+
mavenCentral()
14+
}
15+
16+
val quarkusPlatformGroupId: String by project
17+
val quarkusPlatformArtifactId: String by project
18+
val quarkusPlatformVersion: String by project
19+
20+
dependencies {
21+
implementation("org.acme:acme-nested")
22+
implementation(enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}"))
23+
implementation("io.quarkus:quarkus-arc")
24+
implementation("io.quarkus:quarkus-rest")
25+
testImplementation("io.quarkus:quarkus-junit5")
26+
testImplementation("io.rest-assured:rest-assured")
27+
}
28+
29+
group = "org.acme"
30+
version = "1.0-SNAPSHOT"
31+
32+
tasks.withType<Test> {
33+
systemProperty("java.util.logging.manager", "org.jboss.logmanager.LogManager")
34+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Gradle properties
2+
quarkusPluginId=io.quarkus
3+
quarkusPlatformGroupId=io.quarkus
4+
quarkusPlatformArtifactId=quarkus-bom
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
pluginManagement {
2+
val quarkusPluginVersion: String by settings
3+
val quarkusPluginId: String by settings
4+
val kotlinVersion: String by settings
5+
repositories {
6+
mavenLocal {
7+
content {
8+
includeGroupByRegex("io.quarkus.*")
9+
includeGroup("org.hibernate.orm")
10+
}
11+
}
12+
mavenCentral()
13+
gradlePluginPortal()
14+
}
15+
plugins {
16+
id(quarkusPluginId) version quarkusPluginVersion
17+
}
18+
}
19+
rootProject.name = "jandex-included-build-kordamp-root"
20+
21+
includeBuild("acme-subproject-nested")
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package org.example;
2+
3+
import jakarta.inject.Inject;
4+
import jakarta.ws.rs.GET;
5+
import jakarta.ws.rs.Path;
6+
import jakarta.ws.rs.Produces;
7+
import jakarta.ws.rs.core.MediaType;
8+
import org.acme.nested.SimpleService;
9+
10+
@Path("/hello")
11+
public class ExampleResource {
12+
13+
@Inject
14+
SimpleService simpleService;
15+
16+
@GET
17+
@Produces(MediaType.TEXT_PLAIN)
18+
public String hello() {
19+
return "hello " + simpleService.hello();
20+
}
21+
22+
}

0 commit comments

Comments
 (0)