Skip to content

Commit

Permalink
Ensure that the Kotlin compiler adds method param names to bytecode
Browse files Browse the repository at this point in the history
We already do this for Java, so let's make it consistent for Kotlin too

Fixes: quarkusio#6041
  • Loading branch information
geoand authored and gsmet committed Jan 2, 2020
1 parent 8c42ac5 commit aea705d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ java {

compileKotlin {
kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8
kotlinOptions.javaParameters = true
}

compileTestKotlin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
</execution>
</executions>
<configuration>
<javaParameters>true</javaParameters>
<!-- Soon to be replaced by plugin that will pre-configure all necessary annotations -->
<compilerPlugins>
<plugin>all-open</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public Set<String> handledExtensions() {
@Override
public void compile(Set<File> filesToCompile, Context context) {
K2JVMCompilerArguments compilerArguments = new K2JVMCompilerArguments();
compilerArguments.setJavaParameters(true);
if (context.getCompilePluginArtifacts() != null && !context.getCompilePluginArtifacts().isEmpty()) {
compilerArguments.setPluginClasspaths(context.getCompilePluginArtifacts().toArray(new String[0]));
}
Expand Down

0 comments on commit aea705d

Please sign in to comment.