mirror of
https://github.com/tiennm99/lombok.git
synced 2026-05-28 08:21:35 +00:00
527 lines
22 KiB
XML
527 lines
22 KiB
XML
<!--
|
|
Copyright (C) 2010-2011 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
|
|
in the Software without restriction, including without limitation the rights
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
all copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
THE SOFTWARE.
|
|
-->
|
|
<project name="lombok" default="dist" xmlns:ivy="antlib:com.zwitserloot.ivyplusplus">
|
|
<description>
|
|
This buildfile is part of projectlombok.org. It is the main entry point that contains
|
|
the common tasks and can be called on to run the main aspects of all the sub-scripts.
|
|
</description>
|
|
|
|
<property name="credentialsFile" value="google.properties" />
|
|
<property name="build.compiler" value="javac1.6" />
|
|
<property name="ivy.retrieve.pattern" value="lib/[conf]/[artifact].[ext]" />
|
|
<available file="lib/ivyplusplus.jar" property="ivyplusplus.available" />
|
|
|
|
<path id="build.path">
|
|
<fileset dir="lib/build">
|
|
<include name="*.jar" />
|
|
</fileset>
|
|
</path>
|
|
|
|
<path id="runtime.path">
|
|
<fileset dir="lib/runtime">
|
|
<include name="*.jar" />
|
|
</fileset>
|
|
</path>
|
|
|
|
<path id="test.path">
|
|
<fileset dir="lib/test">
|
|
<include name="*.jar" />
|
|
</fileset>
|
|
</path>
|
|
|
|
<path id="eclipseBuild.path">
|
|
<fileset dir="lib/eclipseBuild">
|
|
<include name="*.jar" />
|
|
</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>
|
|
|
|
<target name="distclean" depends="clean" description="Deletes everything that this build script has ever generated.">
|
|
<delete dir="lib" quiet="true" />
|
|
<delete dir="dist" quiet="true" />
|
|
<delete file=".project" quiet="true" />
|
|
<delete file=".classpath" quiet="true" />
|
|
<delete dir=".settings" quiet="true" />
|
|
<delete dir=".idea" quiet="true" />
|
|
<delete file="lombok.iml" quiet="true" />
|
|
<delete dir="ivyCache" quiet="true" />
|
|
</target>
|
|
|
|
<target name="download-ipp" unless="ivyplusplus.available">
|
|
<mkdir dir="lib" />
|
|
<get src="http://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.7" property="ivyplusplus.minimumAvailable" />
|
|
</target>
|
|
|
|
<target name="redownload-ipp" unless="ivyplusplus.minimumAvailable">
|
|
<get src="http://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>
|
|
|
|
<target name="ensure-ipp" depends="load-ipp, redownload-ipp" />
|
|
|
|
<target name="config-ivy" depends="ensure-ipp" unless="ivy.config">
|
|
<ivy:configure file="buildScripts/ivysettings.xml" />
|
|
<property name="ivy.config" value="true" />
|
|
</target>
|
|
|
|
<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, ecj" />
|
|
<ivy:retrieve />
|
|
</target>
|
|
|
|
<target name="ensureBuildDeps" depends="config-ivy">
|
|
<ivy:resolve file="buildScripts/ivy.xml" refresh="true" conf="build, javac7" />
|
|
<ivy:retrieve />
|
|
</target>
|
|
|
|
<target name="ensureRuntimeDeps" depends="config-ivy">
|
|
<ivy:resolve file="buildScripts/ivy.xml" refresh="true" conf="runtime" />
|
|
<ivy:retrieve />
|
|
</target>
|
|
|
|
<target name="ensureTestDeps" depends="config-ivy">
|
|
<ivy:resolve file="buildScripts/ivy.xml" refresh="true" conf="test, javac6, eclipseBuild" />
|
|
<ivy:retrieve />
|
|
</target>
|
|
|
|
<target name="version" depends="ensure-ipp" 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" />
|
|
<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>
|
|
</target>
|
|
|
|
<target name="-unpackLibs" depends="ensureRuntimeDeps">
|
|
<ivy:cachedunjar dest="build/lombok" marker="build/unpackDeps.marker">
|
|
<path refid="runtime.path" />
|
|
</ivy:cachedunjar>
|
|
</target>
|
|
|
|
<target name="compile" depends="version, ensureBuildDeps, -unpackLibs" description="Compiles the code.">
|
|
<!-- ant includes the destination dir on the classpath (and there are good reason to do this), but that also means
|
|
the bleeding edge lombok from the previous build is run, which means if there are bugs in it, you can't compile
|
|
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">
|
|
<src path="src/stubsstubs" />
|
|
</ivy:compile>
|
|
<ivy:compile destdir="build/stubs" source="1.5" target="1.5" includeantruntime="false">
|
|
<src path="src/stubs" />
|
|
<classpath location="build/stubsstubs" />
|
|
</ivy:compile>
|
|
|
|
<ivy:compile destdir="build/lombok-utils" source="1.5" target="1.5" includeantruntime="false">
|
|
<compilerarg value="-Xbootclasspath/p:build/stubs" />
|
|
<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" />
|
|
<src path="src/utils" />
|
|
<include name="lombok/javac/**" />
|
|
<classpath location="build/lombok-utils" />
|
|
<classpath refid="build.path" />
|
|
</ivy:compile>
|
|
|
|
<copy todir="build/lombok">
|
|
<fileset dir="build/lombok-utils" />
|
|
</copy>
|
|
|
|
<ivy:compile destdir="build/lombok" source="1.5" target="1.5" includeantruntime="false">
|
|
<compilerarg value="-Xbootclasspath/p:build/stubs" />
|
|
<src path="src/core" />
|
|
<src path="src/installer" />
|
|
<src path="src/eclipseAgent" />
|
|
<exclude name="lombok/javac/**" />
|
|
<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" />
|
|
<src path="src/core" />
|
|
<src path="src/delombok" />
|
|
<include name="lombok/javac/**" />
|
|
<include name="lombok/delombok/**" />
|
|
<classpath location="build/lombok" />
|
|
<classpath refid="build.path" />
|
|
</ivy:compile>
|
|
<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.core.AnnotationProcessor</echo>
|
|
</target>
|
|
|
|
<target name="dist" description="Builds THE lombok.jar file which contains everything." depends="version, compile">
|
|
<mkdir dir="dist" />
|
|
<copy file="doc/changelog.markdown" tofile="build/changelog.txt" />
|
|
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="lib/build/jarjar.jar" />
|
|
<jarjar destfile="dist/lombok-${lombok.version}.jar">
|
|
<fileset dir="build/lombok">
|
|
<exclude name="com/sun/tools/javac/**"/>
|
|
</fileset>
|
|
<fileset dir="build" includes="changelog.txt" />
|
|
<fileset dir="." includes="LICENSE" />
|
|
<fileset dir="." includes="AUTHORS" />
|
|
<rule pattern="com.zwitserloot.cmdreader.**" result="lombok.libs.com.zwitserloot.cmdreader.@1" />
|
|
<rule pattern="org.objectweb.asm.**" result="lombok.libs.org.objectweb.asm.@1" />
|
|
<manifest>
|
|
<attribute name="Premain-Class" value="lombok.core.Agent" />
|
|
<attribute name="Agent-Class" value="lombok.core.Agent" />
|
|
<attribute name="Can-Redefine-Classes" value="true" />
|
|
<attribute name="Main-Class" value="lombok.core.Main" />
|
|
<attribute name="Lombok-Version" value="${lombok.version}" />
|
|
</manifest>
|
|
</jarjar>
|
|
<copy file="dist/lombok-${lombok.version}.jar" tofile="dist/lombok.jar" />
|
|
<property name="lombok.dist.built" value="true" />
|
|
</target>
|
|
|
|
<target name="dist-utils" description="Builds lombok-utils.jar, which is a library used by i.e. lombok.ast project." depends="version, compile">
|
|
<mkdir dir="dist" />
|
|
<jar destfile="dist/lombok-utils-${lombok.version}.jar">
|
|
<fileset dir="build/lombok-utils" />
|
|
<fileset dir="." includes="LICENSE" />
|
|
<fileset dir="." includes="AUTHORS" />
|
|
<manifest>
|
|
<attribute name="Lombok-Version" value="${lombok.version}" />
|
|
</manifest>
|
|
</jar>
|
|
<copy file="dist/lombok-utils-${lombok.version}.jar" tofile="dist/lombok-utils.jar" />
|
|
</target>
|
|
|
|
<target name="intellij" depends="deps, contrib" description="Creates intellij project files and downloads all dependencies. Open this directory as a project in IntelliJ after running this target.">
|
|
<ivy:intellijgen>
|
|
<conf name="build" sources="contrib" />
|
|
<conf name="test" sources="contrib" />
|
|
<module name="lombok" depends="build, test">
|
|
<srcdir dir="src/core" />
|
|
<srcdir dir="src/utils" />
|
|
<srcdir dir="src/eclipseAgent" />
|
|
<srcdir dir="src/installer" />
|
|
<srcdir dir="src/delombok" />
|
|
<srcdir dir="src/stubs" />
|
|
<srcdir dir="experimental/src" />
|
|
<srcdir dir="test/transform/src" test="true" />
|
|
<srcdir dir="test/core/src" test="true" />
|
|
<srcdir dir="test/bytecode/src" test="true" />
|
|
</module>
|
|
<settings>
|
|
<url url="http://projectlombok.org/downloads/lombok.intellij.settings" />
|
|
</settings>
|
|
<apt enabled="true" />
|
|
</ivy:intellijgen>
|
|
</target>
|
|
|
|
<target name="eclipse" depends="deps, contrib" description="Creates eclipse project files and downloads all dependencies. Open this directory as project in eclipse after running this target.">
|
|
<ivy:eclipsegen>
|
|
<srcdir dir="src/core" />
|
|
<srcdir dir="src/utils" />
|
|
<srcdir dir="src/eclipseAgent" />
|
|
<srcdir dir="src/installer" />
|
|
<srcdir dir="src/delombok" />
|
|
<srcdir dir="src/stubs" />
|
|
<srcdir dir="experimental/src" />
|
|
<srcdir dir="test/transform/src" />
|
|
<srcdir dir="test/core/src" />
|
|
<srcdir dir="test/bytecode/src" />
|
|
<conf name="build" sources="contrib" />
|
|
<conf name="test" sources="contrib" />
|
|
<settings>
|
|
<url url="http://projectlombok.org/downloads/lombok.eclipse.settings" />
|
|
</settings>
|
|
<apt location="lib/build/spi.jar" />
|
|
</ivy:eclipsegen>
|
|
|
|
<condition property="startOnFirstThread" value="-XstartOnFirstThread" else="">
|
|
<os family="mac" />
|
|
</condition>
|
|
|
|
<property name="putJavacOnBootclasspath" value="-Xbootclasspath/p:lib/javac6/javac6.jar" />
|
|
|
|
<copy
|
|
file="buildScripts/eclipse-debug-target.template"
|
|
tofile="LombokizedEclipse.launch"
|
|
preservelastmodified="true"
|
|
overwrite="true">
|
|
<filterset>
|
|
<filter token="START_ON_FIRST_THREAD" value="${startOnFirstThread}" />
|
|
</filterset>
|
|
</copy>
|
|
<copy
|
|
file="buildScripts/eclipse-run-tests.template"
|
|
tofile="RunLombokTests.launch"
|
|
preservelastmodified="true"
|
|
overwrite="true">
|
|
<filterset>
|
|
<filter token="JAVAC_ON_BOOTCLASSPATH" value="${putJavacOnBootclasspath}" />
|
|
</filterset>
|
|
</copy>
|
|
</target>
|
|
|
|
<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">
|
|
<classpath refid="test.path" />
|
|
<classpath refid="build.path" />
|
|
<classpath path="build/lombok" />
|
|
<src path="test/core/src" />
|
|
<src path="test/transform/src" />
|
|
<src path="test/bytecode/src" />
|
|
</ivy:compile>
|
|
<copy todir="build/tests">
|
|
<fileset dir="test/pretty/resource" />
|
|
<fileset dir="test/transform/resource" />
|
|
</copy>
|
|
</target>
|
|
|
|
<target name="test-ecj" depends="dist, contrib" unless="tests.skip">
|
|
<java jar="lib/ecj/ecj.jar" fork="true" failonerror="true">
|
|
<jvmarg value="-javaagent:dist/lombok.jar=ecj" />
|
|
<arg value="-source" />
|
|
<arg value="1.6" />
|
|
<arg value="-target" />
|
|
<arg value="1.6" />
|
|
<arg value="test/ecj/SimpleTest.java" />
|
|
</java>
|
|
</target>
|
|
|
|
<target name="test" depends="-test-compile, dist, test-ecj" unless="tests.skip" description="Runs the tests.">
|
|
<junit haltonfailure="yes" fork="true">
|
|
<jvmarg value="-javaagent:dist/lombok.jar" />
|
|
<formatter type="plain" usefile="false" unless="tests.quiet" />
|
|
<classpath refid="test.path" />
|
|
<classpath refid="eclipseBuild.path" />
|
|
<classpath path="lib/javac6/javac6.jar" />
|
|
<classpath path="build/lombok" />
|
|
<classpath path="build/tests" />
|
|
<batchtest>
|
|
<fileset dir="test/core/src">
|
|
<include name="**/Test*.java" />
|
|
</fileset>
|
|
<fileset dir="test/transform/src">
|
|
<include name="**/Test*.java" />
|
|
</fileset>
|
|
<fileset dir="test/bytecode/src">
|
|
<include name="**/Test*.java" />
|
|
</fileset>
|
|
</batchtest>
|
|
</junit>
|
|
<echo level="info">All tests successful.</echo>
|
|
</target>
|
|
|
|
<target name="utils-javadoc" depends="compile">
|
|
<mkdir dir="build/utils-api" />
|
|
<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 © 2011 The Project Lombok Authors, licensed under the <a href='http://www.opensource.org/licenses/mit-license.php'>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. -->
|
|
<replaceregexp match="\?is-external=true#" replace="#" flags="gi">
|
|
<fileset dir="build/utils-api" includes="**/*.html" />
|
|
</replaceregexp>
|
|
</target>
|
|
|
|
<target name="utils-maven" depends="version, dist-utils, test, utils-javadoc" description="Build a maven artifact bundle for lombok-utils.">
|
|
<jar destfile="dist/lombok-utils-${lombok.version}-javadoc.jar">
|
|
<fileset dir="build/utils-api" />
|
|
</jar>
|
|
<jar destfile="dist/lombok-utils-${lombok.version}-sources.jar">
|
|
<fileset dir="src/utils" />
|
|
</jar>
|
|
<mkdir dir="build/utils-mavenPublish" />
|
|
<copy tofile="build/utils-mavenPublish/pom.xml" overwrite="true" file="doc/utils-maven-pom.xml">
|
|
<filterchain>
|
|
<replacetokens>
|
|
<token key="VERSION" value="${lombok.version}" />
|
|
</replacetokens>
|
|
</filterchain>
|
|
</copy>
|
|
<tar destfile="build/utils-mavenPublish/utils-mavenPublish.tar.bz2" compression="bzip2">
|
|
<tarfileset dir="dist">
|
|
<include name="lombok-utils-${lombok.version}.jar" />
|
|
<include name="lombok-utils-${lombok.version}-sources.jar" />
|
|
<include name="lombok-utils-${lombok.version}-javadoc.jar" />
|
|
</tarfileset>
|
|
<tarfileset dir="build/utils-mavenPublish" includes="pom.xml" />
|
|
</tar>
|
|
</target>
|
|
|
|
<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}" />
|
|
</ant>
|
|
</target>
|
|
|
|
<target name="maven" depends="version, dist, test, javadoc" description="Build a maven artifact bundle.">
|
|
<jar destfile="dist/lombok-${lombok.version}-javadoc.jar">
|
|
<fileset dir="doc/api" />
|
|
</jar>
|
|
<jar destfile="dist/lombok-${lombok.version}-sources.jar">
|
|
<fileset dir="src/core" />
|
|
<fileset dir="src/utils" />
|
|
<fileset dir="src/eclipseAgent" />
|
|
<fileset dir="src/installer" />
|
|
<fileset dir="src/delombok" />
|
|
<fileset dir="test/transform/src" />
|
|
<fileset dir="test/core/src" />
|
|
</jar>
|
|
<mkdir dir="build/mavenPublish" />
|
|
<copy tofile="build/mavenPublish/pom.xml" overwrite="true" file="doc/maven-pom.xml">
|
|
<filterchain>
|
|
<replacetokens>
|
|
<token key="VERSION" value="${lombok.version}" />
|
|
</replacetokens>
|
|
</filterchain>
|
|
</copy>
|
|
<tar destfile="build/mavenPublish/mavenPublish.tar.bz2" compression="bzip2">
|
|
<tarfileset dir="dist">
|
|
<include name="lombok-${lombok.version}.jar" />
|
|
<include name="lombok-${lombok.version}-sources.jar" />
|
|
<include name="lombok-${lombok.version}-javadoc.jar" />
|
|
</tarfileset>
|
|
<tarfileset dir="build/mavenPublish" includes="pom.xml" />
|
|
</tar>
|
|
</target>
|
|
|
|
<target name="maven-publish" depends="maven, utils-maven, -defSSH" description="Build a maven artifact bundle then upload it to projectlombok.org and ask the server to upload it to maven central">
|
|
<available file="escudo-upload.key" property="escudo.key.available" />
|
|
<fail unless="escudo.key.available">You don't have the escudo-upload.key; you'll need it to get write access to the server.</fail>
|
|
<scp
|
|
localFile="build/mavenPublish/mavenPublish.tar.bz2"
|
|
todir="lombokup@projectlombok.org:/staging"
|
|
keyfile="escudo-upload.key" passphrase=""
|
|
sftp="false" verbose="true" trust="true" />
|
|
<scp
|
|
localFile="build/utils-mavenPublish/utils-mavenPublish.tar.bz2"
|
|
todir="lombokup@projectlombok.org:/staging"
|
|
keyfile="escudo-upload.key" passphrase=""
|
|
sftp="false" verbose="true" trust="true" />
|
|
<sshexec
|
|
host="projectlombok.org"
|
|
username="lombokup"
|
|
keyfile="escudo-upload.key" passphrase=""
|
|
trust="true" command="./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"
|
|
username="lombokup"
|
|
keyfile="escudo-upload.key" passphrase=""
|
|
trust="true" command="./showMavenCentralPassword" />
|
|
</target>
|
|
|
|
<target name="-credentials">
|
|
<available property="hasCredentialsFile" file="${credentialsFile}"/>
|
|
</target>
|
|
|
|
<target name="-checkCredentialsFile" depends="-credentials" unless="hasCredentialsFile">
|
|
<echo file="${credentialsFile}">
|
|
#username=[your google account name without @gmail.com]
|
|
#password=[your googlecode password, is NOT your gmail password]
|
|
</echo>
|
|
<fail message="fill in ${credentialsFile} to provide your credentials" />
|
|
</target>
|
|
|
|
<target name="publish" description="Publishes the latest build to googlecode." depends="version, -checkCredentialsFile, dist, dist-utils, test, -defSSH">
|
|
<taskdef classname="net.bluecow.googlecode.ant.GoogleCodeUploadTask" classpathref="build.path" name="gcupload" />
|
|
<available file="escudo-upload.key" property="escudo.key.available" />
|
|
<fail unless="escudo.key.available">You don't have the escudo-upload.key; you'll need it to get write access to the server.</fail>
|
|
<property file="${credentialsFile}" prefix="google" />
|
|
<gcupload
|
|
username="${google.username}"
|
|
password="${google.password}"
|
|
projectname="projectlombok"
|
|
filename="dist/lombok.jar"
|
|
targetfilename="lombok-${lombok.version}.jar"
|
|
summary="Version ${lombok.version}"
|
|
labels=""
|
|
verbose="true" />
|
|
<gcupload
|
|
username="${google.username}"
|
|
password="${google.password}"
|
|
projectname="projectlombok"
|
|
filename="dist/lombok.jar"
|
|
targetfilename="lombok.jar"
|
|
summary="Version ${lombok.version} - The everything jar - doubleclick it to install, or just include it in your projects."
|
|
labels="Featured"
|
|
verbose="true" />
|
|
<scp
|
|
localFile="dist/lombok-utils-${lombok.version}.jar"
|
|
todir="lombokup@projectlombok.org:/staging"
|
|
keyfile="escudo-upload.key" passphrase=""
|
|
sftp="false" verbose="true" trust="true" />
|
|
<sshexec
|
|
host="projectlombok.org"
|
|
username="lombokup"
|
|
keyfile="escudo-upload.key" passphrase=""
|
|
trust="true" command="./deployLombokUtils '${lombok.version}'" />
|
|
</target>
|
|
|
|
<target name="publish-all" depends="clean, version, website-publish, maven-publish, publish"
|
|
description="Publishes lombok itself, updates the maven repository and the website." />
|
|
|
|
<target name="edge-release" depends="clean, version, dist"
|
|
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}" />
|
|
</ant>
|
|
</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}" />
|
|
</ant>
|
|
</target>
|
|
|
|
<target name="website-publish" depends="clean, version"
|
|
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}" />
|
|
</ant>
|
|
</target>
|
|
</project>
|