Skip to content

Commit

Permalink
Merge pull request #213 from DecwLK/bump_1.0.1
Browse files Browse the repository at this point in the history
fixes graphlayouter not working in jar; version bump to 1.0.1
  • Loading branch information
DecwLK authored Mar 27, 2024
2 parents edb8b11 + 24a66fb commit 83e5222
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 16 deletions.
44 changes: 28 additions & 16 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import net.ltgt.gradle.errorprone.errorprone
import org.gradle.jvm.tasks.Jar

plugins {
jacoco
id("checkstyle")
id("com.github.johnrengelman.shadow") version "8.1.1"
id("java")
id("application")
id("antlr")
Expand All @@ -14,7 +13,7 @@ plugins {
}

group = "org.gecko"
version = "0.1"
version = "1.0.1"

javafx {
version = "21.0.1"
Expand All @@ -26,6 +25,11 @@ repositories {
}

dependencies {
implementation("org.eclipse.elk:org.eclipse.elk.core:0.8.1")
implementation("org.eclipse.elk:org.eclipse.elk.alg.common:0.8.1")
implementation("org.eclipse.elk:org.eclipse.elk.alg.force:0.8.1")
implementation("org.eclipse.elk:org.eclipse.elk.alg.layered:0.8.1")

implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.16.1")

testImplementation(platform("org.junit:junit-bom:5.9.1"))
Expand All @@ -38,21 +42,18 @@ dependencies {
implementation("org.antlr:antlr4-runtime:4.13.1")
antlr("org.antlr:antlr4:4.13.1")

implementation("org.eclipse.elk:org.eclipse.elk.core:0.8.1")
implementation("org.eclipse.elk:org.eclipse.elk.alg.common:0.8.1")
implementation("org.eclipse.elk:org.eclipse.elk.alg.force:0.8.1")
implementation("org.eclipse.elk:org.eclipse.elk.alg.layered:0.8.1")

runtimeOnly("org.openjfx:javafx-graphics:$javafx.version")
// runtimeOnly("org.openjfx:javafx-graphics:$javafx.version:win")
// runtimeOnly("org.openjfx:javafx-graphics:$javafx.version:linux")
// runtimeOnly("org.openjfx:javafx-graphics:$javafx.version:mac")
}

tasks.withType<JavaCompile>().configureEach {
options.errorprone.disable("SameNameButDifferent")
options.errorprone.disableWarningsInGeneratedCode.set(true)
}

checkstyle {
toolVersion = "10.12.5"
}

val generateGrammarSource by tasks.existing(AntlrTask::class) {
arguments.add("-visitor")
arguments.add("-package")
Expand Down Expand Up @@ -89,8 +90,19 @@ application {
mainClass.set("org.gecko.application.Main")
}

tasks {
shadowJar {
exclude("module-info.class")
}
}
tasks.register<Jar>("uberJar") {
archiveClassifier = "uber"

from(sourceSets.main.get().output)
manifest.attributes["Main-Class"] = "org.gecko.application.Main"

dependsOn(configurations.runtimeClasspath)
from({
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) }
})
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
exclude("META-INF/*.SF")
exclude("META-INF/*.DSA")
exclude("META-INF/*.RSA")
exclude("META-INF/LICENSE")
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
import java.util.ArrayList;
import java.util.List;
import javafx.geometry.Point2D;
import org.eclipse.elk.alg.layered.options.LayeredMetaDataProvider;
import org.eclipse.elk.alg.layered.options.LayeredOptions;
import org.eclipse.elk.core.IGraphLayoutEngine;
import org.eclipse.elk.core.RecursiveGraphLayoutEngine;
import org.eclipse.elk.core.data.LayoutMetaDataService;
import org.eclipse.elk.core.options.CoreOptions;
import org.eclipse.elk.core.util.BasicProgressMonitor;
import org.eclipse.elk.graph.ElkNode;
Expand All @@ -28,6 +30,7 @@ public class Graphlayouter {
public Graphlayouter(GeckoViewModel viewModel) {
this.viewModel = viewModel;
elkGraphCreator = new ELKGraphCreator(viewModel);
LayoutMetaDataService.getInstance().registerLayoutMetaDataProviders(new LayeredMetaDataProvider());
}

public void layout() {
Expand Down

0 comments on commit 83e5222

Please sign in to comment.