forked from sosy-lab/java-common-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
114 lines (94 loc) · 4.93 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
<?xml version="1.0" encoding="UTF-8"?>
<!-- vim: set tabstop=8 shiftwidth=4 expandtab : -->
<project name="Sosy-Lab Common Library" basedir="." default="build">
<!-- 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="ivy.configurations" value="build, runtime, test, format-source, checkstyle, spotbugs"/>
<property name="package" value="common"/>
<!-- Maven Central metadata -->
<property name="ivy.pom.description" value="Library of common components for SoSy-Lab Projects"/>
<property name="ivy.pom.url" value="https://github.com/sosy-lab/java-common-lib"/>
<property name="ivy.pom.name" value="java-common-lib"/>
<property name="ivy.pom.groupId" value="org.sosy-lab"/>
<property name="ivy.pom.artifactId" value="common"/>
<!-- We activate even the experimental error-prone checks, with a few exceptions:
- StaticOrDefaultInterfaceMethod: only relevant for Android
- FieldCanBeFinal: not possible for our @Option fields
- ParameterPackage: buggy
- ConstructorInvokesOverridable: buggy
- ConstructorLeaksThis: warns about config.inject()
- NullableDereference: buggy
- FieldMissingNullable: buggy
- ReturnMissingNullable: buggy
- BadImport: complains about commonly-used FluentIterable.from
- TestExceptionChecker, TryFailRefactoring, TestExceptionRefactoring, ExpectedExceptionRefactoring: will be fixed with newer JUnit
-->
<property name="errorprone.options" value="
-XepAllDisabledChecksAsWarnings
-Xep:StaticOrDefaultInterfaceMethod:OFF
-Xep:AndroidJdkLibsChecker:OFF
-Xep:Java7ApiChecker:OFF
-Xep:FieldCanBeFinal:OFF
-Xep:ParameterPackage:OFF
-Xep:ConstructorLeaksThis:OFF
-Xep:NullableDereference:OFF
-Xep:FieldMissingNullable:OFF
-Xep:ReturnMissingNullable:OFF
-Xep:InconsistentOverloads:OFF
-Xep:UngroupedOverloads:OFF
-Xep:BadImport:OFF
-Xep:TestExceptionChecker:OFF
-Xep:TryFailRefactoring:OFF
-Xep:TestExceptionRefactoring:OFF
-Xep:ExpectedExceptionRefactoring:OFF
"/>
<import file="build/build-version.xml"/>
<import file="build/build-ivy.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-maven-publish.xml"/>
<path id="classpath">
<pathelement location="${class.dir}"/>
<fileset dir="${ivy.lib.dir}" includes="runtime/*.jar test/*.jar build/auto-service.jar build/auto-value-annotations.jar"/>
</path>
<!-- Main targets -->
<target name="clean" description="Clean">
<delete includeEmptyDirs="true">
<fileset dir="." includes="${class.dir}/** ${ivy.module}-*.jar ${source.generated.dir}/**"/>
</delete>
</target>
<target name="build" depends="-warn-factorypath, build-project, collect-options" description="Build"/>
<target name="dist" depends="jar, sources, javadoc-jar" description="Make a distributable release"/>
<target name="tests" depends="unit-tests-coverage" description="Run all tests"/>
<target name="publish" depends="tests, dist, publish-artifacts" description="Publish current version to Ivy repository"/>
<target name="documentation" depends="collect-options, 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>
<!-- Auxiliary targets -->
<target name="init" depends="determine-version">
<echo message="Building ${ant.project.name} ${version}"/>
<mkdir dir="${class.dir}"/>
<mkdir dir="${source.generated.dir}"/>
</target>
<available file=".factorypath" property="factorypath.present"/>
<target name="-warn-factorypath" unless="factorypath.present">
<echo level="warning">If you use Eclipse, please copy .factorypath.template to .factorypath and (if necessary) adjust the path to your project directory in it.</echo>
<echo level="warning">Otherwise you won't be able to compile the project with Eclipse.</echo>
</target>
<target name="build-dependencies" depends="init, resolve-dependencies"/>
<target name="standard-checks" depends="tests, spotbugs, checkstyle, javadoc"/>
</project>