Skip to content

Commit 61e9669

Browse files
committed
joobyRun gradle: creates a new build on file change
1 parent fdb994e commit 61e9669

File tree

10 files changed

+5
-5
lines changed

10 files changed

+5
-5
lines changed
File renamed without changes.
File renamed without changes.

modules/jooby-cli/src/main/resources/IntegrationTest.java.hbs renamed to modules/jooby-cli/src/main/resources/cli/IntegrationTest.java.hbs

File renamed without changes.

modules/jooby-cli/src/main/resources/IntegrationTest.kt.hbs renamed to modules/jooby-cli/src/main/resources/cli/IntegrationTest.kt.hbs

File renamed without changes.

modules/jooby-cli/src/main/resources/UnitTest.java.hbs renamed to modules/jooby-cli/src/main/resources/cli/UnitTest.java.hbs

File renamed without changes.

modules/jooby-cli/src/main/resources/UnitTest.kt.hbs renamed to modules/jooby-cli/src/main/resources/cli/UnitTest.kt.hbs

File renamed without changes.

modules/jooby-cli/src/main/resources/conf/application.conf renamed to modules/jooby-cli/src/main/resources/cli/conf/application.conf

File renamed without changes.

modules/jooby-cli/src/main/resources/conf/logback.xml renamed to modules/jooby-cli/src/main/resources/cli/conf/logback.xml

File renamed without changes.
File renamed without changes.

modules/jooby-gradle-plugin/src/main/java/io/jooby/gradle/RunTask.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,18 @@ public void run() throws Throwable {
7676
.forProjectDirectory(current.getRootDir())
7777
.connect();
7878

79-
BuildLauncher compiler = connection.newBuild()
80-
.setStandardError(System.err)
81-
.setStandardOutput(System.out)
82-
.forTasks("classes");
83-
8479
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
8580
joobyRun.shutdown();
8681
connection.close();
8782
}));
8883

8984
BiConsumer<String, Path> onFileChanged = (event, path) -> {
9085
if (config.isCompileExtension(path)) {
86+
BuildLauncher compiler = connection.newBuild()
87+
.setStandardError(System.err)
88+
.setStandardOutput(System.out)
89+
.forTasks("classes");
90+
9191
compiler.run(new ResultHandler<Void>() {
9292
@Override public void onComplete(Void result) {
9393
getLogger().debug("Restarting application on file change: " + path);

0 commit comments

Comments
 (0)