mirror of
https://github.com/tiennm99/lombok.git
synced 2026-05-14 08:58:30 +00:00
125 lines
5.2 KiB
XML
125 lines
5.2 KiB
XML
<!--
|
|
Copyright (C) 2020-2023 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.eclipsep2" basedir=".." xmlns:ivy="antlib:com.zwitserloot.ivyplusplus">
|
|
<description>
|
|
This buildfile is part of projectlombok.org. It is responsible for building the eclipse P2 update site.
|
|
</description>
|
|
|
|
<target name="eclipsep2.clean">
|
|
<delete dir="build/p2" quiet="true" />
|
|
</target>
|
|
|
|
<target name="-eclipsep2.get-epoch">
|
|
<mkdir dir="build/p2-support" />
|
|
<echo file="build/p2-support/Epoch.java">public class Epoch {public static void main(String[] args) {System.out.print(System.currentTimeMillis());}}</echo>
|
|
<javac srcdir="build/p2-support" release="8" includeAntRuntime="false" destdir="build/p2-support" />
|
|
<java classname="Epoch" classpath="build/p2-support" fork="false" outputproperty="dt.epochMillis" />
|
|
</target>
|
|
|
|
<target name="eclipsep2.build" depends="version, dist, -eclipsep2.get-epoch">
|
|
<tstamp><format property="dt.year" pattern="yyyy" /></tstamp>
|
|
<mkdir dir="build/p2" />
|
|
<mkdir dir="build/p2/features" />
|
|
<mkdir dir="build/p2/plugins" />
|
|
|
|
<jar destfile="build/p2/plugins/org.projectlombok.agent_${lombok.version}.jar">
|
|
<manifest>
|
|
<attribute name="Manifest-Version" value="1.0" />
|
|
<attribute name="Bundle-ManifestVersion" value="2" />
|
|
<attribute name="Bundle-Name" value="Lombok Agent" />
|
|
<attribute name="Bundle-SymbolicName" value="org.projectlombok.agent" />
|
|
<attribute name="Bundle-Version" value="${lombok.version}" />
|
|
<attribute name="Automatic-Module-Name" value="org.projectlombok.agent" />
|
|
</manifest>
|
|
<zipfileset dir="buildScripts/p2" includes="p2.inf" prefix="META-INF/" />
|
|
<zipfileset dir="dist" includes="lombok-${lombok.version}.jar" fullpath="lombok.jar" />
|
|
</jar>
|
|
<loadfile property="store.pass" srcFile="buildScripts/lombok.jks.password" />
|
|
<signjar
|
|
jar="build/p2/plugins/org.projectlombok.agent_${lombok.version}.jar"
|
|
alias="lombok"
|
|
storepass="${store.pass}"
|
|
keystore="buildScripts/lombok.jks"
|
|
/>
|
|
|
|
<length property="agent.zip.size" file="build/p2/plugins/org.projectlombok.agent_${lombok.version}.jar" />
|
|
|
|
<copy todir="build/p2" overwrite="true">
|
|
<fileset dir="buildScripts/p2" includes="feature.xml" />
|
|
<filterset>
|
|
<filter token="YEAR" value="${dt.year}" />
|
|
<filter token="EPOCH_MILLIS" value="${dt.epochMillis}" />
|
|
<filter token="VERSION" value="${lombok.version}" />
|
|
</filterset>
|
|
</copy>
|
|
<zip destfile="build/p2/features/org.projectlombok.feature_${lombok.version}.jar" basedir="build/p2" includes="feature.xml" />
|
|
<signjar
|
|
jar="build/p2/features/org.projectlombok.feature_${lombok.version}.jar"
|
|
alias="lombok"
|
|
storepass="${store.pass}"
|
|
keystore="buildScripts/lombok.jks"
|
|
/>
|
|
<delete file="build/p2/feature.xml" />
|
|
<length property="feature.zip.size" file="build/p2/features/org.projectlombok.feature_${lombok.version}.jar" />
|
|
|
|
<copy todir="build/p2" overwrite="true">
|
|
<fileset dir="buildScripts/p2" includes="artifacts.xml,content.xml" />
|
|
<filterset>
|
|
<filter token="YEAR" value="${dt.year}" />
|
|
<filter token="EPOCH_MILLIS" value="${dt.epochMillis}" />
|
|
<filter token="VERSION" value="${lombok.version}" />
|
|
<filter token="FEATURE_ZIP_SIZE" value="${feature.zip.size}" />
|
|
<filter token="AGENT_ZIP_SIZE" value="${agent.zip.size}" />
|
|
</filterset>
|
|
</copy>
|
|
<zip destfile="build/p2/artifacts.jar" basedir="build/p2" includes="artifacts.xml" />
|
|
<signjar
|
|
jar="build/p2/artifacts.jar"
|
|
alias="lombok"
|
|
storepass="${store.pass}"
|
|
keystore="buildScripts/lombok.jks"
|
|
/>
|
|
<zip destfile="build/p2/content.jar" basedir="build/p2" includes="content.xml" />
|
|
<signjar
|
|
jar="build/p2/content.jar"
|
|
alias="lombok"
|
|
storepass="${store.pass}"
|
|
keystore="buildScripts/lombok.jks"
|
|
/>
|
|
<delete file="build/p2/artifacts.xml" />
|
|
<delete file="build/p2/content.xml" />
|
|
</target>
|
|
|
|
<target name="eclipsep2.publish" depends="eclipsep2.build, compile.support">
|
|
<java fork="true" classname="lombok.publish.PublishToBucket" failonerror="true">
|
|
<classpath>
|
|
<path refid="cp.buildtools" />
|
|
<pathelement location="build/support" />
|
|
</classpath>
|
|
<arg value="${gpg.keyrings}/s3_creds.txt" />
|
|
<arg value="build/p2" />
|
|
<arg value="p2" />
|
|
<arg value="true" />
|
|
</java>
|
|
</target>
|
|
</project>
|