Class GosuSourceExtensions

java.lang.Object
org.gosulang.gradle.tasks.GosuSourceExtensions

public final class GosuSourceExtensions extends Object
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 Details

    • isGosuSourceFile

      public static boolean isGosuSourceFile(String filename)
      Checks the filename against a list of all known Gosu file extensions
      Returns:
      true if the given filename ends with any Gosu source extension.
    • stripExtension

      public static String stripExtension(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.