-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12911 from aloubyansky/common-dev-mode-runner
Common dev mode launcher API for Maven and Gradle
- Loading branch information
Showing
8 changed files
with
890 additions
and
604 deletions.
There are no files selected for viewing
454 changes: 454 additions & 0 deletions
454
core/deployment/src/main/java/io/quarkus/deployment/dev/QuarkusDevModeLauncher.java
Large diffs are not rendered by default.
Oops, something went wrong.
44 changes: 44 additions & 0 deletions
44
devtools/gradle/src/main/java/io/quarkus/gradle/tasks/GradleDevModeLauncher.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,44 @@ | ||
package io.quarkus.gradle.tasks; | ||
|
||
import org.gradle.api.logging.Logger; | ||
|
||
import io.quarkus.deployment.dev.QuarkusDevModeLauncher; | ||
|
||
public class GradleDevModeLauncher extends QuarkusDevModeLauncher { | ||
|
||
public static Builder builder(Logger logger) { | ||
return new GradleDevModeLauncher(logger).new Builder(); | ||
} | ||
|
||
public class Builder extends QuarkusDevModeLauncher.Builder<GradleDevModeLauncher, Builder> { | ||
|
||
private Builder() { | ||
} | ||
} | ||
|
||
private final Logger logger; | ||
|
||
private GradleDevModeLauncher(Logger logger) { | ||
this.logger = logger; | ||
} | ||
|
||
@Override | ||
protected boolean isDebugEnabled() { | ||
return logger.isDebugEnabled(); | ||
} | ||
|
||
@Override | ||
protected void debug(Object msg) { | ||
logger.warn(msg == null ? "null" : msg.toString()); | ||
} | ||
|
||
@Override | ||
protected void error(Object msg) { | ||
logger.error(msg == null ? "null" : msg.toString()); | ||
} | ||
|
||
@Override | ||
protected void warn(Object msg) { | ||
logger.warn(msg == null ? "null" : msg.toString()); | ||
} | ||
} |
291 changes: 92 additions & 199 deletions
291
devtools/gradle/src/main/java/io/quarkus/gradle/tasks/QuarkusDev.java
Large diffs are not rendered by default.
Oops, something went wrong.
9 changes: 2 additions & 7 deletions
9
devtools/gradle/src/main/java/io/quarkus/gradle/tasks/QuarkusRemoteDev.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 |
---|---|---|
@@ -1,17 +1,12 @@ | ||
package io.quarkus.gradle.tasks; | ||
|
||
import io.quarkus.bootstrap.app.QuarkusBootstrap; | ||
import io.quarkus.deployment.dev.DevModeContext; | ||
import io.quarkus.deployment.dev.IsolatedRemoteDevModeMain; | ||
|
||
public class QuarkusRemoteDev extends QuarkusDev { | ||
|
||
public QuarkusRemoteDev() { | ||
super("Remote development mode: enables hot deployment on remote JVM with background compilation"); | ||
} | ||
|
||
protected void modifyDevModeContext(DevModeContext devModeContext) { | ||
devModeContext.setMode(QuarkusBootstrap.Mode.PROD); | ||
devModeContext.setAlternateEntryPoint(IsolatedRemoteDevModeMain.class.getName()); | ||
protected void modifyDevModeContext(GradleDevModeLauncher.Builder builder) { | ||
builder.remoteDev(true); | ||
} | ||
} |
Oops, something went wrong.