Skip to content

Commit

Permalink
[build] [mapstructBinding]
Browse files Browse the repository at this point in the history
  • Loading branch information
rzwitserloot committed Jun 25, 2020
1 parent 0bbedd0 commit 0f1c950
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 172 deletions.
1 change: 1 addition & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ the common tasks and can be called on to run the main aspects of all the sub-scr
<import file="buildScripts/create-intellij-project.ant.xml" />
<import file="buildScripts/website.ant.xml" />
<import file="buildScripts/eclipse-p2.ant.xml" />
<import file="buildScripts/mapstructBinding.ant.xml" />
</project>
1 change: 0 additions & 1 deletion buildScripts/create-eclipse-project.ant.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ This buildfile is part of projectlombok.org. It creates the infrastructure neede
<srcdir dir="src/installer" />
<srcdir dir="src/delombok" />
<srcdir dir="src/stubs" />
<srcdir dir="src/testAP" />
<srcdir dir="src/support" />
<srcdir dir="experimental/src" />
<srcdir dir="test/transform/src" />
Expand Down
1 change: 0 additions & 1 deletion buildScripts/create-intellij-project.ant.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ This buildfile is part of projectlombok.org. It creates the infrastructure neede
<srcdir dir="src/installer" />
<srcdir dir="src/delombok" />
<srcdir dir="src/stubs" />
<srcdir dir="src/testAP" />
<srcdir dir="src/support" />
<srcdir dir="experimental/src" />
<srcdir dir="test/transform/src" test="true" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,63 +19,14 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<project name="lombok.mapstruct-old" xmlns:ivy="antlib:com.zwitserloot.ivyplusplus" basedir="..">
<project name="lombok.mapstructBinding" xmlns:ivy="antlib:com.zwitserloot.ivyplusplus" basedir="..">
<description>
This buildfile is part of projectlombok.org. It contains leftover tasks from the previous version
of the build that are related to mapstruct. We will clean this up or remove it soon.
This buildfile is part of projectlombok.org. It builds the mapstruct-lombok binding; we think the
version on mavencentral is the last version that is ever needed; the code itself is trivial and
exists as a separate dependency solely because it is itself dependent on both lombok and mapstruct.
</description>

<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" ecj="true">
<bootclasspath path="${rt-openjdk8}" />
<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>

<target name="-compileMapstruct">
<target name="-mapstructBinding.compile">
<mkdir dir="build/mapstruct" />
<javac includeAntRuntime="false" source="1.9" target="1.9" destdir="build/mapstruct">
<src path="src/j9stubs" />
Expand All @@ -84,16 +35,16 @@ of the build that are related to mapstruct. We will clean this up or remove it s
<mkdir dir="build/lombok/secondaryLoading.SCL.lombok/org/mapstruct/ap/spi" />
<move file="build/mapstruct/org/mapstruct/ap/spi/AstModifyingAnnotationProcessor.class" tofile="build/lombok/secondaryLoading.SCL.lombok/org/mapstruct/ap/spi/AstModifyingAnnotationProcessor.SCL.lombok" />
</target>

<target name="-mapstructBindingPrepare" depends="-compileMapstruct">
<target name="-mapstructBinding.prepare" depends="-mapstructBinding.compile">
<mkdir dir="build/mapstruct-module-path" />
<copy file="dist/lombok.jar" todir="build/mapstruct-module-path" />
<jar destfile="build/mapstruct-module-path/mapstruct-processor.jar" basedir="build/mapstruct" includes="org/**">
<manifest>
<attribute name="Automatic-Module-Name" value="org.mapstruct.processor" />
</manifest>
</jar>

<mkdir dir="build/mapstruct-binding/maven" />
<copy tofile="build/mapstruct-binding/maven/pom.xml" overwrite="true" file="doc/mapstruct-binding-maven-pom.xml">
<filterchain>
Expand All @@ -104,7 +55,7 @@ of the build that are related to mapstruct. We will clean this up or remove it s
</copy>
</target>

<target name="-mapstructBindingDoc" depends="-mapstructBindingPrepare">
<target name="-mapstructBinding.doc" depends="-mapstructBinding.prepare">
<mkdir dir="build/mapstruct-binding/api" />
<javadoc
Package="true"
Expand All @@ -125,7 +76,7 @@ of the build that are related to mapstruct. We will clean this up or remove it s
<jar destfile="dist/lombok-mapstruct-binding-${mapstruct-binding.version}-javadoc.jar" basedir="build/mapstruct-binding/api" includes="**" />
</target>

