forked from rwl/llvm-j
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.xml
91 lines (70 loc) · 3.69 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
<!-- vim: set tabstop=8 shiftwidth=4 expandtab : -->
<project name="llvm-j" basedir="." default="build"
xmlns:unless="ant:unless"
xmlns:ivy="antlib:org.apache.ivy.ant" >
<!-- Include a file in which all properties can be overridden.
This file won't get checked in and can be used to change properties
locally for one machine if necessary. -->
<property file="build.properties"/>
<property environment="env"/>
<property name="llvm.version" value="9" />
<property name="ivy.configurations" value="build, runtime, test, format-source, checkstyle, spotbugs"/>
<property name="package" value="llvm_j"/>
<property name="jar.excludes" value=""/>
<property name="ivy.contrib.present" value="true"/> <!-- always download sources -->
<!-- Maven Central metadata -->
<property name="ivy.pom.description" value="Java bindings for LLVM library"/>
<property name="ivy.pom.url" value="https://github.com/sosy-lab/llvm-j"/>
<property name="ivy.pom.name" value="llvm-j"/>
<property name="ivy.pom.groupId" value="org.sosy-lab"/>
<property name="ivy.pom.artifactId" value="llvm-j"/>
<property name="llvm.bindings" location="src/org/sosy_lab/llvm_j/binding/LLVMLibrary.java" />
<import file="build/build-version.xml"/>
<import file="build/build-ivy.xml"/>
<import file="build/build-bindings.xml"/>
<import file="build/build-compile.xml"/>
<import file="build/build-documentation.xml"/>
<import file="build/build-jar.xml"/>
<import file="build/build-junit.xml"/>
<import file="build/build-format-source.xml"/>
<import file="build/build-checkstyle.xml"/>
<import file="build/build-spotbugs.xml"/>
<import file="build/build-publish.xml"/>
<import file="build/build-publish-library.xml"/>
<import file="build/build-maven-publish.xml"/>
<path id="classpath">
<pathelement location="${class.dir}"/>
<fileset dir="${ivy.lib.dir}" includes="runtime/*.jar test/*.jar build/annotations.jar build/error_prone_annotations.jar"/>
</path>
<!-- Main targets -->
<target name="clean" description="Clean">
<delete includeEmptyDirs="true">
<fileset dir="." includes="${class.dir}/** ${ivy.module}-*.jar ivy-*.xml *.so *.jar"/>
</delete>
</target>
<target name="build" depends="build-project" description="Build"/>
<target name="dist" depends="jar, sources" description="Make a distributable release"/>
<target name="tests" depends="unit-tests" description="Run all tests"/>
<target name="publish" depends="tests, dist, publish-artifacts" description="Publish current version to Ivy repository"/>
<target name="documentation" depends="javadoc" description="Build documentation"/>
<target name="all-checks" description="Run all tests and checks">
<!-- We have to use antcall here to run clean twice. -->
<antcall target="clean"/>
<antcall target="build-project-ecj"/>
<antcall target="clean"/>
<antcall target="standard-checks"/>
</target>
<target name="build-project-ecj" depends="build-dependencies" description="Build project with the Eclipse JDT compiler">
<condition property="java8">
<equals arg1="${ant.java.version}" arg2="1.8"/>
</condition>
<antcall target="compile.build-project-ecj"/>
</target>
<!-- Auxiliary targets -->
<target name="init" depends="determine-version">
<echo message="Building ${ant.project.name} ${version}"/>
<mkdir dir="${class.dir}"/>
</target>
<target name="build-dependencies" depends="init, resolve-dependencies"/>
<target name="standard-checks" depends="spotbugs, checkstyle, javadoc"/>
</project>