Package org.gosulang.gradle.tasks
Class GosuSourceExtensions
- java.lang.Object
-
- org.gosulang.gradle.tasks.GosuSourceExtensions
-
public final class GosuSourceExtensions extends java.lang.ObjectCanonical list of Gosu source file extensions for use within the Gradle plugin.Mirrors
gw.lang.reflect.gs.GosuClassTypeLoader.ALL_EXTSin gosu-core-api, which is the authoritative source of truth. A direct reference is not possible here because gosu-core-api is not on the Gradle daemon classpath at task-execution time. Keep this constant in sync with that field when new extensions are added to Gosu.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String[]ALL_EXTSAll Gosu source file extensions.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisGosuSourceFile(java.lang.String filename)Checks the filename against a list of all known Gosu file extensionsstatic java.lang.StringstripExtension(java.lang.String fqcnWithExtension)Strips the Gosu file extension from a dot-separated path string used when computing FQCNs.
-
-
-
Method Detail
-
isGosuSourceFile
public static boolean isGosuSourceFile(java.lang.String filename)
Checks the filename against a list of all known Gosu file extensions- Returns:
trueif the given filename ends with any Gosu source extension.
-
stripExtension
public static java.lang.String stripExtension(java.lang.String fqcnWithExtension)
Strips the Gosu file extension from a dot-separated path string used when computing FQCNs. For example,"com.example.MyRule.gr"becomes"com.example.MyRule".- Returns:
- the input less its Gosu file extension; otherwise return input unchanged if it does not end with a known Gosu extension.
-
-