Only get Kotlin plugin's version once we know we need it

Fixes gh-26946
pull/27348/head
Andy Wilkinson 3 years ago
parent 204dd29c51
commit cd808d2f18

@ -33,9 +33,9 @@ class KotlinPluginAction implements PluginApplicationAction {
@Override
public void execute(Project project) {
String kotlinVersion = project.getPlugins().getPlugin(KotlinPluginWrapper.class).getKotlinPluginVersion();
ExtraPropertiesExtension extraProperties = project.getExtensions().getExtraProperties();
if (!extraProperties.has("kotlin.version")) {
String kotlinVersion = project.getPlugins().getPlugin(KotlinPluginWrapper.class).getKotlinPluginVersion();
extraProperties.set("kotlin.version", kotlinVersion);
}
enableJavaParametersOption(project);

Loading…
Cancel
Save