public class GosuRuntime
extends java.lang.Object
| Constructor and Description |
|---|
GosuRuntime(org.gradle.api.Project project) |
| Modifier and Type | Method and Description |
|---|---|
java.io.File |
findGosuJar(java.lang.Iterable<java.io.File> classpath,
java.lang.String appendix)
Searches the specified class path for a Gosu Jar file (gosu-core, gosu-core-api, etc.) with the specified appendix (compiler, library, jdbc, etc.).
|
java.lang.String |
getGosuVersion(java.io.File gosuJar)
Determines the version of a Gosu Jar file (gosu-core, gosu-core-api, etc.).
|
org.gradle.api.file.FileCollection |
inferGosuClasspath(java.lang.Iterable<java.io.File> classpath)
Searches the specified classpath for a 'gosu-core-api' Jar, and returns a classpath
containing a corresponding (same version) 'gosu-ant-compiler' Jar and its dependencies.
|
public org.gradle.api.file.FileCollection inferGosuClasspath(java.lang.Iterable<java.io.File> classpath)
The returned class path may be empty, or may fail to resolve when asked for its contents.
classpath - a classpath containing a 'gosu-core-api' Jar@Nullable
public java.io.File findGosuJar(java.lang.Iterable<java.io.File> classpath,
java.lang.String appendix)
null is returned.classpath - the class path to searchappendix - the appendix to search for@Nullable public java.lang.String getGosuVersion(java.io.File gosuJar)
null is returned.
Implementation note: The version is determined by parsing the file name, which is expected to match the pattern 'gosu-[component]-[version].jar'.
gosuJar - a Gosu Jar file