aboutsummaryrefslogtreecommitdiff
path: root/build.xml
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2020-02-14 00:06:52 +0100
committerRoel Spilker <r.spilker@gmail.com>2020-02-14 00:07:45 +0100
commit0d7540db0cc0c9a2758799522925f09eddeb7420 (patch)
tree10f7b31859ebe9ed670b04ff4007406e5de3dd7a /build.xml
parenta8dd99d9f080be6839fe507ade104fccac115de4 (diff)
downloadlombok-0d7540db0cc0c9a2758799522925f09eddeb7420.tar.gz
lombok-0d7540db0cc0c9a2758799522925f09eddeb7420.tar.bz2
lombok-0d7540db0cc0c9a2758799522925f09eddeb7420.zip
(#2125) Extract mapstruct binding to separate module.
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml33
1 files changed, 24 insertions, 9 deletions
diff --git a/build.xml b/build.xml
index 891948c6..08adc3e2 100644
--- a/build.xml
+++ b/build.xml
@@ -185,7 +185,6 @@ Your current version is:
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" />
- <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" />
@@ -262,13 +261,6 @@ Your current version is:
<!-- 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" />
</javac>
- <mkdir dir="build/lombokMapstruct" />
- <javac includeAntRuntime="false" source="1.9" target="1.9" destdir="build/lombokMapstruct">
- <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. -->
- </javac>
- <mkdir dir="build/lombok/secondaryLoading.SCL.lombok/org/mapstruct/ap/spi" />
- <move file="build/lombokMapstruct/org/mapstruct/ap/spi/AstModifyingAnnotationProcessor.class" tofile="build/lombok/secondaryLoading.SCL.lombok/org/mapstruct/ap/spi/AstModifyingAnnotationProcessor.SCL.lombok" />
<ivy:compile destdir="build/lombok/Class50" source="1.5" target="1.6" ecj="true" nowarn="true">
<bootclasspath location="build/stubs" />
@@ -312,7 +304,6 @@ Your current version is:
<mkdir dir="build/lombok/META-INF/services" />
<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>
<mkdir dir="build/lombok/META-INF/gradle" />
<echo file="build/lombok/META-INF/gradle/incremental.annotation.processors">lombok.launch.AnnotationProcessorHider$AnnotationProcessor,isolating
lombok.launch.AnnotationProcessorHider$ClaimingProcessor,isolating</echo>
@@ -1072,4 +1063,28 @@ You can also create your own by writing a 'testenvironment.properties' file. The
<compilerarg value="org.projectlombok.testAp.TestAp,lombok.launch.AnnotationProcessorHider$AnnotationProcessor" />
</javac>
</target>
+
+ <target name="mapstructBinding" depends="dist">
+ <mkdir dir="build/mapstruct" />
+ <mkdir dir="build/mapstruct-module-path" />
+ <copy file="dist/lombok.jar" todir="build/mapstruct-module-path" />
+
+ <javac includeAntRuntime="false" source="1.9" target="1.9" destdir="build/mapstruct">
+ <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. -->
+ </javac>
+ <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" />
+ <echo file="build/mapstruct-binding/META-INF/services/org.mapstruct.ap.spi.AstModifyingAnnotationProcessor">lombok.mapstruct.NotifierHider$AstModificationNotifier</echo>
+
+ <javac includeAntRuntime="false" source="1.9" target="1.9" destdir="build/mapstruct-binding" modulepath="build/mapstruct-module-path">
+ <src path="src/bindings/mapstruct" />
+ </javac>
+ <jar destfile="dist/lombok-mapstruct-binding-0.1.0" basedir="build/mapstruct-binding" includes="**" />
+ </target>
</project>