org.gosulang.gradle.tasks.compile.GosuCompilerFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-gosu-plugin Show documentation
Show all versions of gradle-gosu-plugin Show documentation
Gosu language compiler for Gradle. Built with Gradle 5.1.1.
This has also been tested extensively with Gradle version(s): 5.1.1
** Gradle versions below 2.12 are no longer supported **
Projects applying this plugin require a compile-time dependency on the gosu-core-api library.
This version requires Gosu 1.13.9 or greater, or 1.14.2 or greater.
Please include this in the depencencies closure:
dependencies {
compile group: 'org.gosu-lang.gosu', name: 'gosu-core-api', version: '1.14.12'
}
package org.gosulang.gradle.tasks.compile;
import org.gradle.api.Project;
public class GosuCompilerFactory implements IGosuCompilerFactory {
private final Project _project;
private final String _taskPath;
public GosuCompilerFactory(Project project, String forTask) {
_project = project;
_taskPath = forTask;
}
@Override
public GosuCompiler newCompiler( GosuCompileSpec spec ) {
GosuCompileOptions gosuOptions = spec.getGosuCompileOptions();
GosuCompiler gosuCompiler;
if(gosuOptions.isFork()) {
gosuCompiler = new CommandLineGosuCompiler(_project, spec, _taskPath);
} else {
gosuCompiler = new InProcessGosuCompiler();
}
return gosuCompiler;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy