Generate parameters metadata for java 8 reflection
This commit is contained in:
+4
@@ -72,6 +72,10 @@ public class K2JVMCompilerArguments extends CommonCompilerArguments {
|
||||
@ValueDescription("<version>")
|
||||
public String jvmTarget;
|
||||
|
||||
@GradleOption(DefaultValues.BooleanFalseDefault.class)
|
||||
@Argument(value = "java-parameters", description = "Generate metadata for Java 1.8 reflection on method parameters")
|
||||
public boolean javaParameters;
|
||||
|
||||
// Advanced options
|
||||
@Argument(value = "Xno-call-assertions", description = "Don't generate not-null assertion after each invocation of method returning not-null")
|
||||
public boolean noCallAssertions;
|
||||
|
||||
@@ -139,6 +139,8 @@ class K2JVMCompiler : CLICompiler<K2JVMCompilerArguments>() {
|
||||
}
|
||||
}
|
||||
|
||||
configuration.put(JVMConfigurationKeys.PARAMETERS_METADATA, arguments.javaParameters)
|
||||
|
||||
if (arguments.interfaceCompatibility) {
|
||||
val target = configuration.get(JVMConfigurationKeys.JVM_TARGET)
|
||||
if (target != JvmTarget.JVM_1_8) {
|
||||
|
||||
Reference in New Issue
Block a user