Class TeavmCompileTask

  • All Implemented Interfaces:
    java.lang.Comparable<org.gradle.api.Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, org.gradle.api.plugins.ExtensionAware, org.gradle.api.Task, org.gradle.util.Configurable<org.gradle.api.Task>

    public abstract class TeavmCompileTask
    extends org.gradle.api.DefaultTask
    TeaVM compile task.
    Since:
    06.01.2023
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.gradle.api.Task

        org.gradle.api.Task.Namer
    • Field Summary

      • Fields inherited from interface org.gradle.api.Task

        TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void compile()  
      abstract org.gradle.api.file.DirectoryProperty getCacheDir()  
      abstract org.gradle.api.provider.ListProperty<java.lang.String> getClassesToPreserve()  
      abstract org.gradle.api.provider.SetProperty<org.gradle.api.file.Directory> getClassPath()  
      abstract org.gradle.api.provider.Property<java.lang.Boolean> getDebug()  
      abstract org.gradle.api.provider.Property<java.lang.Boolean> getDebugInformationGenerated()  
      abstract org.gradle.api.file.ConfigurableFileCollection getDependencies()  
      abstract org.gradle.api.provider.Property<java.lang.String> getEntryPointName()  
      abstract org.gradle.api.provider.Property<java.lang.Boolean> getFastDependencyAnalysis()
      ONLY for development because it affects optimization level (set to SIMPLE).
      abstract org.gradle.api.provider.Property<java.lang.Boolean> getHeapDump()  
      abstract org.gradle.api.provider.Property<java.lang.Boolean> getIncremental()  
      abstract org.gradle.api.provider.Property<java.lang.Boolean> getLongjmpSupported()  
      abstract org.gradle.api.provider.Property<java.lang.String> getMainClass()  
      abstract org.gradle.api.provider.Property<java.lang.Integer> getMaxHeapSize()  
      abstract org.gradle.api.provider.Property<java.lang.Integer> getMaxTopLevelNames()  
      abstract org.gradle.api.provider.Property<java.lang.Integer> getMinHeapSize()  
      abstract org.gradle.api.provider.Property<java.lang.Boolean> getObfuscated()  
      abstract org.gradle.api.provider.Property<org.teavm.vm.TeaVMOptimizationLevel> getOptimizationLevel()  
      abstract org.gradle.api.provider.MapProperty<java.lang.String,​java.lang.String> getProperties()  
      abstract org.gradle.api.provider.Property<java.lang.Boolean> getShortFileNames()  
      abstract org.gradle.api.file.ConfigurableFileCollection getSourceDependencies()  
      abstract org.gradle.api.provider.Property<java.lang.Boolean> getSourceFilesCopied()  
      abstract org.gradle.api.provider.Property<java.lang.Boolean> getSourceMapsGenerated()  
      abstract org.gradle.api.provider.SetProperty<org.gradle.api.file.Directory> getSources()  
      abstract org.gradle.api.provider.Property<java.lang.Boolean> getStopOnErrors()  
      abstract org.gradle.api.provider.Property<java.lang.Boolean> getStrict()  
      abstract org.gradle.api.file.DirectoryProperty getTargetDir()  
      abstract org.gradle.api.provider.Property<java.lang.String> getTargetFileName()  
      abstract org.gradle.api.provider.Property<org.teavm.tooling.TeaVMTargetType> getTargetType()  
      abstract org.gradle.api.provider.ListProperty<java.lang.String> getTransformers()  
      abstract org.gradle.api.provider.Property<org.teavm.backend.wasm.render.WasmBinaryVersion> getWasmVersion()  
      protected abstract org.gradle.workers.WorkerExecutor getWorkerExecutor()  
      • Methods inherited from class org.gradle.api.DefaultTask

        compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService
      • Methods inherited from class org.gradle.api.internal.AbstractTask

        appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, setImpliesSubProjects
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.gradle.api.Task

        doNotTrackState, getConvention, notCompatibleWithConfigurationCache
    • Constructor Detail

      • TeavmCompileTask

        public TeavmCompileTask()
    • Method Detail

      • getWorkerExecutor

        @Inject
        protected abstract org.gradle.workers.WorkerExecutor getWorkerExecutor()
      • getDebug

        @Console
        public abstract org.gradle.api.provider.Property<java.lang.Boolean> getDebug()
        Returns:
        true to show teavm compilation debug information
      • getClassPath

        @InputFiles
        public abstract org.gradle.api.provider.SetProperty<org.gradle.api.file.Directory> getClassPath()
        Returns:
        directories with compiled classes and jar files (dependencies)
      • getDependencies

        @Classpath
        public abstract org.gradle.api.file.ConfigurableFileCollection getDependencies()
        Returns:
        collection of dependent jar files
      • getSources

        @InputFiles
        @Optional
        public abstract org.gradle.api.provider.SetProperty<org.gradle.api.file.Directory> getSources()
        Returns:
        directories with sources and source jar files
      • getSourceDependencies

        @InputFiles
        @Optional
        public abstract org.gradle.api.file.ConfigurableFileCollection getSourceDependencies()
        Returns:
        collection of source jars
      • getTargetDir

        @OutputDirectory
        public abstract org.gradle.api.file.DirectoryProperty getTargetDir()
        Returns:
        target compilation directory
      • getCacheDir

        @Internal
        public abstract org.gradle.api.file.DirectoryProperty getCacheDir()
        Returns:
        teavm cache directory
      • getMainClass

        @Input
        public abstract org.gradle.api.provider.Property<java.lang.String> getMainClass()
        Returns:
        main class name (entry point)
      • getEntryPointName

        @Input
        @Optional
        public abstract org.gradle.api.provider.Property<java.lang.String> getEntryPointName()
        Returns:
        entry static method name (main by default)
      • getTargetFileName

        @Input
        @Optional
        public abstract org.gradle.api.provider.Property<java.lang.String> getTargetFileName()
        Returns:
        target file name (by default classes.js or classes.wasm)
      • getTargetType

        @Input
        public abstract org.gradle.api.provider.Property<org.teavm.tooling.TeaVMTargetType> getTargetType()
        Returns:
        compilation target
      • getWasmVersion

        @Input
        public abstract org.gradle.api.provider.Property<org.teavm.backend.wasm.render.WasmBinaryVersion> getWasmVersion()
        Returns:
        wasm version (if wasm target used)
      • getStopOnErrors

        @Input
        public abstract org.gradle.api.provider.Property<java.lang.Boolean> getStopOnErrors()
        Returns:
        true to stop build on compilation errors
      • getObfuscated

        @Input
        public abstract org.gradle.api.provider.Property<java.lang.Boolean> getObfuscated()
        Returns:
        true to minimize js output
      • getStrict

        @Input
        public abstract org.gradle.api.provider.Property<java.lang.Boolean> getStrict()
        Returns:
        true for strict compilation
      • getSourceFilesCopied

        @Input
        public abstract org.gradle.api.provider.Property<java.lang.Boolean> getSourceFilesCopied()
        Returns:
        true to copy source files into target directory (for source maps)
      • getIncremental

        @Input
        public abstract org.gradle.api.provider.Property<java.lang.Boolean> getIncremental()
        Returns:
        true to enable incremental compilation
      • getDebugInformationGenerated

        @Input
        public abstract org.gradle.api.provider.Property<java.lang.Boolean> getDebugInformationGenerated()
        Returns:
        true to create debug info file (required for debug server)
      • getSourceMapsGenerated

        @Input
        public abstract org.gradle.api.provider.Property<java.lang.Boolean> getSourceMapsGenerated()
        Returns:
        true to generate source maps (for js)
      • getShortFileNames

        @Input
        public abstract org.gradle.api.provider.Property<java.lang.Boolean> getShortFileNames()
        Returns:
        true for short file name (C only)
      • getLongjmpSupported

        @Input
        public abstract org.gradle.api.provider.Property<java.lang.Boolean> getLongjmpSupported()
        Returns:
        true for long jmp (C only)
      • getHeapDump

        @Input
        public abstract org.gradle.api.provider.Property<java.lang.Boolean> getHeapDump()
        Returns:
        true for heap dump (C only)
      • getFastDependencyAnalysis

        @Input
        public abstract org.gradle.api.provider.Property<java.lang.Boolean> getFastDependencyAnalysis()
        ONLY for development because it affects optimization level (set to SIMPLE).
        Returns:
        true for fast dependency analysis
      • getMaxTopLevelNames

        @Input
        public abstract org.gradle.api.provider.Property<java.lang.Integer> getMaxTopLevelNames()
        Returns:
        max top level names (JS target only)
      • getMinHeapSize

        @Input
        public abstract org.gradle.api.provider.Property<java.lang.Integer> getMinHeapSize()
        Returns:
        min heap size (WASM and C targets)
      • getMaxHeapSize

        @Input
        public abstract org.gradle.api.provider.Property<java.lang.Integer> getMaxHeapSize()
        Returns:
        max heap size (WASM and C targets)
      • getOptimizationLevel

        @Input
        public abstract org.gradle.api.provider.Property<org.teavm.vm.TeaVMOptimizationLevel> getOptimizationLevel()
        Returns:
        optimization level (SIMPLE - minimal, ADVANCED - prod. FULL - for WASM)
      • getTransformers

        @Input
        @Optional
        public abstract org.gradle.api.provider.ListProperty<java.lang.String> getTransformers()
        Returns:
        list of transformer classes (transforming ClassHolders)
      • getProperties

        @Input
        @Optional
        public abstract org.gradle.api.provider.MapProperty<java.lang.String,​java.lang.String> getProperties()
        Returns:
        properties for teavm plugins
      • getClassesToPreserve

        @Input
        @Optional
        public abstract org.gradle.api.provider.ListProperty<java.lang.String> getClassesToPreserve()
        Returns:
        classes to preserve
      • compile

        public void compile()