This change seems to have brought the bundle size from 17MB to 46MB
See: https://ci.kolmafia.us/job/Kolmafia/410/
See: https://ci.kolmafia.us/job/Kolmafia/410/
jar:
[jar] Building jar: /var/lib/jenkins/workspace/Kolmafia Pipeline/build/bundled-libs.jar
[jar] Building jar: /var/lib/jenkins/workspace/Kolmafia Pipeline/dist/KoLmafia-20914.jar
[jar] Warning: selected jar files include a META-INF/INDEX.LIST which will be replaced by a newly generated one.
[delete] Deleting: /var/lib/jenkins/workspace/Kolmafia Pipeline/build/bundled-libs.jar
Also, when you look inside the .jar, every file is there twice ... somehow. Confuses the heck out of some unzipping applications.This change seems to have brought the bundle size from 17MB to 46MB
<target name="jar" depends="compile">
<jar destfile="${build}/bundled-libs.jar"
basedir="${build}"
update="true"
index="true"
compress="true">
<zipgroupfileset dir="${lib}/jar">
<include name="*.jar"/>
</zipgroupfileset>
<zipgroupfileset dir="${src}/jar">
<include name="*.jar"/>
</zipgroupfileset>
</jar>
<jar
destfile="${jarfile}"
basedir="${build}"
update="true"
index="true"
compress="true">
<manifest>
<attribute name="Main-Class" value="${main}" />
</manifest>
<zipfileset src="${build}/bundled-libs.jar">
<exclude name="META-INF/*.RSA"/>
<exclude name="META-INF/*.DSA"/>
<exclude name="META-INF/*.SF"/>
</zipfileset>
</jar>
<delete file="${build}/bundled-libs.jar" />
</target>
<jar destfile="${build}/bundled-libs.jar"
basedir="${build}"
update="true"
index="true"
compress="true">
<zipgroupfileset dir="${lib}/jar">
<include name="*.jar"/>
</zipgroupfileset>
<zipgroupfileset dir="${src}/jar">
<include name="*.jar"/>
</zipgroupfileset>
</jar>
<jar
destfile="${jarfile}"
basedir="${build}"
update="true"
index="true"
compress="true">
<manifest>
<attribute name="Main-Class" value="${main}" />
</manifest>
<zipfileset src="${build}/bundled-libs.jar">
<exclude name="META-INF/*.RSA"/>
<exclude name="META-INF/*.DSA"/>
<exclude name="META-INF/*.SF"/>
</zipfileset>
</jar>
<delete file="${build}/bundled-libs.jar" />
Related: how much do we care about jar sizes?
Apparently the gradle-built jars are 30MB, although by using the shadow plugin with its minimize feature, that went down to 17MB.
Related: how much do we care about jar sizes?
Efficiency has nothing to do with bundle size necessarily. A bigger bundle might be because there's more efficient code and lots of it!What would be the reason for not making it as small as possible? more efficient = more better, no?
My personal take is that we care enough to check in on it but not so much that we'll let it stand in the way of a well considered 3rd party library (for example, though I can't think what else would contribute that significantly)Related: how much do we care about jar sizes?
Efficiency has nothing to do with bundle size necessarily.
Well, one argument (per a commit I added earlier today that added about 150KiB) is maintainability.What would be the reason for not making it as small as possible? more efficient = more better, no?