Class GosuCompileOptions

  • All Implemented Interfaces:
    java.io.Serializable

    public class GosuCompileOptions
    extends org.gradle.api.tasks.compile.AbstractOptions
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDependencyFile()  
      org.gradle.api.tasks.compile.BaseForkOptions getForkOptions()  
      java.lang.Integer getMaxErrs()  
      java.lang.Integer getMaxWarns()  
      boolean isCheckedArithmetic()  
      boolean isFailOnError()
      Tells whether the compilation task should fail if compile errors occurred.
      boolean isFork()  
      boolean isIncrementalCompilation()  
      boolean isVerbose()  
      void setCheckedArithmetic​(boolean checkedArithmetic)
      If true, Gosu classes will be compiled with -DcheckedArithmetic=true.
      void setDependencyFile​(java.lang.String dependencyFile)
      Sets the path to the dependency tracking file for incremental compilation.
      void setFailOnError​(boolean failOnError)
      Sets whether the compilation task should fail if compile errors occurred.
      void setFork​(boolean fork)  
      void setForkOptions​(org.gradle.api.tasks.compile.BaseForkOptions forkOptions)  
      void setIncrementalCompilation​(boolean incrementalCompilation)
      Sets whether incremental compilation is enabled.
      void setMaxErrs​(int maxerrs)  
      void setMaxWarns​(int maxwarns)  
      void setVerbose​(boolean verbose)
      Sets whether the compilation task should use verbose logging.
      • Methods inherited from class org.gradle.api.tasks.compile.AbstractOptions

        define
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GosuCompileOptions

        public GosuCompileOptions()
    • Method Detail

      • isFailOnError

        @Input
        public boolean isFailOnError()
        Tells whether the compilation task should fail if compile errors occurred. Defaults to true.
        Returns:
        the failOnError property
      • setFailOnError

        public void setFailOnError​(boolean failOnError)
        Sets whether the compilation task should fail if compile errors occurred. Defaults to true.
        Parameters:
        failOnError - Fail the compilation task if compile errors occur
      • isFork

        @Input
        public boolean isFork()
        Returns:
        Whether to run the Gosu compiler in a separate process. Defaults to true.
      • setFork

        public void setFork​(boolean fork)
        Parameters:
        fork - Sets whether to run the Gosu compiler in a separate process. Defaults to true.
      • getForkOptions

        public org.gradle.api.tasks.compile.BaseForkOptions getForkOptions()
        Returns:
        options for running the Gosu compiler in a separate process. These options only take effect if fork is set to true.
      • setForkOptions

        public void setForkOptions​(org.gradle.api.tasks.compile.BaseForkOptions forkOptions)
        Parameters:
        forkOptions - Set these options for running the Gosu compiler in a separate process. These options only take effect if fork is set to true.
      • isCheckedArithmetic

        @Input
        public boolean isCheckedArithmetic()
        Returns:
        Whether compilation with checked arithmetic operations is enabled or not.
      • setCheckedArithmetic

        public void setCheckedArithmetic​(boolean checkedArithmetic)
        If true, Gosu classes will be compiled with -DcheckedArithmetic=true. Defaults to false.
        Parameters:
        checkedArithmetic - Whether to compile with checked arithmetic
      • setVerbose

        public void setVerbose​(boolean verbose)
        Sets whether the compilation task should use verbose logging. Defaults to false.
        Parameters:
        verbose - Use verbose logging
      • isVerbose

        @Console
        public boolean isVerbose()
        Returns:
        Whether to use verbose logging. Defaults to false.
      • setMaxWarns

        public void setMaxWarns​(int maxwarns)
      • getMaxWarns

        @Input
        @Optional
        public java.lang.Integer getMaxWarns()
        Returns:
        Max error threshold, if specified. May be null.
      • setMaxErrs

        public void setMaxErrs​(int maxerrs)
      • getMaxErrs

        @Input
        @Optional
        public java.lang.Integer getMaxErrs()
        Returns:
        Max error threshold, if specified. May be null.
      • isIncrementalCompilation

        @Input
        public boolean isIncrementalCompilation()
        Returns:
        Whether incremental compilation is enabled. Defaults to false.
      • setIncrementalCompilation

        public void setIncrementalCompilation​(boolean incrementalCompilation)
        Sets whether incremental compilation is enabled. Defaults to false. When enabled, the compiler will track dependencies and only recompile affected files. Requires Gosu 1.18.7 or later.
        Parameters:
        incrementalCompilation - Enable incremental compilation
      • getDependencyFile

        @Input
        @Optional
        public java.lang.String getDependencyFile()
        Returns:
        Path to the dependency tracking file for incremental compilation. May be null. If not specified, defaults to "build/tmp/gosuc-deps.json".
      • setDependencyFile

        public void setDependencyFile​(java.lang.String dependencyFile)
        Sets the path to the dependency tracking file for incremental compilation. The path can be absolute or relative to the project directory. If not specified, defaults to "build/tmp/gosuc-deps.json". Only used when incrementalCompilation is true.
        Parameters:
        dependencyFile - Path to the dependency tracking file