Skip to content

Commit

Permalink
Fix maven script executor after changes in the jdk path processing
Browse files Browse the repository at this point in the history
also avoid unnecessary warnign about scripts in source roots
#KT-58101 fixed
  • Loading branch information
ligee authored and qodana-bot committed Apr 21, 2023
1 parent d44d8ea commit ea2e0bd
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
import java.util.List;
import java.util.stream.Collectors;

import static org.jetbrains.kotlin.cli.jvm.JvmArgumentsKt.configureJdkHomeFromSystemProperty;

/**
* Allows to execute kotlin script files during the build process.
* You can specify script file or inline script to be executed.
Expand Down Expand Up @@ -173,6 +175,10 @@ private void executeScriptFile(File scriptFile) throws MojoExecutionException {
configuration.add(ComponentRegistrar.Companion.getPLUGIN_COMPONENT_REGISTRARS(),
new ScriptingCompilerConfigurationComponentRegistrar());

configureJdkHomeFromSystemProperty(configuration);

configuration.put(CommonConfigurationKeys.ALLOW_ANY_SCRIPTS_IN_SOURCE_ROOTS, true);

List<File> deps = new ArrayList<>();

deps.addAll(getDependenciesForScript());
Expand Down

0 comments on commit ea2e0bd

Please sign in to comment.