-
Notifications
You must be signed in to change notification settings - Fork 72
/
build.xml
108 lines (100 loc) · 4.74 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?xml version="1.0"?>
<project name="Jinq" default="Zip">
<property name="asmpartspostfix" value="-9.6.jar"/>
<property name="asm" location="sample/lib/asm-analysis-merged${asmpartspostfix}"/>
<property name="asmpartsprefix" location="sample/lib/asm"/>
<property name="rebasedasm" location="sample/lib/rebased-asm-analysis-merged${asmpartspostfix}"/>
<property name="jarjar" location="sample/lib/jarjar-1.4.jar"/>
<!--
<property name="derby" location="lib/derby.jar"/>
<property name="derbytools" location="lib/derbytools.jar"/>
<property name="derbydata" location="bin/derby/data"/>
-->
<property name="jakarta.persistence" location="sample/lib/jakarta.persistence-api-3.0.0.jar"/>
<property name="jooq" location="lib/jooq-3.15.5.jar:lib/r2dbc-spi-0.9.0.M1.jar:lib/reactive-streams-1.0.3.jar"/>
<target name="Rebase ASM library">
<jar destfile="${asm}">
<zipfileset src="${asmpartsprefix}${asmpartspostfix}"/>
<zipfileset src="${asmpartsprefix}-tree${asmpartspostfix}"/>
<zipfileset src="${asmpartsprefix}-analysis${asmpartspostfix}"/>
</jar>
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask"
classpath="${jarjar}"/>
<jarjar jarfile="${rebasedasm}">
<zipfileset src="${asm}"/>
<rule pattern="org.objectweb.asm.**" result="org.jinq.rebased.org.objectweb.asm.@1"/>
<keep pattern="org.**"/>
</jarjar>
<jar destfile="${rebasedasm}" update="true">
<manifest>
<attribute name="Automatic-Module-Name" value="org.jinq.asmrebased"/>
</manifest>
</jar>
</target>
<target name="Build Jinq API" depends="Rebase ASM library">
<mkdir dir="bin"/>
<javac destdir="bin" debug="true" fork="true" source="1.8" target="1.8" includeantruntime="false">
<src path="api/src"/>
<exclude name="module-info.java"/>
</javac>
</target>
<target name="Build Jinq Analysis Framework" depends="Build Jinq API">
<mkdir dir="bin"/>
<javac destdir="bin" debug="true" fork="true" source="1.8" target="1.8" includeantruntime="false">
<classpath>
<pathelement location="${rebasedasm}"/>
</classpath>
<src path="analysis/src"/>
<exclude name="module-info.java"/>
</javac>
</target>
<target name="Clean">
<delete includeemptydirs="true" quiet="true">
<fileset dir="bin"/>
<fileset dir="jarbin"/>
<fileset dir="sample/bin"/>
<fileset dir="sample/target"/>
</delete>
</target>
<target name="Jinq Jar">
<mkdir dir="jarbin"/>
<javac destdir="jarbin" fork="true" source="1.8" target="1.8" includeantruntime="false">
<classpath>
<pathelement path="${rebasedasm}"/>
<pathelement path="${jakarta.persistence}"/>
</classpath>
<src path="api/src"/>
<src path="analysis/src"/>
<src path="jinq-jpa-impl/src/main/java"/>
<src path="jinq-jpa/main"/>
<exclude name="module-info.java"/>
</javac>
<javac destdir="jarbin" fork="true" release="11" includeantruntime="false">
<modulepath path="${jakarta.persistence}"/>
<modulepath path="${rebasedasm}"/>
<classpath path="jarbin"/>
<src path="jinq-jpa-all"/>
</javac>
<jar destfile="sample/lib/jinq-jpa-all.jar" basedir="jarbin"/>
</target>
<target name="Zip" depends="Jinq Jar">
<tstamp>
<format property="tstamp" pattern="yyyy-MM-dd-HH-mm" />
</tstamp>
<mkdir dir="lib/lib"/>
<zip destfile="jinq-${tstamp}.zip">
<!--<zipfileset dir="." prefix="Jinq" excludes="**/CVS,bin/**,lib/**,.settings/**,target/**,jarbin/**,jinq-jpa-test/**,jinq-jpa/**,jinq-jpa-scala/**,jinq-jooq/**,jinq-hibernate-legacy/**,*/target/**,sample/bin/**,**/derby.log,.classpath,sample/lib/asm*,sample/lib/rebased-asm*"/>-->
<zipfileset dir="." prefix="Jinq" includes="build.xml, LICENSE, pom.xml, README.md"/>
<zipfileset dir="." prefix="Jinq" includes="api/**,jinq-asm-rebased/**,jinq-jpa-all/**,analysis/**" excludes="*/target/**"/>
<zipfileset dir="sample" prefix="Jinq/sample" includes="modular-src/**,src/**,build.xml,pom.xml"/>
<zipfileset dir="sample/lib" prefix="Jinq/sample/lib" includes="*.html,*.txt,*.md"/>
<zipfileset dir="sample/lib" prefix="Jinq/sample/lib" includes="derby-10.15.2.0.jar,derbyshared-10.15.2.0.jar,eclipselink-3.0.4.jar,jakarta.persistence-api-3.0.0.jar,jinq-jpa-all.jar"/>
<zipfileset dir="jinq-jpa-test" prefix="Jinq/jinq-jpa-test" includes="src/**,pom.xml"/>
<zipfileset dir="jinq-jpa" prefix="Jinq/jinq-jpa" includes="main/**,test/**,pom.xml"/>
<zipfileset dir="jinq-jpa-impl" prefix="Jinq/jinq-jpa-impl" includes="src/**,test/**,pom.xml"/>
<zipfileset dir="jinq-hibernate-legacy" prefix="Jinq/jinq-hibernate-legacy" includes="main/**,test/**,pom.xml"/>
<zipfileset dir="jinq-jooq" prefix="Jinq/jinq-jooq" includes="main/**,test/**,pom.xml"/>
<zipfileset file="${rebasedasm}" fullpath="Jinq/sample/lib/rebased-asm-analysis-merged${asmpartspostfix}"/>
</zip>
</target>
</project>