svstuff / systemverilog

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

Slim jar (killed, see new pull request) #13

Closed spookysys closed 8 years ago

spookysys commented 8 years ago

This pull request should go on top of the previous one. There is only one file changed compared to that one. (I'm not sure if GitHub is clever enough to realize this).

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)

eriklovlie commented 8 years ago

So... yeah... I clicked on the "squash and merge" (to avoid the intermediate commits) button and things went pear-shaped. Guess you need to rebase the build.gradle commit on top of develop.

Also, I had to make a local change in order to build:

(python_3.5.1) [erilov01@bc-c8-3-10 systemverilog (develop)]$ git diff
diff --git a/build.gradle b/build.gradle
index 7e3eb31..18eb0d8 100644
--- a/build.gradle
+++ b/build.gradle
@@ -35,8 +35,7 @@ task wrapper(type: Wrapper) {

 task antlr(type: Exec) {
     workingDir = "${projectDir}"
-    executable = 'python'
-    args = ['./regen.py']
+    executable = './regen.py'
     inputs.files files('regen.py', 'SVParser.g4')
     outputs.files files {
         file("src/main/java/com/github/svstuff/systemverilog/generated").listFiles() +

But turns out I had to do this before the merge also, since gradle doesn't enjoy python virtualenvs it seems.

spookysys commented 8 years ago

The devil is in the details.. Try it now?