forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
forcing initializing compilejava if empty
- Loading branch information
Showing
14 changed files
with
498 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...on-tests/gradle/src/main/resources/grpc-multi-module-no-java/application/build.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
plugins { | ||
id("io.quarkus") | ||
} | ||
|
||
dependencies { | ||
implementation(project(":module1")) | ||
|
||
implementation("io.quarkus:quarkus-rest-jackson") | ||
implementation("io.quarkus:quarkus-rest") | ||
implementation("io.quarkus:quarkus-kotlin") | ||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") | ||
implementation("io.quarkus:quarkus-arc") | ||
implementation("io.quarkus:quarkus-grpc") | ||
|
||
testImplementation("io.quarkus:quarkus-junit5") | ||
testImplementation("io.rest-assured:rest-assured") | ||
} |
23 changes: 23 additions & 0 deletions
23
...ources/grpc-multi-module-no-java/application/src/main/kotlin/org/acme/GreetingResource.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package org.acme | ||
|
||
import io.quarkus.grpc.GrpcClient | ||
import jakarta.ws.rs.GET | ||
import jakarta.ws.rs.Path | ||
import jakarta.ws.rs.Produces | ||
import jakarta.ws.rs.core.MediaType | ||
import org.acme.module1.SomeClass1 | ||
import org.acme.proto.Greeter | ||
|
||
@Path("/version") | ||
class GreetingResource { | ||
|
||
@GrpcClient | ||
lateinit var hello: Greeter | ||
|
||
@GET | ||
@Produces(MediaType.TEXT_PLAIN) | ||
fun getVersion(): String { | ||
return SomeClass1().getVersion() | ||
} | ||
} | ||
|
285 changes: 285 additions & 0 deletions
285
...es/grpc-multi-module-no-java/application/src/main/resources/META-INF/resources/index.html
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...resources/grpc-multi-module-no-java/application/src/main/resources/application.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
quarkus.generate-code.grpc.scan-for-proto=org.acme:module1 |
43 changes: 43 additions & 0 deletions
43
integration-tests/gradle/src/main/resources/grpc-multi-module-no-java/build.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
plugins { | ||
kotlin("jvm") version "2.0.21" | ||
kotlin("plugin.allopen") version "2.0.21" | ||
|
||
id("io.quarkus") apply false | ||
} | ||
allprojects { | ||
|
||
repositories { | ||
mavenLocal { | ||
content { | ||
includeGroupByRegex("io.quarkus.*") | ||
includeGroup("org.hibernate.orm") | ||
} | ||
} | ||
mavenCentral() | ||
} | ||
|
||
} | ||
subprojects { | ||
apply(plugin = "org.jetbrains.kotlin.jvm") | ||
apply(plugin = "org.jetbrains.kotlin.plugin.allopen") | ||
|
||
|
||
tasks.withType<Test> { | ||
systemProperty("java.util.logging.manager", "org.jboss.logmanager.LogManager") | ||
} | ||
|
||
val quarkusPlatformGroupId: String by project | ||
val quarkusPlatformArtifactId: String by project | ||
val quarkusPlatformVersion: String by project | ||
|
||
dependencies { | ||
implementation(enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}")) | ||
} | ||
|
||
allOpen { | ||
annotation("jakarta.ws.rs.Path") | ||
annotation("jakarta.enterprise.context.ApplicationScoped") | ||
annotation("jakarta.persistence.Entity") | ||
annotation("io.quarkus.test.junit.QuarkusTest") | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
integration-tests/gradle/src/main/resources/grpc-multi-module-no-java/gradle.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
quarkusPlatformArtifactId=quarkus-bom | ||
quarkusPlatformGroupId=io.quarkus | ||
|
||
group=org.acme | ||
version=1.0.0-SNAPSHOT |
Empty file.
7 changes: 7 additions & 0 deletions
7
...esources/grpc-multi-module-no-java/module1/src/main/kotlin/org/acme/module1/SomeClass1.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package org.acme.module1 | ||
|
||
class SomeClass1 { | ||
fun getVersion(): String { | ||
return "123" | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...c/main/resources/grpc-multi-module-no-java/module1/src/main/resources/proto/module1.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
syntax = "proto3"; | ||
|
||
option java_multiple_files = true; | ||
option java_package = "org.acme.proto"; | ||
option java_outer_classname = "HelloWorldProto"; | ||
|
||
package helloworld; | ||
|
||
// The greeting service definition. | ||
service Greeter { | ||
// Sends a greeting | ||
rpc SayHello (HelloRequest) returns (HelloReply) {} | ||
} | ||
|
||
// The request message containing the user's name. | ||
message HelloRequest { | ||
string name = 1; | ||
} | ||
|
||
// The response message containing the greetings | ||
message HelloReply { | ||
string message = 1; | ||
} |
22 changes: 22 additions & 0 deletions
22
integration-tests/gradle/src/main/resources/grpc-multi-module-no-java/settings.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
pluginManagement { | ||
repositories { | ||
mavenLocal { | ||
content { | ||
includeGroupByRegex 'io.quarkus.*' | ||
includeGroup 'org.hibernate.orm' | ||
} | ||
} | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
//noinspection GroovyAssignabilityCheck | ||
plugins { | ||
id 'io.quarkus' version "${quarkusPluginVersion}" | ||
} | ||
} | ||
|
||
rootProject.name = 'quarkus-grpc-multi-module-no-java' | ||
|
||
include ':module1' | ||
include ':application' | ||
|
27 changes: 27 additions & 0 deletions
27
...n-tests/gradle/src/test/java/io/quarkus/gradle/GrpcMultiModuleNoJavaQuarkusBuildTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package io.quarkus.gradle; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import java.io.File; | ||
import java.nio.file.Path; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
public class GrpcMultiModuleNoJavaQuarkusBuildTest extends QuarkusGradleWrapperTestBase { | ||
|
||
@Test | ||
public void testGrpcMultiModuleBuild() throws Exception { | ||
|
||
final File projectDir = getProjectDir("grpc-multi-module-no-java"); | ||
|
||
final BuildResult build = runGradleWrapper(projectDir, "clean", "build"); | ||
assertThat(BuildResult.isSuccessful(build.getTasks().get(":application:quarkusBuild"))).isTrue(); | ||
assertThat(BuildResult.isSuccessful(build.getTasks().get(":application:quarkusAppPartsBuild"))).isTrue(); | ||
|
||
final Path applicationLib = projectDir.toPath().resolve("application").resolve("build").resolve("quarkus-app") | ||
.resolve("lib").resolve("main"); | ||
assertThat(applicationLib).exists(); | ||
assertThat(applicationLib.resolve("org.acme.module1-1.0.0-SNAPSHOT.jar")).exists(); | ||
} | ||
|
||
} |