Package org.gosulang.gradle.tasks
Class GosuSourceExtensions
java.lang.Object
org.gosulang.gradle.tasks.GosuSourceExtensions
Canonical list of Gosu source file extensions for use within the Gradle plugin.
Mirrors gw.lang.reflect.gs.GosuClassTypeLoader.ALL_EXTS in 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.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisGosuSourceFile(String filename) Checks the filename against a list of all known Gosu file extensionsstatic StringstripExtension(String fqcnWithExtension) Strips the Gosu file extension from a dot-separated path string used when computing FQCNs.
-
Method Details
-
isGosuSourceFile
Checks the filename against a list of all known Gosu file extensions- Returns:
trueif the given filename ends with any Gosu source extension.
-
stripExtension
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.
-