diff options
Diffstat (limited to 'test/manual/moduleBasedMultiProject')
6 files changed, 35 insertions, 0 deletions
diff --git a/test/manual/moduleBasedMultiProject/.gitignore b/test/manual/moduleBasedMultiProject/.gitignore new file mode 100644 index 00000000..e2e7327c --- /dev/null +++ b/test/manual/moduleBasedMultiProject/.gitignore @@ -0,0 +1 @@ +/out diff --git a/test/manual/moduleBasedMultiProject/projA/module-info.java b/test/manual/moduleBasedMultiProject/projA/module-info.java new file mode 100644 index 00000000..1ae75d49 --- /dev/null +++ b/test/manual/moduleBasedMultiProject/projA/module-info.java @@ -0,0 +1,4 @@ +module projA { + requires static lombok; + exports pkgA; +} diff --git a/test/manual/moduleBasedMultiProject/projA/pkgA/ClassA.java b/test/manual/moduleBasedMultiProject/projA/pkgA/ClassA.java new file mode 100644 index 00000000..2e17e142 --- /dev/null +++ b/test/manual/moduleBasedMultiProject/projA/pkgA/ClassA.java @@ -0,0 +1,5 @@ +package pkgA; + +public class ClassA { + @lombok.Getter private String hello = "hello"; +} diff --git a/test/manual/moduleBasedMultiProject/projB/module-info.java b/test/manual/moduleBasedMultiProject/projB/module-info.java new file mode 100644 index 00000000..7b82f362 --- /dev/null +++ b/test/manual/moduleBasedMultiProject/projB/module-info.java @@ -0,0 +1,5 @@ +module projB { + requires static lombok; + requires projA; +} + diff --git a/test/manual/moduleBasedMultiProject/projB/pkgB/ClassB.java b/test/manual/moduleBasedMultiProject/projB/pkgB/ClassB.java new file mode 100644 index 00000000..3f57f31e --- /dev/null +++ b/test/manual/moduleBasedMultiProject/projB/pkgB/ClassB.java @@ -0,0 +1,10 @@ +import lombok.Getter; +import pkgA.ClassA; + +public class ClassB { + @Getter private String world = "world"; + public void test() { + new ClassA().getHello(); + getWorld(); + } +} diff --git a/test/manual/moduleBasedMultiProject/runTests b/test/manual/moduleBasedMultiProject/runTests new file mode 100755 index 00000000..48557b43 --- /dev/null +++ b/test/manual/moduleBasedMultiProject/runTests @@ -0,0 +1,10 @@ +#!/bin/sh +echo 'This will build, module-style, 2 modules with lombok dependencies. If the compilation works without error or warning, lombok is working as designed.' +mkdir -p out/projA +mkdir -p out/projB +javac --processor-path ../../../dist/lombok.jar -p ../../../dist/lombok.jar -d out/projA projA/module-info.java projA/pkgA/ClassA.java +javac --processor-path ../../../dist/lombok.jar -p ../../../dist/lombok.jar:out/projA -d out/projB projB/module-info.java projB/pkgB/ClassB.java + +echo Now we try to delombok and see if it works as designed. + +java -jar ../../../dist/lombok.jar delombok -p --module-path out/projA projB/pkgB/ClassB.java projB/module-info.java |