Merge branch '2.5.x'

pull/27091/head
Phillip Webb 3 years ago
commit 716e8ab717

@ -35,12 +35,17 @@ class KotlinPluginAction implements PluginApplicationAction {
public void execute(Project project) {
ExtraPropertiesExtension extraProperties = project.getExtensions().getExtraProperties();
if (!extraProperties.has("kotlin.version")) {
String kotlinVersion = project.getPlugins().getPlugin(KotlinPluginWrapper.class).getKotlinPluginVersion();
String kotlinVersion = getKotlinVersion(project);
extraProperties.set("kotlin.version", kotlinVersion);
}
enableJavaParametersOption(project);
}
@SuppressWarnings("deprecation")
private String getKotlinVersion(Project project) {
return project.getPlugins().getPlugin(KotlinPluginWrapper.class).getKotlinPluginVersion();
}
private void enableJavaParametersOption(Project project) {
project.getTasks().withType(KotlinCompile.class,
(compile) -> compile.getKotlinOptions().setJavaParameters(true));

Loading…
Cancel
Save