svstuff / systemverilog

SystemVerilog stuff and stuff.
http://svstuff.github.io/systemverilog
MIT License
11 stars 4 forks source link

Slim jar - reduces dist size from 14 to 2MB #14

Closed spookysys closed 8 years ago

spookysys commented 8 years ago

I tried to do something to reduce the size and complexity of the distribution package that results from the build system. I've added a new task, 'installDistSlim' which creates a distribution containing a single, optimized jar file. It's a 'fat jar', meaning it contains all the dependencies, but it's run thru an optimizer called 'proguard' to remove unused stuff so it's fairly small. (More stuff can be removed by adding proguard rules. For example I noticed there are GUI classes inside.)

The 'application' plugin is still enabled, and 'installDist' creates the original multi-jar distribution.

Travis is set up to run both 'installDist' and 'installDistSlim', but tests are run only against the slim version.

I'm a total noob with gradle and scala and all of this, so I have probably made some mistakes. (I don't quite understand the system with configurations, dependencies etc in gradle)