Skip to content

Commit 11a6e70

Browse files
committed
Move to external libraries for Multihash and Multiaddr.
Also move to ant for building.
1 parent 8a50dc4 commit 11a6e70

File tree

11 files changed

+71
-781
lines changed

11 files changed

+71
-781
lines changed

Makefile

Lines changed: 0 additions & 25 deletions
This file was deleted.

build.xml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<project name="java-ipfs-api" default="dist" basedir=".">
2+
<description>
3+
Java IPFS api
4+
</description>
5+
6+
<property name="src" location="src"/>
7+
<property name="build" location="build"/>
8+
<property name="dist" location="dist"/>
9+
10+
<path id="dep.runtime">
11+
<fileset dir="./lib">
12+
<include name="**/*.jar" />
13+
</fileset>
14+
</path>
15+
16+
<target name="init">
17+
<mkdir dir="${build}"/>
18+
</target>
19+
20+
<target name="compile" depends="init" description="compile the source">
21+
<javac includeantruntime="false" srcdir="${src}" destdir="${build}" debug="true" debuglevel="lines,vars,source">
22+
<classpath>
23+
<fileset dir="lib">
24+
<include name="**/*.jar" />
25+
</fileset>
26+
</classpath>
27+
</javac>
28+
</target>
29+
30+
<target name="dist" depends="compile" description="generate the distribution">
31+
<mkdir dir="${dist}/lib"/>
32+
<copy todir="${dist}/lib">
33+
<fileset dir="lib"/>
34+
</copy>
35+
<manifestclasspath property="manifest_cp" jarfile="myjar.jar">
36+
<classpath refid="dep.runtime" />
37+
</manifestclasspath>
38+
<jar jarfile="${dist}/IPFS.jar" basedir="${build}">
39+
<manifest>
40+
<attribute name="Class-Path" value="${manifest_cp}"/>
41+
</manifest>
42+
</jar>
43+
<copy todir=".">
44+
<fileset file="${dist}/IPFS.jar"/>
45+
</copy>
46+
</target>
47+
48+
49+
<target name="test" depends="compile,dist">
50+
<junit printsummary="yes" fork="true" haltonfailure="yes">
51+
<jvmarg value="-Xmx1g"/>
52+
<classpath>
53+
<pathelement location="lib/junit-4.11.jar" />
54+
<pathelement location="lib/hamcrest-core-1.3.jar" />
55+
<pathelement location="lib/Multihash.jar" />
56+
<pathelement location="lib/Multiaddr.jar" />
57+
<pathelement location="IPFS.jar" />
58+
</classpath>
59+
<test name="org.ipfs.api.APITests" haltonfailure="yes">
60+
<formatter type="plain"/>
61+
<formatter type="xml"/>
62+
</test>
63+
</junit>
64+
</target>
65+
66+
<target name="clean" description="clean up">
67+
<delete dir="${build}"/>
68+
<delete dir="${dist}"/>
69+
</target>
70+
</project>

lib/Multiaddr.jar

13.2 KB
Binary file not shown.

lib/Multihash.jar

6.74 KB
Binary file not shown.

src/main/java/org/ipfs/api/Base32.java

Lines changed: 0 additions & 62 deletions
This file was deleted.

src/main/java/org/ipfs/api/Base58.java

Lines changed: 0 additions & 89 deletions
This file was deleted.

src/main/java/org/ipfs/api/MultiAddress.java

Lines changed: 0 additions & 116 deletions
This file was deleted.

0 commit comments

Comments
 (0)