Skip to content

Commit 25c7b84

Browse files
authored
Merge pull request #53 from hacki11/ft-nosplash
nosplash
2 parents fcf4de6 + 4f4c87d commit 25c7b84

File tree

6 files changed

+18
-5
lines changed

6 files changed

+18
-5
lines changed

CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
### Version 3.10.0 - TBD ([javadoc](http://diffplug.github.io/goomph/javadoc/snapshot/), [snapshot](https://oss.sonatype.org/content/repositories/snapshots/com/diffplug/gradle/goomph/))
44

5+
- Added nosplash argument to EclipseApp in order to prevent splash screens during gradle tasks. [(#53)](https://github.com/diffplug/goomph/pull/53)
56
- Added a feature to provide a custom goomph-pde-bootstrap installation. [(#52)](https://github.com/diffplug/goomph/pull/52)
7+
- Fix typo in `GOOMPH_PDE_UPDATE_SITE` property (was accidentally UDPATE). [(#48)](https://github.com/diffplug/goomph/pull/48)
8+
- Old spelling (UDPATE) is still supported for backward-compatibility.
69

710
### Version 3.9.1 - February 2nd 2018 ([javadoc](http://diffplug.github.io/goomph/javadoc/3.9.1/), [jcenter](https://bintray.com/diffplug/opensource/goomph/3.9.1/view))
811

src/main/java/com/diffplug/gradle/eclipserunner/EclipseApp.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ public EclipseApp(String application) {
9696
// this flag disables that behavior, so that it can be used on headless build servers
9797
// https://wiki.eclipse.org/Equinox_Launcher
9898
addArg("-launcher.suppressErrors");
99+
// suppress eclipse splash screen
100+
addArg("nosplash");
99101
addArg("application", application);
100102
}
101103

src/main/java/com/diffplug/gradle/eclipserunner/EquinoxLauncher.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,11 @@ private File getPluginRequireSingle(String name) {
110110
/** Sets the application arguments which will be passed to the runtime. */
111111
public EquinoxLauncher setArgs(List<String> args) {
112112
// Filter --launcher.suppressErrors
113+
// Filter --nosplash
113114
List<String> filteredArgs = args.stream()
114115
.filter(Objects::nonNull)
115116
.filter(arg -> !arg.equals("--launcher.suppressErrors"))
117+
.filter(arg -> !arg.equals("-nosplash"))
116118
.collect(toList());
117119
this.args = ImmutableList.copyOf(filteredArgs);
118120
return this;

src/test/java/com/diffplug/gradle/GoomphCacheLocationInitFromProjectTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public void ensureOverrideWorks() throws IOException {
4040
try (Writer writer = printer.toPrintWriter()) {
4141
gradleRunner().forwardStdOutput(writer).build();
4242
}
43-
String firstLine = buffer.toString().split("\n")[0];
43+
String firstLine = buffer.toString().split(System.getProperty("line.separator"))[0];
4444
Assert.assertEquals("Optional[somewhere]", firstLine);
4545
}
4646
}

src/test/java/com/diffplug/gradle/eclipserunner/EclipseAppTest.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ public void test() {
3030
app.addArg("prop", "a");
3131
app.addArg("prop", "b");
3232
app.addArg("flag");
33-
Assert.assertEquals("--launcher.suppressErrors -application diffplug -prop a,b -flag", Joiner.on(" ").join(app.toArgList()));
34-
Assert.assertEquals("--launcher.suppressErrors\n-application diffplug\n-prop a,b\n-flag\n", app.toString());
33+
Assert.assertEquals("--launcher.suppressErrors -nosplash -application diffplug -prop a,b -flag", Joiner.on(" ").join(app.toArgList()));
34+
Assert.assertEquals("--launcher.suppressErrors\n-nosplash\n-application diffplug\n-prop a,b\n-flag\n", app.toString());
3535
}
3636

3737
@Test
@@ -40,7 +40,7 @@ public void testDoubleAdd() {
4040
app.addArg("flag");
4141
app.addArg("flag");
4242
app.addArg("flag");
43-
Assert.assertEquals("--launcher.suppressErrors -application diffplug -flag", Joiner.on(" ").join(app.toArgList()));
43+
Assert.assertEquals("--launcher.suppressErrors -nosplash -application diffplug -flag", Joiner.on(" ").join(app.toArgList()));
4444
}
4545

4646
@SuppressWarnings("unchecked")
@@ -52,14 +52,15 @@ public void testAnt() {
5252
task.attributes().put("prop", "propvalue");
5353
ant.setTask(task);
5454

55-
Assert.assertEquals("--launcher.suppressErrors -application org.eclipse.ant.core.antRunner -Dkey=value", Joiner.on(" ").join(ant.toArgList()));
55+
Assert.assertEquals("--launcher.suppressErrors -nosplash -application org.eclipse.ant.core.antRunner -Dkey=value", Joiner.on(" ").join(ant.toArgList()));
5656
Assert.assertEquals(StringPrinter.buildStringFromLines(
5757
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><project>",
5858
" <anttask prop=\"propvalue\"/>",
5959
"</project>"), ant.buildXml());
6060
Assert.assertEquals(StringPrinter.buildStringFromLines(
6161
"### ARGS ###",
6262
"--launcher.suppressErrors",
63+
"-nosplash",
6364
"-application org.eclipse.ant.core.antRunner",
6465
"-Dkey=value",
6566
"",

src/test/java/com/diffplug/gradle/p2/P2ModelTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public void testDirectorArgs() {
4040
String actual = testData().directorApp(dest, "profile").completeState();
4141
String expected = StringPrinter.buildStringFromLines(
4242
"--launcher.suppressErrors",
43+
"-nosplash",
4344
"-application org.eclipse.equinox.p2.director",
4445
"-clean",
4546
"-consolelog",
@@ -59,6 +60,7 @@ public void testMirrorAntFile() {
5960
String expected = StringPrinter.buildStringFromLines(
6061
"### ARGS ###",
6162
"--launcher.suppressErrors",
63+
"-nosplash",
6264
"-application org.eclipse.ant.core.antRunner",
6365
"",
6466
"### BUILD.XML ###",
@@ -88,6 +90,7 @@ public void testMirrorAntFileWithSlicingOptions() {
8890
String expected = StringPrinter.buildStringFromLines(
8991
"### ARGS ###",
9092
"--launcher.suppressErrors",
93+
"-nosplash",
9194
"-application org.eclipse.ant.core.antRunner",
9295
"",
9396
"### BUILD.XML ###",
@@ -116,6 +119,7 @@ public void testMirrorAntFileWithAppend() {
116119
String expected = StringPrinter.buildStringFromLines(
117120
"### ARGS ###",
118121
"--launcher.suppressErrors",
122+
"-nosplash",
119123
"-application org.eclipse.ant.core.antRunner",
120124
"",
121125
"### BUILD.XML ###",
@@ -142,6 +146,7 @@ public void testMirrorAntFileWithAppendDefault() {
142146
String expected = StringPrinter.buildStringFromLines(
143147
"### ARGS ###",
144148
"--launcher.suppressErrors",
149+
"-nosplash",
145150
"-application org.eclipse.ant.core.antRunner",
146151
"",
147152
"### BUILD.XML ###",

0 commit comments

Comments
 (0)