46 lines
1.3 KiB
Plaintext
46 lines
1.3 KiB
Plaintext
plugins {
|
|
id("inceptum.application")
|
|
id("com.github.johnrengelman.shadow")
|
|
id("jf.manifold")
|
|
}
|
|
|
|
application {
|
|
mainClass.set("io.gitlab.jfronny.inceptum.gtk.GtkMain")
|
|
}
|
|
|
|
repositories {
|
|
mavenLocal()
|
|
maven { url = uri("https://maven.frohnmeyer-wds.de/java-gi") }
|
|
}
|
|
|
|
dependencies {
|
|
implementation("io.github.jwharm.javagi:gtk:4.8.3-0.4")
|
|
implementation("io.github.jwharm.javagi:glib:1.2.10-0.4")
|
|
implementation("io.github.jwharm.javagi:adwaita:1.2.0-0.4")
|
|
implementation(project(":launcher"))
|
|
}
|
|
|
|
tasks.compileJava {
|
|
options.compilerArgs.add("--enable-preview")
|
|
}
|
|
|
|
tasks.runShadow {
|
|
if (project.hasProperty("showcase")) {
|
|
environment("GTK_THEME", "Adwaita")
|
|
environment("GDK_BACKEND", "broadway")
|
|
environment("BROADWAY_DISPLAY", ":5")
|
|
var proc: Process? = null
|
|
doFirst {
|
|
proc = Runtime.getRuntime().exec(arrayOf("gtk4-broadwayd", ":5"))
|
|
Runtime.getRuntime().exec(arrayOf("xdg-open", "http://127.0.0.1:8085"))
|
|
Thread.sleep(1000)
|
|
}
|
|
doLast {
|
|
if (proc != null) Runtime.getRuntime().exec(arrayOf("kill", proc!!.pid().toString()))
|
|
}
|
|
}
|
|
workingDir = rootProject.projectDir
|
|
environment("GTK_DEBUG", "interactive") // interactive:actions
|
|
jvmArgs("--enable-preview", "--enable-native-access=ALL-UNNAMED")
|
|
}
|