forked from projectlombok/lombok
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fixes projectlombok#3389] Support multi-release jars in delombok
- Loading branch information
Showing
8 changed files
with
64 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
set -euo pipefail | ||
echo 'This will build a project with a multi release jar dependency. If the compilation works without error or warning, lombok is working as designed.' | ||
mkdir -p out/javac | ||
|
||
# We cannot use the link because javac can infer the module name | ||
JAR=$(realpath ../../../lib/test/org.jetbrains-annotations.jar) | ||
|
||
javac --processor-path ../../../dist/lombok.jar -p ../../../dist/lombok.jar:$JAR -d out/javac src/module-info.java src/pkg/MultiReleaseJarTest.java | ||
|
||
echo Now we try to delombok and see if it works as designed. | ||
|
||
java -jar ../../../dist/lombok.jar delombok --module-path $JAR -d out/delombok src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module pkg { | ||
requires static org.jetbrains.annotations; | ||
requires static lombok; | ||
} |
10 changes: 10 additions & 0 deletions
10
test/manual/multiReleaseJar/src/pkg/MultiReleaseJarTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package pkg; | ||
|
||
import lombok.Getter; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
@Getter | ||
public class MultiReleaseJarTest { | ||
@NotNull | ||
private String test; | ||
} |