<target name="-mapstructBindingJar" depends="dist,-mapstructBindingPrepare">
<target name="-mapstructBinding.jar" depends="dist,-mapstructBinding.prepare">
<mkdir dir="build/mapstruct-binding/classes" />
<echo file="build/mapstruct-binding/classes/META-INF/services/org.mapstruct.ap.spi.AstModifyingAnnotationProcessor">lombok.mapstruct.NotifierHider$AstModificationNotifier</echo>

Expand All @@ -135,22 +86,25 @@ of the build that are related to mapstruct. We will clean this up or remove it s
<jar destfile="dist/lombok-mapstruct-binding-${mapstruct-binding.version}.jar" basedir="build/mapstruct-binding/classes" includes="**" />
</target>

<target name="-mapstructBindingSrc" depends="-mapstructBindingJar">
<target name="-mapstructBinding.src" depends="-mapstructBinding.jar">
<jar destfile="dist/lombok-mapstruct-binding-${mapstruct-binding.version}-sources.jar" basedir="src/bindings/mapstruct" includes="**" />
</target>

<target name="mapstructBinding" depends="dist,-mapstructBindingJar,-mapstructBindingDoc,-mapstructBindingSrc">
<target name="mapstructBinding.pack" depends="dist,-mapstructBinding.jar,-mapstructBinding.doc,-mapstructBinding.src">
</target>

<target name="mapstructMaven" depends="mapstructBinding,-mvn-ext" description="Create a maven repo for mapstruct binding into a build dir.">
<property environment="env" />
<target name="mapstructBinding.maven" depends="mapstructBinding.pack" description="Create a maven repo for mapstruct binding into a build dir.">
<delete quiet="true" dir="build/mapstruct-binding-maven" />
<mkdir dir="build/mapstruct-binding-maven" />
<condition property="mvn-exe" value="${env.MAVEN_HOME}/bin/mvn${mvn-ext}" else="mvn${mvn-ext}">
<condition property="exe.mvn.base" value="mvn.cmd" else="mvn">
<os family="windows" />
</condition>
<condition property="exe.mvn" value="${env.MAVEN_HOME}/bin/${exe.mvn.base}" else="${exe.mvn.base}">
<isset property="env.MAVEN_HOME" />
</condition>

<exec executable="${mvn-exe}" failifexecutionfails="false" resultproperty="mvn-result">
<local name="mvn.result" />
<exec executable="${exe.mvn}" failifexecutionfails="false" resultproperty="mvn.result">
<arg value="deploy:deploy-file" />
<arg value="-Dfile=dist/lombok-mapstruct-binding-${mapstruct-binding.version}.jar" />
<arg value="-Dsources=dist/lombok-mapstruct-binding-${mapstruct-binding.version}-sources.jar" />
Expand All @@ -161,9 +115,11 @@ of the build that are related to mapstruct. We will clean this up or remove it s
<arg value="-DpomFile=build/mapstruct-binding/maven/pom.xml" />
<arg value="-Durl=file://${basedir}/build/mapstruct-binding-maven" />
</exec>
<condition property="mvn-notfound" value="true">
<not><isset property="mvn-result" /></not>
</condition>
<fail message="mvn is not on your path and/or MAVEN_HOME is not set. Add mvn to your path or set MAVEN_HOME to continue." if="mvn-notfound" />
<fail>
mvn is not on your path and/or MAVEN_HOME is not set. Add mvn to your path or set MAVEN_HOME to continue.
<condition>
<not><isset property="mvn.result" /></not>
</condition>
</fail>
</target>
</project>
2 changes: 1 addition & 1 deletion buildScripts/website.ant.xml
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ such as applying the templates to produce the website, converting the changelog
knownHosts="ssh.knownHosts" />
</target>

<target name="release.publish" depends="maven, -release.publish.site, website, eclipsep2.publish, maven.publish" />
<target name="release.publish" depends="maven, -release.publish.site, website.publish, eclipsep2.publish, maven.publish" />

<target name="edge.pack" depends="compile.support, version, dist, maven.edge">
<delete file="build/website/download-edge.html" />
Expand Down
10 changes: 0 additions & 10 deletions src/testAP/org/projectlombok/testAp/ExampleAnnotation.java

This file was deleted.

77 changes: 0 additions & 77 deletions src/testAP/org/projectlombok/testAp/TestAp.java

This file was deleted.

13 changes: 0 additions & 13 deletions src/useTestAP/UseTestAp.java

This file was deleted.

0 comments on commit 0f1c950

Please sign in to comment.