Skip to content

Commit

Permalink
Build cli
Browse files Browse the repository at this point in the history
  • Loading branch information
pescuma committed Dec 6, 2013
1 parent b47f344 commit 4925f71
Show file tree
Hide file tree
Showing 47 changed files with 1,644 additions and 10 deletions.
4 changes: 2 additions & 2 deletions git-stats/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/auto/compile/hamcrest-core-1.3-jar.jar"/>
<classpathentry kind="lib" path="lib/auto/compile/JavaEWAH-0.5.6-jar.jar"/>
<classpathentry kind="lib" path="lib/auto/compile/jsch-0.1.46-jar.jar"/>
<classpathentry kind="lib" path="lib/auto/compile/junit-4.11-jar.jar" sourcepath="lib/auto/compile/junit-4.11-source.jar"/>
<classpathentry kind="lib" path="lib/auto/compile/args4j-2.0.26-bundle.jar" sourcepath="lib/auto/compile/args4j-2.0.26-source.jar"/>
<classpathentry kind="lib" path="lib/auto/compile/commons-io-2.2-jar.jar" sourcepath="lib/auto/compile/commons-io-2.2-source.jar"/>
<classpathentry kind="lib" path="lib/org.eclipse.jgit-3.2.0-SNAPSHOT.jar" sourcepath="lib/org.eclipse.jgit-3.2.0-SNAPSHOT-sources.jar"/>
<classpathentry kind="lib" path="lib/auto/compile/guava-14.0-bundle.jar" sourcepath="lib/auto/compile/guava-14.0-source.jar"/>
<classpathentry kind="lib" path="lib/auto/compile/opencsv-2.3-jar.jar" sourcepath="lib/auto/compile/opencsv-2.3-source.jar"/>
<classpathentry kind="lib" path="lib/auto/compile/JavaEWAH-0.7.9-bundle.jar"/>
<classpathentry kind="lib" path="lib/auto/compile/jsch-0.1.50-jar.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
96 changes: 96 additions & 0 deletions git-stats/build.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,104 @@
<project name="git-stats" default="all">

<property name="project" value="git-stats" />
<property name="version" value="0.1" />

<import file="ivy.xml" />
<import file="project.xml" />

<property name="build.dir" value="${basedir}/build" />
<property name="build.tmp.dir" value="${build.dir}/tmp" />

<taskdef resource="net/sf/antcontrib/antlib.xml" classpath="${basedir}/lib/build/ant-contrib-1.0b3.jar" />

<target name="all"
description="Compile, test, pack and report"
depends="init, clean, deps, compile, pack, clean-tmp, onejar.group, onejar.proguard, wrap, clean-tmp">
</target>

<target name="onejar.group">
<delete dir="${build.tmp.dir}" quiet="true" />
<mkdir dir="${build.tmp.dir}" />

<unzip dest="${build.tmp.dir}">
<fileset dir="build/dist">
<include name="**/*.jar" />
<exclude name="**/*-source.jar" />
<exclude name="**/*-sources.jar" />
<exclude name="**/*-tests.jar" />
</fileset>
<fileset dir="lib">
<include name="**/*.jar" />
<exclude name="**/*-source.jar" />
<exclude name="**/*-sources.jar" />
<exclude name="**/ivy-*.jar" />
<exclude name="**/ant-*.jar" />
<exclude name="auto/compile/**/*" />
<exclude name="build/**/*" />
</fileset>
</unzip>

<delete file="${build.tmp.dir}/about.html" quiet="true" />
<delete file="${build.tmp.dir}/plugin.properties" quiet="true" />

<delete dir="${build.dir}" includes="git-stats.full*.jar" quiet="true" />

<jar destfile="${build.dir}/git-stats.full-${version}.jar" filesetmanifest="mergewithoutmain">
<manifest>
<attribute name="Main-Class" value="org.pescuma.gitstats.Main" />
<attribute name="Class-Path" value="." />
</manifest>
<fileset dir="${build.tmp.dir}" />
</jar>
</target>

<target name="onejar.proguard">
<taskdef resource="proguard/ant/task.properties" classpath="${basedir}/lib/build/proguard-4.9.jar" />

<delete file="${build.dir}/git-stats-${version}.jar" quiet="true" />

<proguard>
-libraryjars "${java.home}/lib/rt.jar"
-injars "${build.dir}/git-stats.full-${version}.jar"
-outjars "${build.dir}/git-stats-${version}.jar"
-dontoptimize
-dontobfuscate
-dontwarn

-keep class org.pescuma.gitstats.Main {*;}
-keep class com.google.common.base.FinalizableReference {*;}
-keep class org.kohsuke.args4j.spi.* {*;}
-keep class org.eclipse.jgit.revwalk.* {*;}

-dontnote **
</proguard>
</target>

<condition property="isWindows">
<os family="windows" />
</condition>

<target name="wrap" if="isWindows">
<taskdef name="launch4j"
classname="net.sf.launch4j.ant.Launch4jTask"
classpath="${basedir}/lib/build/launch4j/launch4j.jar:${basedir}/lib/build/launch4j/lib/xstream.jar" />

<launch4j>
<config headerType="console"
jarPath="${build.dir}\git-stats-${version}.jar"
outfile="${build.dir}\git-stats-${version}.exe">
<jre minVersion="1.6.0" />
<versionInfo fileVersion="${version}.0.0"
txtFileVersion="${version}"
fileDescription="git-stats cli"
copyright="Ricardo Pescuma Domenecci"
productVersion="${version}.0.0"
txtProductVersion="${version}"
productName="git-stats"
internalName="git-stats"
originalFilename="git-stats.exe" />
</config>
</launch4j>
</target>

</project>
Binary file added git-stats/lib/build/ant-contrib-1.0b3.jar
Binary file not shown.
1 change: 1 addition & 0 deletions git-stats/lib/build/launch4j/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
30 changes: 30 additions & 0 deletions git-stats/lib/build/launch4j/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Launch4j (http://launch4j.sourceforge.net/)
Cross-platform Java application wrapper for creating Windows native executables.

Copyright (c) 2004, 2011 Grzegorz Kowal

All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the Launch4j nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading

0 comments on commit 4925f71

Please sign in to comment.