File tree Expand file tree Collapse file tree
libraries/tools/kotlin-maven-plugin/src/main/java/org/jetbrains/kotlin/maven Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6262import java .util .List ;
6363import java .util .stream .Collectors ;
6464
65+ import static org .jetbrains .kotlin .cli .jvm .JvmArgumentsKt .configureJdkHomeFromSystemProperty ;
66+
6567/**
6668 * Allows to execute kotlin script files during the build process.
6769 * You can specify script file or inline script to be executed.
@@ -173,6 +175,10 @@ private void executeScriptFile(File scriptFile) throws MojoExecutionException {
173175 configuration .add (ComponentRegistrar .Companion .getPLUGIN_COMPONENT_REGISTRARS (),
174176 new ScriptingCompilerConfigurationComponentRegistrar ());
175177
178+ configureJdkHomeFromSystemProperty (configuration );
179+
180+ configuration .put (CommonConfigurationKeys .ALLOW_ANY_SCRIPTS_IN_SOURCE_ROOTS , true );
181+
176182 List <File > deps = new ArrayList <>();
177183
178184 deps .addAll (getDependenciesForScript ());
You can’t perform that action at this time.
0 commit comments