Skip to content

Commit

Permalink
make native image build consistent, no manual intervention necessary …
Browse files Browse the repository at this point in the history
…anymore
  • Loading branch information
sbaier committed Mar 18, 2020
1 parent 2870712 commit e8559f1
Show file tree
Hide file tree
Showing 6 changed files with 1,235 additions and 421 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ ext {
bouncycastleVersion='1.62'
nettyVersion = '4.1.37.Final'
gsonVersion = '2.8.6'
substrateVmVersion = '19.2.0'
substrateVmVersion = '19.2.1'
junitJupiterVersion = '5.5.1'
}

Expand Down Expand Up @@ -282,7 +282,7 @@ test {
***************/

graal {
graalVersion '19.2.0.1'
graalVersion '19.2.1'
outputName "${rootProject.name}"
mainClass application.mainClassName
option '-H:+PrintClassInitialization'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,15 @@ public class ShellCommand implements Runnable {

private static boolean exitShell = false;

private final DefaultCLIProperties defaultCLIProperties;
private DefaultCLIProperties defaultCLIProperties;

@SuppressWarnings("NullableProblems")
@CommandLine.Spec
private @NotNull CommandLine.Model.CommandSpec spec;

public ShellCommand() {
}

@Inject
ShellCommand(final @NotNull DefaultCLIProperties defaultCLIProperties) {
this.defaultCLIProperties = defaultCLIProperties;
Expand Down
11 changes: 9 additions & 2 deletions tools/createReflectionJson.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ com.hivemq.cli.commands.shell.ShellExitCommand \
com.hivemq.cli.commands.cli.PublishCommand \
com.hivemq.cli.commands.cli.SubscribeCommand \
com.hivemq.cli.commands.MqttCLICommand \
> reflection.json
> reflection_pico.json

## the methods from the abstract classes in the PublishCommand and SubscribeCommand must be removed!

# Add additional mappings (currently, only HelpCommand for shell mode)
# jq filter from https://stackoverflow.com/questions/42011086/merge-arrays-of-json requires jq >= 1.5
# the methods from the abstract classes in the PublishCommand and SubscribeCommand must be removed,
# the second query in the pipeline does just that (remove methods array for classes that contain the activateDebugMethod method mapping, which is invalid)
jq -s '.[0]=([.[]]|flatten)|.[0]' reflection_pico.json reflection_additional.json \
| jq 'del(.[].methods | select(. != null) | select(.[].name == "activateDebugMode"))' \
> reflection.json
Loading

0 comments on commit e8559f1

Please sign in to comment.