Skip to content
This repository has been archived by the owner on Jul 16, 2022. It is now read-only.

Commit

Permalink
Define projectorRun gradle task
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
  • Loading branch information
miurahr committed Oct 31, 2021
1 parent ec74968 commit cbc995f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ application {
mainClass.set("io.github.eb4j.ebview.EBViewer")
}

tasks.register<JavaExec>("projectorRun") {
classpath = sourceSets["main"].runtimeClasspath
mainClass.set("io.github.eb4j.ebview.EBViewer")
systemProperty("org.jetbrains.projector.server.enable", "true")
}

application.applicationDistribution.into("") {
from("README.md", "COPYING")
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/github/eb4j/ebview/EBViewer.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ public JFrame getApplicationFrame() {
* @param args command line arguments.
*/
public static void main(final String... args) {
// if (ProjectorServer.isEnabled()) {
if (ProjectorServer.isEnabled()) {
if (!ProjectorLauncher.runProjectorServer()) {
throw new RuntimeException("Fail to start projector server");
}
// }
}
URLProtocolHandler.install();
FlatLightLaf.setup();
File dictionaryDirectory = null;
Expand Down

0 comments on commit cbc995f

Please sign in to comment.