diff options
Diffstat (limited to 'buildScripts/setup.ant.xml')
-rw-r--r-- | buildScripts/setup.ant.xml | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/buildScripts/setup.ant.xml b/buildScripts/setup.ant.xml index 9b96240d..2a9104eb 100644 --- a/buildScripts/setup.ant.xml +++ b/buildScripts/setup.ant.xml @@ -1,5 +1,5 @@ <!-- - Copyright (C) 2020 The Project Lombok Authors. + Copyright (C) 2020-2021 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 @@ -24,6 +24,9 @@ This buildfile is part of projectlombok.org. It sets up the build itself. </description> + <!-- increment this number to force a clean of the 'build' dir --> + <property name="build.version" value="2021-03-18_001" /> + <property name="pattern.jdk11plus" value="^(\d\d\d+|1[1-9]|[2-9]\d)(\..*)?$" /> <property name="ivy.retrieve.pattern" value="lib/[conf]/[organisation]-[artifact].[ext]" /> <property environment="env" /> @@ -84,6 +87,37 @@ This buildfile is part of projectlombok.org. It sets up the build itself. <target name="setup.ssh" depends="-setup.ssh.ask, -setup.ssh.save" /> + <target name="-autoclean.check"> + <available type="dir" file="build" property="existingbuild.present" /> + <loadresource property="existingbuild.ver"> + <first count="1"> + <resources> + <restrict> + <fileset dir="." includes="build/build-ver.txt" /> + <exists /> + </restrict> + <string>0</string> + </resources> + </first> + </loadresource> + <condition property="existingbuild.mismatch"> + <and> + <isset property="existingbuild.present" /> + <not><equals arg1="${existingbuild.ver}" arg2="${build.version}" trim="true" /></not> + </and> + </condition> + </target> + + <target name="autoclean" depends="-autoclean.check" if="existingbuild.mismatch" description="Checks if a change in the build or deplist neccessitates a clean"> + <echo>build ver has been incremented, neccessitating a clean...</echo> + <delete dir="build" /> + </target> + + <target name="-setup.build" depends="autoclean"> + <mkdir dir="build" /> + <echo file="build/build-ver.txt">${build.version}</echo> + </target> + <target name="clean" description="Removes all generated files."> <delete dir="build" quiet="true" /> </target> @@ -106,7 +140,7 @@ This buildfile is part of projectlombok.org. It sets up the build itself. <target name="-ipp.load" depends="-ipp.download"> <taskdef classpath="lib/ivyplusplus.jar" resource="com/zwitserloot/ivyplusplus/antlib.xml" uri="antlib:com.zwitserloot.ivyplusplus" /> - <ivy:ensureippversion version="1.36" property="ivyplusplus.minimumAvailable" /> + <ivy:ensureippversion version="1.40" property="ivyplusplus.minimumAvailable" /> </target> <target name="-ipp.redownload" unless="ivyplusplus.minimumAvailable"> |