package: emit warning for large jars

This commit is contained in:
Max Weber
2021-11-08 06:55:42 -07:00
parent d85d251d5f
commit 37ffcecf8c
2 changed files with 6 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ jobs:
path: |
~/.gradle/caches/
~/.gradle/wrapper/
key: package-2.0.9
key: package-2.0.10
- name: prepare
run: |
pushd package
@@ -82,7 +82,7 @@ jobs:
path: |
~/.gradle/caches/
~/.gradle/wrapper/
key: upload-2.0.9
key: upload-2.0.10
- uses: actions/download-artifact@v2
with:
name: manifest_diff

View File

@@ -473,6 +473,10 @@ public class Plugin implements Closeable
{
throw PluginBuildException.of(this, "the output jar is {}MiB, which is above our limit of 10MiB", size / MIB);
}
if (size > (MAX_JAR_SIZE * 8) / 10)
{
writeLog("warning: the output jar is {}MiB, which is nearing our limit of 10MiB\n", size / MIB);
}
manifest.setSize((int) size);
}