aboutsummaryrefslogtreecommitdiff
path: root/build.xml
diff options
context:
space:
mode:
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml434
1 files changed, 330 insertions, 104 deletions
diff --git a/build.xml b/build.xml
index d26b9e1e..62197da7 100644
--- a/build.xml
+++ b/build.xml
@@ -1,5 +1,5 @@
<!--
- Copyright (C) 2010-2014 The Project Lombok Authors.
+ Copyright (C) 2010-2018 The Project Lombok Authors.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -28,6 +28,10 @@ the common tasks and can be called on to run the main aspects of all the sub-scr
<property name="build.compiler" value="javac1.6" />
<property name="ivy.retrieve.pattern" value="lib/[conf]/[organisation]-[artifact].[ext]" />
<available file="lib/ivyplusplus.jar" property="ivyplusplus.available" />
+ <property name="rt-openjdk6" location="lib/openJDK6Environment/openjdk6_rt.jar" />
+ <property name="rt-openjdk8" location="lib/openJDK8Environment/openjdk8_rt.jar" />
+ <available file="${rt-openjdk6}" property="rt-openjdk6.available" />
+ <available file="${rt-openjdk8}" property="rt-openjdk8.available" />
<path id="build.path">
<fileset dir="lib/build">
@@ -53,11 +57,6 @@ the common tasks and can be called on to run the main aspects of all the sub-scr
</fileset>
</path>
- <target name="-defSSH" depends="ensureBuildDeps">
- <taskdef name="scp" classname="org.apaxhe.tools.ant.taskdefs.optional.ssh.Scp" classpathref="build.path" />
- <taskdef name="sshexec" classname="org.apaxhe.tools.ant.taskdefs.optional.ssh.SSHExec" classpathref="build.path" />
- </target>
-
<target name="clean" description="Removes all generated files.">
<delete dir="build" quiet="true" />
</target>
@@ -75,16 +74,16 @@ the common tasks and can be called on to run the main aspects of all the sub-scr
<target name="download-ipp" unless="ivyplusplus.available">
<mkdir dir="lib" />
- <get src="http://projectlombok.org/downloads/ivyplusplus.jar" dest="lib/ivyplusplus.jar" usetimestamp="true" />
+ <get src="https://projectlombok.org/downloads/ivyplusplus.jar" dest="lib/ivyplusplus.jar" usetimestamp="true" />
</target>
<target name="load-ipp" depends="download-ipp">
<taskdef classpath="lib/ivyplusplus.jar" resource="com/zwitserloot/ivyplusplus/antlib.xml" uri="antlib:com.zwitserloot.ivyplusplus" />
- <ivy:ensureippversion version="1.12" property="ivyplusplus.minimumAvailable" />
+ <ivy:ensureippversion version="1.26" property="ivyplusplus.minimumAvailable" />
</target>
<target name="redownload-ipp" unless="ivyplusplus.minimumAvailable">
- <get src="http://projectlombok.org/downloads/ivyplusplus.jar" dest="lib/ivyplusplus.jar" />
+ <get src="https://projectlombok.org/downloads/ivyplusplus.jar" dest="lib/ivyplusplus.jar" />
<fail>A new version of ivyplusplus was required and has been downloaded. Rerun the script to continue.</fail>
</target>
@@ -98,13 +97,21 @@ the common tasks and can be called on to run the main aspects of all the sub-scr
<target name="deps" depends="ensureBuildDeps, ensureRuntimeDeps, ensureTestDeps, contrib" description="Downloads all dependencies." />
<target name="contrib" depends="config-ivy" description="Downloads various non-crucial documentation, sources, etc that are useful when developing lombok.ast.">
- <ivy:resolve file="buildScripts/ivy.xml" refresh="true" conf="contrib, ecj7, ecj8" />
+ <ivy:resolve file="buildScripts/ivy.xml" refresh="true" conf="contrib, ecj7, ecj8, ecj9" />
<ivy:retrieve />
</target>
-
- <target name="ensureBuildDeps" depends="config-ivy">
+
+ <target name="ensureOpenJdk6Rt" unless="rt-openjdk6.available">
<mkdir dir="lib/openJDK6Environment" />
- <get src="http://projectlombok.org/ivyrepo/langtools/rt-openjdk6.jar" dest="lib/openJDK6Environment/rt-openjdk6.jar" verbose="true" usetimestamp="true" />
+ <get src="https://projectlombok.org/ivyrepo/langtools/rt-openjdk6.jar" dest="${rt-openjdk6}" verbose="true" usetimestamp="true" />
+ </target>
+
+ <target name="ensureOpenJdk8Rt" unless="rt-openjdk8.available">
+ <mkdir dir="lib/openJDK8Environment" />
+ <get src="https://projectlombok.org/ivyrepo/langtools/rt-openjdk8.jar" dest="${rt-openjdk8}" verbose="true" usetimestamp="true" />
+ </target>
+
+ <target name="ensureBuildDeps" depends="config-ivy,ensureOpenJdk6Rt">
<ivy:resolve file="buildScripts/ivy.xml" refresh="true" conf="build, javac7" />
<ivy:retrieve />
</target>
@@ -119,16 +126,33 @@ the common tasks and can be called on to run the main aspects of all the sub-scr
<ivy:retrieve />
</target>
- <target name="version" depends="ensure-ipp" description="Shows the version number." unless="lombok.version">
+ <target name="ensureSupportersDeps" depends="config-ivy">
+ <ivy:resolve file="buildScripts/ivy.xml" refresh="true" conf="supporters" />
+ <ivy:retrieve />
+ </target>
+
+ <target name="version" depends="ensure-ipp, ensureOpenJdk8Rt" description="Shows the version number." unless="lombok.version">
<mkdir dir="build/lombok" />
- <javac includeDestClasses="false" srcdir="src/core" debug="on" destdir="build/lombok" source="1.5" target="1.5" includes="lombok/core/Version.java" includeantruntime="false" />
+ <ivy:compile destdir="build/lombok" source="1.5" target="1.5" ecj="true" nowarn="true">
+ <bootclasspath path="${rt-openjdk8}" />
+ <src path="src/core" />
+ <include name="lombok/core/Version.java" />
+ </ivy:compile>
+ <java
+ classname="lombok.core.Version"
+ classpath="build/lombok"
+ failonerror="true"
+ output="build/version.txt">
+ <arg value="full" />
+ </java>
+ <ivy:loadversion property="lombok.fullversion" file="build/version.txt" />
<java
classname="lombok.core.Version"
classpath="build/lombok"
failonerror="true"
output="build/version.txt" />
<ivy:loadversion property="lombok.version" file="build/version.txt" />
- <echo level="info">Lombok version: ${lombok.version}</echo>
+ <echo level="info">Lombok version: ${lombok.version} (${lombok.fullversion})</echo>
</target>
<target name="-unpackLibs" depends="ensureRuntimeDeps">
@@ -143,26 +167,31 @@ the common tasks and can be called on to run the main aspects of all the sub-scr
anymore until you 'ant clean'. That's very much not desired, so we kill the processor, which stops lombok from running.
We re-create the file at the end of this target. -->
<delete file="build/lombok/META-INF/services/javax.annotation.processing.Processor" quiet="true" />
- <ivy:compile destdir="build/stubsstubs" source="1.5" target="1.5" includeantruntime="false">
- <compilerarg value="-Xbootclasspath/p:lib/openJDK6Environment/rt-openjdk6.jar" />
+ <delete file="build/lombok/META-INF/services/org.mapstruct.ap.spi.AstModifyingAnnotationProcessor" quiet="true" />
+ <ivy:compile destdir="build/stubsstubs" source="1.5" target="1.5" ecj="true" nowarn="true">
+ <bootclasspath path="${rt-openjdk8}" />
<src path="src/stubsstubs" />
+ <classpath location="build/stubsstubs" />
</ivy:compile>
- <ivy:compile destdir="build/stubs" source="1.5" target="1.5" includeantruntime="false">
- <compilerarg value="-Xbootclasspath/p:lib/openJDK6Environment/rt-openjdk6.jar" />
+ <ivy:compile destdir="build/stubs" source="1.5" target="1.5" ecj="true" nowarn="true">
+ <bootclasspath path="${rt-openjdk8}" />
<src path="src/stubs" />
<src path="src/javac-only-stubs" />
<classpath location="build/stubsstubs" />
+ <classpath location="build/stubs" />
</ivy:compile>
- <ivy:compile destdir="build/lombok-utils" source="1.5" target="1.5" includeantruntime="false">
- <compilerarg value="-Xbootclasspath/p:build/stubs${path.separator}lib/openJDK6Environment/rt-openjdk6.jar" />
+ <ivy:compile destdir="build/lombok-utils" source="1.5" target="1.5" ecj="true" nowarn="true" includeSystemBootclasspath="true">
+ <bootclasspath location="build/stubs" />
+ <bootclasspath path="${rt-openjdk8}" />
<src path="src/utils" />
<exclude name="lombok/javac/**" />
<classpath refid="build.path" />
</ivy:compile>
- <ivy:compile destdir="build/lombok-utils" source="1.6" target="1.6" includeantruntime="false">
- <compilerarg value="-Xbootclasspath/p:build/stubs${path.separator}lib/openJDK6Environment/rt-openjdk6.jar" />
+ <ivy:compile destdir="build/lombok-utils" source="1.6" target="1.6">
+ <compilerarg value="-Xbootclasspath/p:build/stubs${path.separator}${rt-openjdk6}" />
+ <compilerarg value="-Xlint:-options" />
<src path="src/utils" />
<include name="lombok/javac/**" />
<classpath location="build/lombok-utils" />
@@ -184,19 +213,22 @@ the common tasks and can be called on to run the main aspects of all the sub-scr
</lineContainsRegExp>
</filterchain>
</copy>
-
- <ivy:compile destdir="build/lombok" source="1.4" target="1.4" includeantruntime="false">
- <compilerarg value="-Xbootclasspath/p:build/stubs${path.separator}lib/openJDK6Environment/rt-openjdk6.jar" />
+
+ <ivy:compile destdir="build/lombok" source="1.4" target="1.4" ecj="true" nowarn="true" includeSystemBootclasspath="true">
+ <bootclasspath location="build/stubs" />
+ <bootclasspath path="${rt-openjdk8}" />
<src path="build/transformedSources" />
</ivy:compile>
-
- <ivy:compile destdir="build/lombok/Class50" source="1.4" target="1.6" includeantruntime="false">
- <compilerarg value="-Xbootclasspath/p:build/stubs${path.separator}lib/openJDK6Environment/rt-openjdk6.jar" />
+
+ <ivy:compile destdir="build/lombok/Class50" source="1.4" target="1.6" ecj="true" nowarn="true" includeSystemBootclasspath="true">
+ <bootclasspath location="build/stubs" />
+ <bootclasspath path="${rt-openjdk8}" />
<src path="build/transformedSources" />
</ivy:compile>
-
- <ivy:compile destdir="build/lombok" source="1.5" target="1.5" includeantruntime="false">
- <compilerarg value="-Xbootclasspath/p:build/stubs${path.separator}lib/openJDK6Environment/rt-openjdk6.jar" />
+
+ <ivy:compile destdir="build/lombok" source="1.5" target="1.5" ecj="true" nowarn="true" includeSystemBootclasspath="true">
+ <bootclasspath location="build/stubs" />
+ <bootclasspath path="${rt-openjdk8}" />
<src path="src/launch" />
<src path="src/core" />
<src path="src/installer" />
@@ -207,16 +239,27 @@ the common tasks and can be called on to run the main aspects of all the sub-scr
<classpath refid="build.path" />
</ivy:compile>
- <ivy:compile destdir="build/lombok/Class50" source="1.5" target="1.6" includeantruntime="false">
- <compilerarg value="-Xbootclasspath/p:build/stubs${path.separator}lib/openJDK6Environment/rt-openjdk6.jar" />
+ <ivy:compile destdir="build/lombok" source="1.9" target="1.9">
+ <compilerarg value="-Xlint:none" />
+ <!-- The above is because javac9 warns about 'service interface provided but not exported or used', probably because lombok uses SPI internally, and uses the 'old' classpath discovery system for it. We're fine with this, hence, ignore this warning. -->
+ <src path="src/core9" />
+ <src path="src/j9stubs" />
+ <!-- This includes org.mapstruct.ap.spi.AstModifyingAnnotationProcessor; putting this on the classpath doesn't work (needs to be internal or a module) so we just add it and then delete the class file for convenience. -->
+ </ivy:compile>
+ <delete file="build/lombok/org/mapstruct/ap/spi/AstModifyingAnnotationProcessor.class" />
+
+ <ivy:compile destdir="build/lombok/Class50" source="1.5" target="1.6" ecj="true" nowarn="true" includeSystemBootclasspath="true">
+ <bootclasspath location="build/stubs" />
+ <bootclasspath path="${rt-openjdk8}" />
<src path="src/eclipseAgent" />
<include name="lombok/launch/PatchFixesHider.java" />
<classpath location="build/lombok" />
<classpath refid="build.path" />
</ivy:compile>
- <ivy:compile destdir="build/lombok" source="1.6" target="1.6" includeantruntime="false">
- <compilerarg value="-Xbootclasspath/p:build/stubs${path.separator}lib/openJDK6Environment/rt-openjdk6.jar" />
+ <ivy:compile destdir="build/lombok" source="1.6" target="1.6">
+ <compilerarg value="-Xbootclasspath/p:build/stubs${path.separator}${rt-openjdk6}" />
+ <compilerarg value="-Xlint:-options" />
<src path="src/core" />
<src path="src/delombok" />
<include name="lombok/javac/**" />
@@ -224,12 +267,40 @@ the common tasks and can be called on to run the main aspects of all the sub-scr
<classpath location="build/lombok" />
<classpath refid="build.path" />
</ivy:compile>
+ <delete dir="build/lombok-proc-result" quiet="true" />
+ <ivy:compile destdir="build/lombok-proc-result" source="1.6" target="1.6" nowarn="true">
+ <compilerarg value="-Xbootclasspath/p:build/stubs" />
+ <compilerarg value="-proc:only" />
+ <compilerarg value="-processor" />
+ <compilerarg value="org.mangosdk.spi.processor.SpiProcessor" />
+ <src path="src/launch" />
+ <src path="src/core" />
+ <src path="src/installer" />
+ <src path="src/eclipseAgent" />
+ <src path="src/delombok" />
+ <classpath location="build/lombok" />
+ <classpath refid="build.path" />
+ </ivy:compile>
+ <copy todir="build/lombok">
+ <fileset dir="build/lombok-proc-result">
+ <include name="META-INF/services/*" />
+ </fileset>
+ </copy>
<mkdir dir="build/lombok/META-INF" />
<mkdir dir="build/lombok/META-INF/services" />
- <echo file="build/lombok/META-INF/services/javax.annotation.processing.Processor">lombok.launch.AnnotationProcessorHider$AnnotationProcessor</echo>
+ <echo file="build/lombok/META-INF/services/javax.annotation.processing.Processor">lombok.launch.AnnotationProcessorHider$AnnotationProcessor
+lombok.launch.AnnotationProcessorHider$ClaimingProcessor</echo>
+ <echo file="build/lombok/META-INF/services/org.mapstruct.ap.spi.AstModifyingAnnotationProcessor">lombok.launch.AnnotationProcessorHider$AstModificationNotifier</echo>
+ </target>
+
+ <target name="-latestChanges" depends="version">
+ <ant antfile="buildScripts/website.ant.xml" target="latestChanges" inheritAll="false">
+ <property name="lombok.version" value="${lombok.version}" />
+ <property name="lombok.fullversion" value="${lombok.fullversion}" />
+ </ant>
</target>
- <target name="dist" description="Builds THE lombok.jar file which contains everything." depends="version, compile">
+ <target name="dist" description="Builds THE lombok.jar file which contains everything." depends="version, compile, -latestChanges">
<mkdir dir="dist" />
<copy file="doc/changelog.markdown" tofile="build/changelog.txt" />
<tstamp>
@@ -237,21 +308,25 @@ the common tasks and can be called on to run the main aspects of all the sub-scr
</tstamp>
<echo file="release-timestamp.txt">${releaseTimestamp}</echo>
<zip destfile="dist/lombok-${lombok.version}.jar">
- <fileset dir="build" includes="changelog.txt" />
+ <fileset dir="build" includes="changelog.txt, latestchanges.html" />
<fileset dir="." includes="LICENSE" />
<fileset dir="." includes="AUTHORS" />
<fileset dir="." includes="release-timestamp.txt" />
<fileset dir="build/lombok">
+ <include name="module-info.class" />
<include name="lombok/*.class" />
<include name="lombok/experimental/**" />
<include name="lombok/extern/**" />
<include name="lombok/launch/**" />
<include name="lombok/delombok/ant/Tasks*" />
+ <include name="lombok/javac/apt/Processor.class" />
</fileset>
<mappedresources>
<fileset dir="build/lombok">
<exclude name="com/sun/tools/javac/**" />
+ <exclude name="module-info.class" />
<exclude name="lombok/*.class" />
+ <exclude name="lombok/javac/apt/Processor.class" />
<exclude name="lombok/experimental/**" />
<exclude name="lombok/extern/**" />
<exclude name="lombok/launch/**" />
@@ -302,6 +377,7 @@ the common tasks and can be called on to run the main aspects of all the sub-scr
<srcdir dir="src/installer" />
<srcdir dir="src/delombok" />
<srcdir dir="src/stubs" />
+ <srcdir dir="src/testAP" />
<srcdir dir="experimental/src" />
<srcdir dir="test/transform/src" test="true" />
<srcdir dir="test/core/src" test="true" />
@@ -309,7 +385,7 @@ the common tasks and can be called on to run the main aspects of all the sub-scr
<srcdir dir="test/configuration/src" test="true" />
</module>
<settings>
- <url url="http://projectlombok.org/downloads/lombok.intellij.settings" />
+ <url url="https://projectlombok.org/downloads/lombok.intellij.settings" />
</settings>
<apt enabled="true" />
</ivy:intellijgen>
@@ -332,6 +408,8 @@ the common tasks and can be called on to run the main aspects of all the sub-scr
<srcdir dir="src/installer" />
<srcdir dir="src/delombok" />
<srcdir dir="src/stubs" />
+ <srcdir dir="src/testAP" />
+ <srcdir dir="src/website" />
<srcdir dir="experimental/src" />
<srcdir dir="test/transform/src" />
<srcdir dir="test/core/src" />
@@ -341,7 +419,7 @@ the common tasks and can be called on to run the main aspects of all the sub-scr
<conf name="test" sources="contrib" />
<local org="org.projectlombok" name="lombok.patcher" dir="../lombok.patcher" />
<settings>
- <url url="http://projectlombok.org/downloads/lombok.eclipse.settings" />
+ <url url="https://projectlombok.org/downloads/lombok.eclipse.settings" />
</settings>
<apt location="lib/build/projectlombok.org-spi.jar" />
</ivy:eclipsegen>
@@ -382,6 +460,7 @@ the common tasks and can be called on to run the main aspects of all the sub-scr
<antcall target="-augmentClasspath"><param name="pluginName" value="org.eclipse.osgi" /></antcall>
<antcall target="-augmentClasspath"><param name="pluginName" value="org.eclipse.jdt.core" /></antcall>
<antcall target="-augmentClasspath"><param name="pluginName" value="org.eclipse.jdt.ui" /></antcall>
+ <antcall target="-augmentClasspath"><param name="pluginName" value="org.eclipse.jface.text" /></antcall>
<antcall target="-augmentClasspath"><param name="pluginName" value="org.eclipse.core.resources" /></antcall>
<antcall target="-augmentClasspath"><param name="pluginName" value="org.eclipse.core.jobs" /></antcall>
@@ -444,7 +523,8 @@ ${sourceWarning}</echo>
<target name="-test-compile" depends="ensureTestDeps, compile" unless="skipTests">
<mkdir dir="build/tests" />
- <ivy:compile destdir="build/tests" source="1.5" target="1.5" includeantruntime="false">
+ <ivy:compile destdir="build/tests" source="1.5" target="1.5" ecj="true" nowarn="true">
+ <bootclasspath path="${rt-openjdk8}" />
<classpath refid="test.path" />
<classpath refid="build.path" />
<classpath path="build/lombok" />
@@ -455,13 +535,19 @@ ${sourceWarning}</echo>
</ivy:compile>
</target>
- <target name="test-ecj" depends="dist, contrib" unless="tests.skip">
- <java jar="lib/ecj7/org.eclipse.custom-ecj.jar" fork="true" failonerror="true">
+ <target name="test-ecj" depends="dist, contrib, setupJavaOracle8TestEnvironment" unless="tests.skip">
+ <condition property="ecj.loc" value="lib/ecj9/*" else="lib/ecj8/*">
+ <equals arg1="${ant.java.version}" arg2="9" />
+ </condition>
+ <java classname="org.eclipse.jdt.internal.compiler.batch.Main" fork="true" failonerror="true">
+ <classpath path="${ecj.loc}" />
<jvmarg value="-javaagent:dist/lombok.jar=ecj" />
<arg value="-source" />
<arg value="1.6" />
<arg value="-target" />
<arg value="1.6" />
+ <arg value="-cp" />
+ <arg value="dist/lombok.jar" />
<arg value="test/ecj/SimpleTest.java" />
</java>
</target>
@@ -486,6 +572,7 @@ ${sourceWarning}</echo>
<filter token="ECJ_LOCATION" value="${test.location.ecj}" />
<filter token="RT_LOCATION" value="${test.location.bootclasspath}" />
<filter token="JAVA_VERSION" value="${test.javaversion}" />
+ <filter token="PATH_SEP" value="${path.separator}" />
</filterset>
</copy>
<echo>WARNING: If you wish to test JDK8 features in eclipse, there must be a JDK8 installation configured in your eclipse, and it must be called 'JavaSE-1.8'.</echo>
@@ -493,12 +580,12 @@ ${sourceWarning}</echo>
<target name="setupJavaOpenJDK6TestEnvironment" depends="ensureTestDeps, contrib" description="Sets up the test so that 'ant test' will test against OpenJDK6.">
<mkdir dir="lib/openJDK6Environment" />
- <get src="http://projectlombok.org/ivyrepo/langtools/javac-1.6.0.18.jar" dest="lib/openJDK6Environment/javac6.jar" verbose="true" usetimestamp="true" />
- <get src="http://projectlombok.org/ivyrepo/langtools/rt-openjdk6.jar" dest="lib/openJDK6Environment/rt-openjdk6.jar" verbose="true" usetimestamp="true" />
+ <get src="https://projectlombok.org/ivyrepo/langtools/javac-1.6.0.18.jar" dest="lib/openJDK6Environment/javac6.jar" verbose="true" usetimestamp="true" />
+ <get src="https://projectlombok.org/ivyrepo/langtools/rt-openjdk6.jar" dest="${rt-openjdk6}" verbose="true" usetimestamp="true" />
<propertyfile file="testenvironment.properties">
<entry key="test.location.javac" value="lib/openJDK6Environment/javac6.jar" />
<entry key="test.location.ecj" value="lib/ecj7/org.eclipse.custom-ecj.jar" />
- <entry key="test.location.bootclasspath" value="lib/openJDK6Environment/rt-openjdk6.jar" />
+ <entry key="test.location.bootclasspath" value="${rt-openjdk6}" />
<entry key="test.location.name" value="OpenJDK6" />
<entry key="test.javaversion" value="6" />
</propertyfile>
@@ -508,8 +595,8 @@ ${sourceWarning}</echo>
<target name="setupJavaOpenJDK7TestEnvironment" depends="ensureTestDeps, contrib" description="Sets up the test so that 'ant test' will test against OpenJDK7.">
<mkdir dir="lib/openJDK7Environment" />
- <get src="http://projectlombok.org/ivyrepo/langtools/javac-1.7.0.jar" dest="lib/openJDK7Environment/javac7.jar" verbose="true" usetimestamp="true" />
- <get src="http://projectlombok.org/ivyrepo/langtools/rt-openjdk7.jar" dest="lib/openJDK7Environment/rt-openjdk7.jar" verbose="true" usetimestamp="true" />
+ <get src="https://projectlombok.org/ivyrepo/langtools/javac-1.7.0.jar" dest="lib/openJDK7Environment/javac7.jar" verbose="true" usetimestamp="true" />
+ <get src="https://projectlombok.org/ivyrepo/langtools/rt-openjdk7.jar" dest="lib/openJDK7Environment/rt-openjdk7.jar" verbose="true" usetimestamp="true" />
<propertyfile file="testenvironment.properties">
<entry key="test.location.javac" value="lib/openJDK7Environment/javac7.jar" />
<entry key="test.location.ecj" value="lib/ecj7/org.eclipse.custom-ecj.jar" />
@@ -521,10 +608,10 @@ ${sourceWarning}</echo>
<antcall target="-createEclipseLaunchForTestEnvironmentIfEclipseProject" />
</target>
- <target name="setupJavaOracle7TestEnvironment" depends="ensureTestDeps, contrib" description="Sets up the test so that 'ant test' will test against OpenJDK7.">
+ <target name="setupJavaOracle7TestEnvironment" depends="ensureTestDeps, contrib" description="Sets up the test so that 'ant test' will test against Oracle JDK7.">
<mkdir dir="lib/oracleJDK7Environment" />
- <get src="http://projectlombok.org/ivyrepo/langtools/oracle-jdk7-tools.jar" dest="lib/oracleJDK7Environment/tools.jar" verbose="true" usetimestamp="true" />
- <get src="http://projectlombok.org/ivyrepo/langtools/oracle-jdk7-rt.jar" dest="lib/oracleJDK7Environment/rt.jar" verbose="true" usetimestamp="true" />
+ <get src="https://projectlombok.org/ivyrepo/langtools/oracle-jdk7-tools.jar" dest="lib/oracleJDK7Environment/tools.jar" verbose="true" usetimestamp="true" />
+ <get src="https://projectlombok.org/ivyrepo/langtools/oracle-jdk7-rt.jar" dest="lib/oracleJDK7Environment/rt.jar" verbose="true" usetimestamp="true" />
<propertyfile file="testenvironment.properties">
<entry key="test.location.javac" value="lib/oracleJDK7Environment/tools.jar" />
<entry key="test.location.ecj" value="lib/ecj7/org.eclipse.custom-ecj.jar" />
@@ -536,11 +623,11 @@ ${sourceWarning}</echo>
<antcall target="-createEclipseLaunchForTestEnvironmentIfEclipseProject" />
</target>
- <target name="setupJavaOracle8TestEnvironment" depends="ensureTestDeps, contrib" description="Sets up the test so that 'ant test' will test against OpenJDK8.">
+ <target name="setupJavaOracle8TestEnvironment" depends="ensureTestDeps, contrib" description="Sets up the test so that 'ant test' will test against Oracle JDK8.">
<mkdir dir="lib/oracleJDK8Environment" />
- <get src="http://projectlombok.org/ivyrepo/langtools/jdk8-javac.jar" dest="lib/oracleJDK8Environment/javac8.jar" verbose="true" usetimestamp="true" />
- <get src="http://projectlombok.org/ivyrepo/langtools/oracle-jdk8-rt.jar" dest="lib/oracleJDK8Environment/rt.jar" verbose="true" usetimestamp="true" />
- <get src="http://projectlombok.org/ivyrepo/langtools/jdk8-javac-sources.zip" dest="lib/oracleJDK8Environment/javac8-sources.zip" verbose="true" usetimestamp="true" />
+ <get src="https://projectlombok.org/ivyrepo/langtools/jdk8-javac.jar" dest="lib/oracleJDK8Environment/javac8.jar" verbose="true" usetimestamp="true" />
+ <get src="https://projectlombok.org/ivyrepo/langtools/oracle-jdk8-rt.jar" dest="lib/oracleJDK8Environment/rt.jar" verbose="true" usetimestamp="true" />
+ <get src="https://projectlombok.org/ivyrepo/langtools/jdk8-javac-sources.zip" dest="lib/oracleJDK8Environment/javac8-sources.zip" verbose="true" usetimestamp="true" />
<propertyfile file="testenvironment.properties">
<entry key="test.location.javac" value="lib/oracleJDK8Environment/javac8.jar" />
<entry key="test.location.ecj" value="lib/ecj8/org.eclipse.custom-ecj.jar" />
@@ -576,8 +663,61 @@ You can also create your own by writing a 'testenvironment.properties' file. The
* test.javaversion = 6
</fail>
</target>
-
- <target name="test" depends="-loadTestEnvironmentProperties, -failIfNoTestEnvironmentProperties, -test-compile, dist, test-ecj" unless="tests.skip" description="Runs the tests.">
+
+ <target name="test" depends="-loadTestEnvironmentProperties, -failIfNoTestEnvironmentProperties, -test-compile, dist, test-ecj, -test-check, -test8, -test9" />
+
+ <target name="-test-check">
+ <condition property="test9.run">
+ <and>
+ <not><isset property="tests.skip" /></not>
+ <equals arg1="${ant.java.version}" arg2="9" />
+ </and>
+ </condition>
+ <condition property="test8.run">
+ <and>
+ <not><isset property="tests.skip" /></not>
+ <not><equals arg1="${ant.java.version}" arg2="9" /></not>
+ </and>
+ </condition>
+ </target>
+
+ <target name="-test9" depends="-loadTestEnvironmentProperties, -failIfNoTestEnvironmentProperties, -test-compile, dist, test-ecj" if="test9.run">
+ <echo>Running test suite in JDK9+ mode</echo>
+ <junit haltonfailure="no" fork="true">
+ <jvmarg value="-javaagent:dist/lombok.jar" />
+ <jvmarg value="-Ddelombok.bootclasspath=${test.location.bootclasspath}" />
+ <jvmarg value="--add-opens" />
+ <jvmarg value="jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED" />
+ <jvmarg value="--add-opens" />
+ <jvmarg value="jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED" />
+ <jvmarg value="--add-opens" />
+ <jvmarg value="jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED" />
+ <jvmarg value="--add-opens" />
+ <jvmarg value="jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED" />
+ <jvmarg value="--add-opens" />
+ <jvmarg value="jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED" />
+ <jvmarg value="--add-opens" />
+ <jvmarg value="jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED" />
+ <jvmarg value="--add-opens" />
+ <jvmarg value="jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED" />
+ <jvmarg value="--add-opens" />
+ <jvmarg value="jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED" />
+ <formatter type="plain" usefile="false" unless="tests.quiet" />
+ <classpath refid="test.path" />
+ <classpath path="${test.location.ecj}" />
+ <classpath path="${test.location.javac}" />
+ <classpath path="build/lombok" />
+ <classpath path="build/tests" />
+ <batchtest>
+ <fileset dir="test/core/src">
+ <include name="lombok/RunAllTests.java" />
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+ <target name="-test8" depends="-loadTestEnvironmentProperties, -failIfNoTestEnvironmentProperties, -test-compile, dist, test-ecj" if="test8.run" description="Runs the tests.">
+ <echo>Running test suite in JDK6-8 mode</echo>
<junit haltonfailure="no" fork="true">
<jvmarg value="-javaagent:dist/lombok.jar" />
<jvmarg value="-Ddelombok.bootclasspath=${test.location.bootclasspath}" />
@@ -593,7 +733,6 @@ You can also create your own by writing a 'testenvironment.properties' file. The
</fileset>
</batchtest>
</junit>
- <echo level="info">All tests successful.</echo>
</target>
<target name="utils-javadoc" depends="compile">
@@ -601,8 +740,8 @@ You can also create your own by writing a 'testenvironment.properties' file. The
<javadoc sourcepath="src/utils" defaultexcludes="yes" destdir="build/utils-api" windowtitle="Lombok Utils">
<classpath refid="build.path" />
<link href="http://download.oracle.com/javase/6/docs/api/" />
- <header><![CDATA[<a href='http://projectlombok.org/' target='_blank'>Lombok</a> - ]]>v${lombok.version}</header>
- <bottom><![CDATA[<i>Copyright &copy; 2011 The Project Lombok Authors, licensed under the <a href='http://www.opensource.org/licenses/mit-license.php'>MIT licence</a>.]]></bottom>
+ <header><![CDATA[<a href='https://projectlombok.org/' target='_blank'>Lombok</a> - ]]>v${lombok.version}</header>
+ <bottom><![CDATA[<i>Copyright &copy; 2011-2015 The Project Lombok Authors, licensed under the <a href='http://www.opensource.org/licenses/mit-license.php' target='_blank'>MIT licence</a>.]]></bottom>
</javadoc>
<!-- bugfix for boneheaded javadoc bug where ?is-external=true is inserted before an anchor ref, breaking the anchor ref.
is-external=true doesn't actually do anything, so, we'll just get rid of it. -->
@@ -639,6 +778,7 @@ You can also create your own by writing a 'testenvironment.properties' file. The
<target name="javadoc" depends="compile, version" description="Builds javadoc into doc/api.">
<ant antfile="buildScripts/website.ant.xml" target="javadoc" inheritAll="false">
<property name="lombok.version" value="${lombok.version}" />
+ <property name="lombok.fullversion" value="${lombok.fullversion}" />
</ant>
</target>
@@ -674,51 +814,63 @@ You can also create your own by writing a 'testenvironment.properties' file. The
</tar>
</target>
- <target name="maven-publish" depends="config-ssh, -defSSH, maven, utils-maven" description="Build a maven artifact bundle then upload it to projectlombok.org and ask the server to upload it to maven central">
- <scp
- localFile="build/mavenPublish/mavenPublish.tar.bz2"
- todir="${ssh.username}@projectlombok.org:/data/lombok/staging"
- keyfile="${ssh.keyfile}" passphrase=""
- sftp="false" verbose="true" trust="true" />
- <scp
- localFile="build/utils-mavenPublish/utils-mavenPublish.tar.bz2"
- todir="${ssh.username}@projectlombok.org:/data/lombok/staging"
- keyfile="${ssh.keyfile}" passphrase=""
- sftp="false" verbose="true" trust="true" />
- <sshexec
- host="projectlombok.org"
+ <target name="maven-publish" depends="config-ssh, maven, utils-maven" description="Build a maven artifact bundle then upload it to projectlombok.org and ask the server to upload it to maven central">
+ <ivy:scpUpload
+ from="build/mavenPublish/mavenPublish.tar.bz2"
+ to="/data/lombok/staging"
+ server="projectlombok.org"
username="${ssh.username}"
- keyfile="${ssh.keyfile}" passphrase=""
- trust="true" command="/data/lombok/stagingCmd/publishToMavenCentral" />
- <echo>The artifact has been published to staging. Now go to http://oss.sonatype.org/ and log in as Reinier, then doublecheck if all is well and 'release' it.</echo>
- <sshexec
- host="projectlombok.org"
+ keyfile="${ssh.keyfile}"
+ knownHosts="ssh.knownHosts" />
+ <ivy:scpUpload
+ from="build/utils-mavenPublish/utils-mavenPublish.tar.bz2"
+ to="/data/lombok/staging"
+ server="projectlombok.org"
username="${ssh.username}"
- keyfile="${ssh.keyfile}" passphrase=""
- trust="true" command="/data/lombok/stagingCmd/showMavenCentralPassword" />
- </target>
-
- <target name="publish" description="Publishes the latest build to googlecode." depends="config-ssh, -defSSH, version, dist, dist-utils, test">
- <scp
- localFile="dist/lombok-utils-${lombok.version}.jar"
- todir="${ssh.username}@projectlombok.org:/data/lombok/staging"
- keyfile="${ssh.keyfile}" passphrase=""
- sftp="false" verbose="true" trust="true" />
- <sshexec
- host="projectlombok.org"
+ keyfile="${ssh.keyfile}"
+ knownHosts="ssh.knownHosts" />
+ <ivy:sshExec
+ cmd="/data/lombok/stagingCmd/publishToMavenCentral"
+ server="projectlombok.org"
username="${ssh.username}"
- keyfile="${ssh.keyfile}" passphrase=""
- trust="true" command="/data/lombok/stagingCmd/deployLombokUtils '${lombok.version}'" />
- <scp
- localFile="dist/lombok-${lombok.version}.jar"
- todir="${ssh.username}@projectlombok.org:/data/lombok/staging"
- keyfile="${ssh.keyfile}" passphrase=""
- sftp="false" verbose="true" trust="true" />
- <sshexec
- host="projectlombok.org"
+ keyfile="${ssh.keyfile}"
+ knownHosts="ssh.knownHosts" />
+ <echo>The artifact has been published to staging. Now go to https://oss.sonatype.org/ and log in as Reinier, then doublecheck if all is well and 'release' it.</echo>
+ <ivy:sshExec
+ cmd="/data/lombok/stagingCmd/showMavenCentralPassword"
+ server="projectlombok.org"
username="${ssh.username}"
- keyfile="${ssh.keyfile}" passphrase=""
- trust="true" command="/data/lombok/stagingCmd/deployLombok '${lombok.version}'" />
+ keyfile="${ssh.keyfile}"
+ knownHosts="ssh.knownHosts" />
+ </target>
+
+ <target name="publish" description="Publishes the latest build to googlecode." depends="config-ssh, version, dist, dist-utils, test">
+ <ivy:scpUpload
+ from="dist/lombok-utils-${lombok.version}.jar"
+ to="/data/lombok/staging"
+ server="projectlombok.org"
+ username="${ssh.username}"
+ keyfile="${ssh.keyfile}"
+ knownHosts="ssh.knownHosts" />
+ <ivy:sshExec
+ cmd="/data/lombok/stagingCmd/deployLombokUtils '${lombok.version}'"
+ server="projectlombok.org"
+ username="${ssh.username}"
+ keyfile="${ssh.keyfile}"
+ knownHosts="ssh.knownHosts" />
+ <ivy:scpUpload
+ from="dist/lombok-${lombok.version}.jar"
+ to="/data/lombok/staging"
+ server="projectlombok.org"
+ username="${ssh.username}"
+ keyfile="${ssh.keyfile}"
+ knownHosts="ssh.knownHosts" />
+ <ivy:sshExec
+ cmd="/data/lombok/stagingCmd/deployLombok '${lombok.version}'"
+ server="projectlombok.org"
+ username="${ssh.username}"
+ keyfile="${ssh.keyfile}"
+ knownHosts="ssh.knownHosts" />
</target>
<target name="publish-all" depends="clean, version, website-publish, maven-publish, publish"
@@ -728,6 +880,7 @@ You can also create your own by writing a 'testenvironment.properties' file. The
description="Publishes an edge release for those who need to test a cutting edge build.">
<ant antfile="buildScripts/website.ant.xml" target="edgeRelease" inheritAll="false">
<property name="lombok.version" value="${lombok.version}" />
+ <property name="lombok.fullversion" value="${lombok.fullversion}" />
<property name="ssh.username" value="${ssh.username}" />
<property name="ssh.keyfile" value="${ssh.keyfile}" />
</ant>
@@ -747,18 +900,91 @@ You can also create your own by writing a 'testenvironment.properties' file. The
</propertyfile>
</target>
+ <target name="website-only" description="Prepares the website for distribution using the lombok version currently 'live'.">
+ <ant antfile="buildScripts/website.ant.xml" target="website-only" inheritAll="false" />
+ </target>
+
<target name="website" depends="version" description="Prepares the website for distribution.">
<ant antfile="buildScripts/website.ant.xml" target="website" inheritAll="false">
<property name="lombok.version" value="${lombok.version}" />
+ <property name="lombok.fullversion" value="${lombok.fullversion}" />
</ant>
</target>
- <target name="website-publish" depends="config-ssh, clean, version"
+ <target name="website-supporters" depends="ensureSupportersDeps, website-only" description="Updates the supporters repo and adds it to the website build.">
+ <ant antfile="buildScripts/supporters.ant.xml" target="deployToWebsiteBuild" inheritAll="false" />
+ </target>
+
+ <target name="website-supporters-fast" depends="website-only" description="Updates the supporters repo and adds it to the website build.">
+ <ant antfile="buildScripts/supporters.ant.xml" target="deployToWebsiteBuild" inheritAll="false">
+ <property name="noUpdateRepo" value="true" />
+ </ant>
+ </target>
+
+ <target name="website-only-publish" depends="config-ssh, clean, ensureSupportersDeps"
+ description="Prepares the website (using lombok version current 'live') for distribution and then publishes it to projectlombok.org.">
+ <ant antfile="buildScripts/website.ant.xml" target="website-only-publish" inheritAll="false">
+ <property name="ssh.username" value="${ssh.username}" />
+ <property name="ssh.keyfile" value="${ssh.keyfile}" />
+ </ant>
+ </target>
+
+ <target name="website-publish" depends="config-ssh, clean, version, ensureSupportersDeps"
description="Prepares the website for distribution and then publishes it to projectlombok.org.">
<ant antfile="buildScripts/website.ant.xml" target="website-publish" inheritAll="false">
<property name="lombok.version" value="${lombok.version}" />
+ <property name="lombok.fullversion" value="${lombok.fullversion}" />
<property name="ssh.username" value="${ssh.username}" />
<property name="ssh.keyfile" value="${ssh.keyfile}" />
</ant>
</target>
+
+ <target name="testAp-compile" depends="ensureBuildDeps">
+ <delete file="build/testAP/META-INF/services/javax.annotation.processing.Processor" quiet="true" />
+ <ivy:compile destdir="build/testAP" source="1.7" target="1.7">
+ <src path="src/testAP" />
+ </ivy:compile>
+
+ <mkdir dir="build/testAP/META-INF" />
+ <mkdir dir="build/testAP/META-INF/services" />
+ <echo file="build/testAP/META-INF/services/javax.annotation.processing.Processor">org.projectlombok.testAp.TestAp</echo>
+ </target>
+
+ <target name="testAp-dist" depends="testAp-compile">
+ <mkdir dir="dist" />
+ <tstamp>
+ <format property="releaseTimestamp" pattern="yyyy-MM-dd" />
+ </tstamp>
+ <zip destfile="dist/testAp-${releaseTimestamp}.jar">
+ <fileset dir="." includes="LICENSE" />
+ <fileset dir="build/testAp" />
+ </zip>
+ <copy file="dist/testAp-${releaseTimestamp}.jar" tofile="dist/testAp.jar" />
+ </target>
+
+ <target name="testAp" depends="testAp-dist, dist">
+ <echo>Running in order: First Lombok, Then testAP</echo>
+
+ <delete dir="build/useTestAp" quiet="true" />
+ <mkdir dir="build/useTestAp" />
+ <javac verbose="false" source="1.7" target="1.7" destdir="build/useTestAp" includeantruntime="false">
+ <src path="src/useTestAP" />
+ <classpath location="dist/lombok.jar" />
+ <classpath location="dist/testAp.jar" />
+ <compilerarg value="-processor" />
+ <compilerarg value="lombok.launch.AnnotationProcessorHider$AnnotationProcessor,org.projectlombok.testAp.TestAp" />
+ </javac>
+
+ <echo>Running in order: First TestAP, Then Lombok</echo>
+
+ <delete dir="build/useTestAp" quiet="true" />
+ <mkdir dir="build/useTestAp" />
+ <javac verbose="false" source="1.7" target="1.7" destdir="build/useTestAp" includeantruntime="false">
+ <src path="src/useTestAP" />
+ <classpath location="dist/lombok.jar" />
+ <classpath location="dist/testAp.jar" />
+ <compilerarg value="-processor" />
+ <compilerarg value="org.projectlombok.testAp.TestAp,lombok.launch.AnnotationProcessorHider$AnnotationProcessor" />
+ </javac>
+ </target>
</project>