Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
}

group 'com.formkiq.gradle'
version '1.7.1'
version '1.7.2'

spotless {
java {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public List<String> apply(final GraalvmNativeExtension extension) {
List<String> args = new ArrayList<>();

if (extension.getBuildOptions() != null) {
String[] split = extension.getBuildOptions().split("-");
String[] split = extension.getBuildOptions().split("\\s-|^-");
for (String s : split) {
if (!s.isEmpty()) {
args.add("-" + s.trim());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,21 @@ void testAllParametersSet() {
assertEquals(expected, args,
"When all properties are set, the resulting argument list must match exactly.");
}

@Test
void testMinusHparameters() {
// given
Project project = ProjectBuilder.builder().build();
ObjectFactory objects = project.getObjects();
GraalvmNativeExtension extension = new GraalvmNativeExtension(objects);
extension.setBuildOptions("-Os -H:-ReduceImplicitExceptionStackTraceInformation");

// when
List<String> args = new GraalvmParameterToStrings().apply(extension);

// then
List<String> expected = List.of("-Os", "-H:-ReduceImplicitExceptionStackTraceInformation",
"--enable-http", "--enable-https");
assertEquals(expected, args);
}
}