From 0bbedd092a1f0f506d106943b4b400c7986c5f36 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Fri, 29 May 2020 00:17:20 +0200 Subject: [build] rewriting the build system --- buildScripts/create-eclipse-project.ant.xml | 182 ++++++++++++++++++++++++++++ 1 file changed, 182 insertions(+) create mode 100644 buildScripts/create-eclipse-project.ant.xml (limited to 'buildScripts/create-eclipse-project.ant.xml') diff --git a/buildScripts/create-eclipse-project.ant.xml b/buildScripts/create-eclipse-project.ant.xml new file mode 100644 index 00000000..93eed3b0 --- /dev/null +++ b/buildScripts/create-eclipse-project.ant.xml @@ -0,0 +1,182 @@ + + + +This buildfile is part of projectlombok.org. It creates the infrastructure needed to develop lombok on eclipse. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit From 0f1c950b7700b476954c6e193e53d36ed34e2050 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Thu, 25 Jun 2020 22:10:15 +0200 Subject: [build] [mapstructBinding] --- build.xml | 1 + buildScripts/create-eclipse-project.ant.xml | 1 - buildScripts/create-intellij-project.ant.xml | 1 - buildScripts/mapstruct-old.ant.xml | 169 --------------------- buildScripts/mapstructBinding.ant.xml | 125 +++++++++++++++ buildScripts/website.ant.xml | 2 +- .../projectlombok/testAp/ExampleAnnotation.java | 10 -- src/testAP/org/projectlombok/testAp/TestAp.java | 77 ---------- src/useTestAP/UseTestAp.java | 13 -- 9 files changed, 127 insertions(+), 272 deletions(-) delete mode 100644 buildScripts/mapstruct-old.ant.xml create mode 100644 buildScripts/mapstructBinding.ant.xml delete mode 100644 src/testAP/org/projectlombok/testAp/ExampleAnnotation.java delete mode 100644 src/testAP/org/projectlombok/testAp/TestAp.java delete mode 100644 src/useTestAP/UseTestAp.java (limited to 'buildScripts/create-eclipse-project.ant.xml') diff --git a/build.xml b/build.xml index 59e258d4..5a1a67a0 100644 --- a/build.xml +++ b/build.xml @@ -36,4 +36,5 @@ the common tasks and can be called on to run the main aspects of all the sub-scr + diff --git a/buildScripts/create-eclipse-project.ant.xml b/buildScripts/create-eclipse-project.ant.xml index 93eed3b0..386ed3de 100644 --- a/buildScripts/create-eclipse-project.ant.xml +++ b/buildScripts/create-eclipse-project.ant.xml @@ -36,7 +36,6 @@ This buildfile is part of projectlombok.org. It creates the infrastructure neede - diff --git a/buildScripts/create-intellij-project.ant.xml b/buildScripts/create-intellij-project.ant.xml index abb8c589..865e8971 100644 --- a/buildScripts/create-intellij-project.ant.xml +++ b/buildScripts/create-intellij-project.ant.xml @@ -41,7 +41,6 @@ This buildfile is part of projectlombok.org. It creates the infrastructure neede - diff --git a/buildScripts/mapstruct-old.ant.xml b/buildScripts/mapstruct-old.ant.xml deleted file mode 100644 index cf14dd93..00000000 --- a/buildScripts/mapstruct-old.ant.xml +++ /dev/null @@ -1,169 +0,0 @@ - - - -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. - - - - - - - - - - - - org.projectlombok.testAp.TestAp - - - - - - - - - - - - - - - - Running in order: First Lombok, Then testAP - - - - - - - - - - - - Running in order: First TestAP, Then Lombok - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - lombok.mapstruct.NotifierHider$AstModificationNotifier - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/buildScripts/mapstructBinding.ant.xml b/buildScripts/mapstructBinding.ant.xml new file mode 100644 index 00000000..c59b84da --- /dev/null +++ b/buildScripts/mapstructBinding.ant.xml @@ -0,0 +1,125 @@ + + + +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. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + lombok.mapstruct.NotifierHider$AstModificationNotifier + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mvn is not on your path and/or MAVEN_HOME is not set. Add mvn to your path or set MAVEN_HOME to continue. + + + + + + diff --git a/buildScripts/website.ant.xml b/buildScripts/website.ant.xml index 15bca92d..9efb2668 100644 --- a/buildScripts/website.ant.xml +++ b/buildScripts/website.ant.xml @@ -305,7 +305,7 @@ such as applying the templates to produce the website, converting the changelog knownHosts="ssh.knownHosts" /> - + diff --git a/src/testAP/org/projectlombok/testAp/ExampleAnnotation.java b/src/testAP/org/projectlombok/testAp/ExampleAnnotation.java deleted file mode 100644 index b419326b..00000000 --- a/src/testAP/org/projectlombok/testAp/ExampleAnnotation.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.projectlombok.testAp; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Retention(RetentionPolicy.CLASS) -@Target(ElementType.TYPE) -public @interface ExampleAnnotation {} diff --git a/src/testAP/org/projectlombok/testAp/TestAp.java b/src/testAP/org/projectlombok/testAp/TestAp.java deleted file mode 100644 index b5f20d21..00000000 --- a/src/testAP/org/projectlombok/testAp/TestAp.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2016 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. - */ -package org.projectlombok.testAp; - -import java.util.Set; - -import javax.annotation.processing.AbstractProcessor; -import javax.annotation.processing.ProcessingEnvironment; -import javax.annotation.processing.RoundEnvironment; -import javax.annotation.processing.SupportedAnnotationTypes; -import javax.lang.model.SourceVersion; -import javax.lang.model.element.Element; -import javax.lang.model.element.ElementKind; -import javax.lang.model.element.ExecutableElement; -import javax.lang.model.element.TypeElement; -import javax.lang.model.type.TypeMirror; - -@SupportedAnnotationTypes("org.projectlombok.testAp.ExampleAnnotation") -public final class TestAp extends AbstractProcessor { - private int roundCounter = 0; - private static final long START = System.currentTimeMillis(); - - private void log(String txt) { - System.out.printf("***[%3d]: %s\n", System.currentTimeMillis() - START, txt); - } - - @Override public void init(ProcessingEnvironment processingEnv) { - log("TestAP in init"); - super.init(processingEnv); - } - - @Override public boolean process(Set annotations, RoundEnvironment roundEnv) { - roundCounter++; - log("TestAP in round " + roundCounter); - boolean foundGetTest = false; - int annotatedElemCount = 0; - for (Element annotated : roundEnv.getElementsAnnotatedWith(ExampleAnnotation.class)) { - annotatedElemCount++; - for (Element child : annotated.getEnclosedElements()) { - if (child.getSimpleName().toString().equals("getTest") && child.getKind() == ElementKind.METHOD) foundGetTest = true; - if (child instanceof ExecutableElement) { - TypeMirror returnType = ((ExecutableElement) child).getReturnType(); - System.out.println("RETURN TYPE for " + child.getSimpleName() + ": " + returnType.getClass() + " -- " + returnType.toString()); - } - } - } - - if (foundGetTest) log("RESULT: POSITIVE -- found the getTest method"); - else if (annotatedElemCount > 0) log("RESULT: NEGATIVE -- found the example class but there's no getTest method in it according to the type mirror."); - else log("RESULT: AMBIVALENT -- The example class is not provided by 'getElementsAnnotatedWith' in this round. Not an issue, unless previously you got a NEGATIVE result."); - - return false; - } - - @Override public SourceVersion getSupportedSourceVersion() { - return SourceVersion.latestSupported(); - } -} diff --git a/src/useTestAP/UseTestAp.java b/src/useTestAP/UseTestAp.java deleted file mode 100644 index 2d7eab7b..00000000 --- a/src/useTestAP/UseTestAp.java +++ /dev/null @@ -1,13 +0,0 @@ -@org.projectlombok.testAp.ExampleAnnotation -//@lombok.experimental.Accessors(chain=true) -public class UseTestAp { - @lombok.Setter @lombok.Getter String test; - - public void confirmGetTestExists() { - System.out.println(getTest()); - } - - public UseTestAp returningSelf() { - return this; - } -} -- cgit