-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19812 from glefloch/fix/18166
Do not propagate java compiler argument in kotlin compilation provider
- Loading branch information
Showing
7 changed files
with
99 additions
and
2 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
26 changes: 26 additions & 0 deletions
26
integration-tests/gradle/src/main/resources/basic-kotlin-application-project/build.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,26 @@ | ||
plugins { | ||
id 'org.jetbrains.kotlin.jvm' | ||
id 'io.quarkus' | ||
} | ||
|
||
repositories { | ||
if (System.properties.containsKey('maven.repo.local')) { | ||
maven { | ||
url System.properties.get('maven.repo.local') | ||
} | ||
} else { | ||
mavenLocal() | ||
} | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8' | ||
implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}") | ||
implementation 'io.quarkus:quarkus-resteasy' | ||
implementation 'io.quarkus:quarkus-kotlin' | ||
} | ||
|
||
compileJava { | ||
options.compilerArgs << '-parameters' | ||
} |
4 changes: 4 additions & 0 deletions
4
...ration-tests/gradle/src/main/resources/basic-kotlin-application-project/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,4 @@ | ||
kotlinVersion=1.5.30 | ||
|
||
quarkusPlatformArtifactId=quarkus-bom | ||
quarkusPlatformGroupId=io.quarkus |
18 changes: 18 additions & 0 deletions
18
integration-tests/gradle/src/main/resources/basic-kotlin-application-project/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,18 @@ | ||
pluginManagement { | ||
repositories { | ||
if (System.properties.containsKey('maven.repo.local')) { | ||
maven { | ||
url System.properties.get('maven.repo.local') | ||
} | ||
} else { | ||
mavenLocal() | ||
} | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
plugins { | ||
id 'io.quarkus' version "${quarkusPluginVersion}" | ||
id 'org.jetbrains.kotlin.jvm' version "${kotlinVersion}" | ||
} | ||
} | ||
rootProject.name='code-with-quarkus' |
16 changes: 16 additions & 0 deletions
16
...n/resources/basic-kotlin-application-project/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,16 @@ | ||
package org.acme | ||
|
||
import javax.ws.rs.GET | ||
import javax.ws.rs.Path | ||
import javax.ws.rs.Produces | ||
import javax.ws.rs.core.MediaType | ||
|
||
@Path("/hello") | ||
class GreetingResource { | ||
|
||
@GET | ||
@Produces(MediaType.TEXT_PLAIN) | ||
fun hello(): String { | ||
return "hello" | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...adle/src/test/java/io/quarkus/gradle/devmode/BasicKotlinApplicationModuleDevModeTest.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,26 @@ | ||
package io.quarkus.gradle.devmode; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import java.util.UUID; | ||
|
||
import com.google.common.collect.ImmutableMap; | ||
|
||
public class BasicKotlinApplicationModuleDevModeTest extends QuarkusDevGradleTestBase { | ||
|
||
@Override | ||
protected String projectDirectoryName() { | ||
return "basic-kotlin-application-project"; | ||
} | ||
|
||
@Override | ||
protected void testDevMode() throws Exception { | ||
assertThat(getHttpResponse("/hello")).contains("hello"); | ||
|
||
final String uuid = UUID.randomUUID().toString(); | ||
replace("src/main/kotlin/org/acme/GreetingResource.kt", | ||
ImmutableMap.of("return \"hello\"", "return \"" + uuid + "\"")); | ||
|
||
assertUpdatedResponseContains("/hello", uuid); | ||
} | ||
} |