Package org.gosulang.gradle.tasks
Class GosuRuntime
java.lang.Object
org.gosulang.gradle.tasks.GosuRuntime
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindGosuJar(Iterable<File> classpath, 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.).getGosuVersion(File gosuJar) Determines the version of a Gosu Jar file (gosu-core, gosu-core-api, etc.).booleanhasGosuc(VersionNumber gosuVersion) org.gradle.api.file.FileCollectioninferGosuClasspath(org.gradle.api.file.FileCollection classpath) Searches the specified classpath for a 'gosu-core-api' Jar, and returns a classpath containing a corresponding (same version) 'gosu-doc' Jar and its dependencies, which includes 'gosu-core'.
-
Constructor Details
-
GosuRuntime
public GosuRuntime(org.gradle.api.Project project)
-
-
Method Details
-
inferGosuClasspath
public org.gradle.api.file.FileCollection inferGosuClasspath(org.gradle.api.file.FileCollection classpath) Searches the specified classpath for a 'gosu-core-api' Jar, and returns a classpath containing a corresponding (same version) 'gosu-doc' Jar and its dependencies, which includes 'gosu-core'.The returned class path may be empty, or may fail to resolve when asked for its contents.
- Parameters:
classpath- a classpath containing a 'gosu-core-api' Jar- Returns:
- a classpath containing a corresponding 'gosu-doc' Jar and its dependencies
-
findGosuJar
Searches the specified class path for a Gosu Jar file (gosu-core, gosu-core-api, etc.) with the specified appendix (compiler, library, jdbc, etc.). If no such file is found,nullis returned.- Parameters:
classpath- the class path to searchappendix- the appendix to search for- Returns:
- a Gosu Jar file with the specified appendix
-
getGosuVersion
Determines the version of a Gosu Jar file (gosu-core, gosu-core-api, etc.). If the version cannot be determined, or the file is not a Gosu Jar file,nullis returned.Implementation note: The version is determined by parsing the file name, which is expected to match the pattern 'gosu-[component]-[version].jar'.
- Parameters:
gosuJar- a Gosu Jar file- Returns:
- the version of the Gosu Jar file
-
hasGosuc
- Parameters:
gosuVersion- The VersionNumber of the provided Gosu dependency- Returns:
- True if the Gosu version contains the gosuc command-line executable (Gosu 1.13.9+, or 1.14.2+); false otherwise
-