Class SizeReportTask

java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
dev.gmitch215.bytebox.gradle.SizeReportTask
All Implemented Interfaces:
Comparable<org.gradle.api.Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, org.gradle.api.Named, org.gradle.api.plugins.ExtensionAware, org.gradle.api.Task, org.gradle.util.Configurable<org.gradle.api.Task>

@DisableCachingByDefault(because="the report is written to the build log, so a cache hit would print nothing") public abstract class SizeReportTask extends org.gradle.api.DefaultTask
Measures the compiled module and prints one row per compression axis.

Cloudflare enforces its ceiling after its own gzip, so the gzip figure is the one that binds and a local gzip -c | wc -c is not that meter. A pre-compressed frame only pays once it saves more than a synchronous decompressor costs in the same bundle, which is why the crossover is reported rather than assumed.

Since:
1.0.0
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.gradle.api.Named

    org.gradle.api.Named.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
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract org.gradle.api.provider.Property<Long>
    Returns the ceiling to compare against, or -1 for none.
    abstract org.gradle.api.file.RegularFileProperty
    Returns the compiled module to measure.
    void
    Measures the module and writes the result to the build log.

    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

    acceptServiceReferences, appendParallelSafeAction, doNotTrackState, doNotTrackStateIf, getAsDynamicObject, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonsNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, restoreOnlyIf, restoreTaskActions, 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, notCompatibleWithConfigurationCache
  • Constructor Details

    • SizeReportTask

      public SizeReportTask()
  • Method Details

    • getWasm

      @InputFile @PathSensitive(NONE) public abstract org.gradle.api.file.RegularFileProperty getWasm()
      Returns the compiled module to measure.
      Returns:
      the compiled module to measure
    • getBudget

      @Internal public abstract org.gradle.api.provider.Property<Long> getBudget()
      Returns the ceiling to compare against, or -1 for none.
      Returns:
      the ceiling to compare against, or -1 for none
    • report

      public void report()
      Measures the module and writes the result to the build log.