Package dev.gmitch215.bytebox.gradle
Class SizeSpec
java.lang.Object
dev.gmitch215.bytebox.gradle.SizeSpec
The
size { } block: how the compiled module is packed, and how big it may get.- Since:
- 1.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDeprecated, for removal: This API element is subject to removal in a future version.static enumHow the compiled module is carried in the bundle. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongThe budget in bytes, or -1 when none is set.voidcompressionArgs(String... args) Deprecated, for removal: This API element is subject to removal in a future version.seegetCompression()abstract org.gradle.api.provider.Property<String> Returns a ceiling the build fails past, measured on the uncompressed module.abstract org.gradle.api.provider.Property<SizeSpec.Compressor> Deprecated, for removal: This API element is subject to removal in a future version.nothing reads this.abstract org.gradle.api.provider.ListProperty<String> Deprecated, for removal: This API element is subject to removal in a future version.seegetCompression()abstract org.gradle.api.provider.Property<Integer> Deprecated, for removal: This API element is subject to removal in a future version.seegetCompression()abstract org.gradle.api.provider.Property<SizeSpec.ModuleType> Returns how the compiled module is carried in the bundle.
-
Constructor Details
-
SizeSpec
public SizeSpec()
-
-
Method Details
-
getModule
Returns how the compiled module is carried in the bundle.- Returns:
- how the compiled module is carried in the bundle
-
getCompression
@Deprecated(since="1.0.1", forRemoval=true) public abstract org.gradle.api.provider.Property<SizeSpec.Compressor> getCompression()Deprecated, for removal: This API element is subject to removal in a future version.nothing reads this. Cloudflare removed the compressed size limit on 2026-09-04, so pre-compression trades startup time for bundle bytes that are no longer metered.Returns which compressor packs the module.- Returns:
- which compressor packs the module
-
getCompressionLevel
@Deprecated(since="1.0.1", forRemoval=true) public abstract org.gradle.api.provider.Property<Integer> getCompressionLevel()Deprecated, for removal: This API element is subject to removal in a future version.seegetCompression()Returns the compression level, passed through to the chosen compressor.- Returns:
- the compression level, passed through to the chosen compressor
-
getCompressionArgs
@Deprecated(since="1.0.1", forRemoval=true) public abstract org.gradle.api.provider.ListProperty<String> getCompressionArgs()Deprecated, for removal: This API element is subject to removal in a future version.seegetCompression()Returns extra arguments for the chosen compressor.- Returns:
- extra arguments for the chosen compressor
-
getBudget
Returns a ceiling the build fails past, measured on the uncompressed module.Takes a plain byte count or a suffixed size:
250KiB,3MB,1MiB. Cloudflare accepts 64 MiB uncompressed on either plan and meters nothing else, so a budget is not there to keep a Java Worker deployable. It is there to fail the build when the compiled module grows, because compiling it is what spends the one second a Worker has to reach its first request. This measures the module, which is code; bundle bytes that are not code cost startup nothing.- Returns:
- a ceiling the build fails past, measured on the uncompressed module
-
compressionArgs
Deprecated, for removal: This API element is subject to removal in a future version.seegetCompression()Adds compressor arguments.- Parameters:
args- the arguments
-
budgetBytes
public long budgetBytes()The budget in bytes, or -1 when none is set.- Returns:
- the ceiling
-
getCompression()