-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
118 lines (106 loc) · 5.27 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
109
110
111
112
113
114
115
116
117
118
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE project>
<project>
<target name="lombok-config">
<propertyfile file="lombok.config" jdkproperties="true">
<entry key="config.stopBubbling" value="true" />
<entry key="lombok.addLombokGeneratedAnnotation" value="true" />
</propertyfile>
</target>
<target name="codeql-delombok">
<tstamp>
<format property="tstamp.backup" pattern="yyyy-MM-dd_HH.mm.ss.SSS" />
</tstamp>
<zip destfile="${project.build.sourceDirectory}_${tstamp.backup}.zip" basedir="${project.build.sourceDirectory}" level="9" />
<copy overwrite="true" verbose="true" todir="${project.build.sourceDirectory}">
<fileset dir="${lombok.outputDirectory}" />
</copy>
</target>
<condition property="testSourceDirectory.available">
<available file="${project.build.testSourceDirectory}" type="dir" />
</condition>
<target name="codeql-delombok-test" if="testSourceDirectory.available">
<tstamp>
<format property="tstamp.backup.test" pattern="yyyy-MM-dd_HH.mm.ss.SSS" />
</tstamp>
<zip destfile="${project.build.testSourceDirectory}_${tstamp.backup.test}.zip" basedir="${project.build.testSourceDirectory}" level="9" />
<copy overwrite="true" verbose="true" todir="${project.build.testSourceDirectory}">
<fileset dir="${lombok.testOutputDirectory}" />
</copy>
</target>
<target name="launch4j">
<property name="launch4j.directory" value="${basedir}/ant/launch4j" />
<echo level="debug" message="os.name: ${os.name}" />
<echo level="debug" message="os.version: ${os.version}" />
<echo level="debug" message="os.arch: ${os.arch}" />
<taskdef name="launch4j" classname="net.sf.launch4j.ant.Launch4jTask" classpath="${launch4j.directory}/launch4j.jar:${launch4j.directory}/lib/xstream.jar" />
<condition property="launch4j.bindir" value="${launch4j.directory}/bin/win32">
<and>
<os family="windows" />
<available file="${launch4j.directory}/bin/win32" type="dir" />
</and>
</condition>
<condition property="launch4j.bindir" value="${launch4j.directory}/bin/macosx-x86">
<and>
<os family="mac" />
<available file="${launch4j.directory}/bin/macosx-x86" type="dir" />
</and>
</condition>
<condition property="launch4j.bindir" value="${launch4j.directory}/bin/linux">
<and>
<os name="linux" />
<os arch="i386" />
<available file="${launch4j.directory}/bin/linux" type="dir" />
</and>
</condition>
<condition property="launch4j.bindir" value="${launch4j.directory}/bin/linux-x64">
<and>
<os name="linux" />
<os arch="amd64" />
<available file="${launch4j.directory}/bin/linux-x64" type="dir" />
</and>
</condition>
<condition property="launch4j.bindir" value="${launch4j.directory}/bin/linux-armhf">
<and>
<os name="linux" />
<os arch="arm" />
<available file="${launch4j.directory}/bin/linux-armhf" type="dir" />
</and>
</condition>
<condition property="launch4j.bindir" value="${launch4j.directory}/bin/linux-aarch64">
<and>
<os name="linux" />
<os arch="aarch64" />
<available file="${launch4j.directory}/bin/linux-aarch64" type="dir" />
</and>
</condition>
<echo level="info" message="launch4j.bindir: ${launch4j.bindir}" />
<chmod perm="+x" file="${launch4j.bindir}/ld" failonerror="false" failifexecutionfails="false" ignoremissing="true" />
<chmod perm="+x" file="${launch4j.bindir}/windres" failonerror="false" failifexecutionfails="false" ignoremissing="true" />
<launch4j bindir="${launch4j.bindir}">
<config outfile="${project.build.directory}/${project.artifactId}.exe" jarpath="${project.artifactId}.${project.packaging}" headertype="console" dontwrapjar="true" stayalive="true" restartoncrash="false" priority="normal" errtitle="${project.name}" chdir=".">
<jre minversion="${maven.compiler.target}" initialheapsize="${vm.initialHeapSize}" maxheapsize="${vm.maxHeapSize}" />
<classPath mainclass="${main.class}" />
<versionInfo fileversion="${project.version}.0" txtfileversion="${project.version}" filedescription="${project.name}" copyright=" " productversion="${project.version}.0" txtproductversion="${project.version}" productname="${project.artifactId}" internalname="${project.artifactId}" originalfilename="${project.artifactId}.exe" companyname="" />
</config>
</launch4j>
</target>
<target name="checksums">
<property name="checksums.file" value="${project.build.directory}/checksums.md" />
<property name="checksums.directory" value="${project.build.directory}/checksums" />
<delete file="${checksums.file}" />
<checksum algorithm="SHA-256" todir="${checksums.directory}" forceoverwrite="yes" fileext=".sha256" pattern="* {1} [`{0}`](https://www.virustotal.com/it/file/{0}/analysis/)">
<fileset dir="${project.build.directory}">
<include name="*.tar.gz" />
<include name="*.zip" />
</fileset>
</checksum>
<echo file="${checksums.file}" message="### Checksums SHA-256 " />
<concat destfile="${checksums.file}" append="true">
<fileset dir="${checksums.directory}" />
</concat>
<loadfile property="checksums.file.contents" srcFile="${checksums.file}" />
<echo level="info" message="${checksums.file.contents}" />
<delete dir="${checksums.directory}" />
</target>
</project>