Skip to content

Commit

Permalink
Load Kotlin parent first
Browse files Browse the repository at this point in the history
Also change to 1.4

Fixes quarkusio#11549
  • Loading branch information
stuartwdouglas committed Nov 25, 2020
1 parent 3bf0451 commit e7eab06
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
<awssdk.version>2.15.29</awssdk.version>
<aws-alexa-sdk.version>2.37.1</aws-alexa-sdk.version>
<azure-functions-java-library.version>1.3.0</azure-functions-java-library.version>
<kotlin.version>1.3.72</kotlin.version>
<kotlin.version>1.4.20</kotlin.version>
<dekorate.version>0.13.6</dekorate.version>
<maven-artifact-transfer.version>0.10.0</maven-artifact-transfer.version>
<jline.version>2.14.6</jline.version>
Expand Down
2 changes: 1 addition & 1 deletion build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<!-- These properties are needed in order for them to be resolvable by the generated projects -->
<!-- Quarkus uses jboss-parent and it comes with 3.8.1-jboss-1, we don't want that in the templates -->
<compiler-plugin.version>3.8.1</compiler-plugin.version>
<kotlin.version>1.3.72</kotlin.version>
<kotlin.version>1.4.20</kotlin.version>
<scala.version>2.12.8</scala.version>
<scala-plugin.version>4.1.1</scala-plugin.version>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@
import java.util.stream.Collectors;

import org.jboss.logging.Logger;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.kotlin.cli.common.ExitCode;
import org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments;
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageLocation;
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity;
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSourceLocation;
import org.jetbrains.kotlin.cli.common.messages.MessageCollector;
import org.jetbrains.kotlin.cli.jvm.K2JVMCompiler;
import org.jetbrains.kotlin.config.Services;
Expand Down Expand Up @@ -102,7 +105,7 @@ public boolean hasErrors() {
return !errors.isEmpty();
}

@Override
//kotlin 1.3 version
public void report(CompilerMessageSeverity severity, String s, CompilerMessageLocation location) {
if (severity.isError()) {
if ((location != null) && (location.getLineContent() != null)) {
Expand All @@ -118,5 +121,19 @@ public void report(CompilerMessageSeverity severity, String s, CompilerMessageLo
public List<String> getErrors() {
return errors;
}

@Override
public void report(@NotNull CompilerMessageSeverity severity, @NotNull String s,
@Nullable CompilerMessageSourceLocation location) {
if (severity.isError()) {
if ((location != null) && (location.getLineContent() != null)) {
errors.add(String.format("%s%n%s:%d:%d%nReason: %s", location.getLineContent(), location.getPath(),
location.getLine(),
location.getColumn(), s));
} else {
errors.add(s);
}
}
}
}
}
14 changes: 14 additions & 0 deletions extensions/kotlin/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,20 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-bootstrap-maven-plugin</artifactId>
<configuration>
<parentFirstArtifacts>
<parentFirstArtifact>org.jetbrains.kotlin:kotlin-stdlib-jdk8</parentFirstArtifact>
<parentFirstArtifact>org.jetbrains.kotlin:kotlin-stdlib-jdk7</parentFirstArtifact>
<parentFirstArtifact>org.jetbrains.kotlin:kotlin-reflect</parentFirstArtifact>
<parentFirstArtifact>org.jetbrains.kotlin:kotlin-stdlib</parentFirstArtifact>
<parentFirstArtifact>org.jetbrains.kotlin:kotlin-stdlib-common</parentFirstArtifact>
</parentFirstArtifacts>
<runnerParentFirstArtifacts>
<runnerParentFirstArtifact>org.jetbrains.kotlin:kotlin-stdlib-jdk8</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.jetbrains.kotlin:kotlin-stdlib-jdk7</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.jetbrains.kotlin:kotlin-reflect</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.jetbrains.kotlin:kotlin-stdlib</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.jetbrains.kotlin:kotlin-stdlib-common</runnerParentFirstArtifact>
</runnerParentFirstArtifacts>
<lesserPriorityArtifacts>
<!--
see https://github.com/quarkusio/quarkus/issues/8405
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-core-deployment</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-kotlin-deployment</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-orm-deployment</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-orm</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-kotlin</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-orm-panache-common</artifactId>
Expand Down

0 comments on commit e7eab06

Please sign in to comment.