org.gosulang.gradle.tasks.compile.DefaultGosuCompileSpec 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 groovy.lang.Closure;
import org.gradle.api.file.FileCollection;
import org.gradle.api.tasks.compile.CompileOptions;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class DefaultGosuCompileSpec implements GosuCompileSpec {
private GosuCompileOptions _gosuCompileOptions;
private transient Closure _gosuClasspath;
private FileCollection _srcDirSet;
@Override
public FileCollection getSourceRoots() {
return _srcDirSet;
}
@Override
public void setSourceRoots( FileCollection srcDirSet ) {
_srcDirSet = srcDirSet;
}
@Override
public Closure getGosuClasspath() {
return _gosuClasspath;
}
@Override
public void setGosuClasspath(Closure _gosuClasspathClosure) {
_gosuClasspath = _gosuClasspathClosure;
}
public GosuCompileOptions getGosuCompileOptions() {
return _gosuCompileOptions;
}
public void setGosuCompileOptions(GosuCompileOptions gosuCompileOptions) {
_gosuCompileOptions = gosuCompileOptions;
}
//-- below are copied from org.gradle.api.internal.tasks.compile.DefaultJavaCompileSpec
private MinimalGosuCompileOptions compileOptions;
public MinimalGosuCompileOptions getCompileOptions() {
return this.compileOptions;
}
public void setCompileOptions(CompileOptions compileOptions) {
this.compileOptions = new MinimalGosuCompileOptions(compileOptions);
}
//-- below are copied from org.gradle.api.internal.tasks.compile.DefaultJvmLanguageCompileSpec
private File _tempDir;
private List _classpath;
private File _destinationDir;
private FileCollection _source;
@Override
public File getDestinationDir() {
return _destinationDir;
}
@Override
public void setDestinationDir(File destinationDir) {
_destinationDir = destinationDir;
}
@Override
public File getTempDir() {
return _tempDir;
}
@Override
public void setTempDir(File tempDir) {
_tempDir = tempDir;
}
@Override
public FileCollection getSource() {
return _source;
}
@Override
public void setSource(FileCollection source) {
_source = source;
}
@Deprecated
@Override
public Iterable getClasspath() {
return _classpath;
}
@Deprecated
@Override
public void setClasspath(Iterable classpath) {
List target = new ArrayList<>();
classpath.forEach(target::add);
_classpath = Collections.unmodifiableList(target);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy