summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-07-02 23:36:30 +0200
committerLinnea Gräf <nea@nea.moe>2025-07-02 23:36:30 +0200
commit1eae252f41eab7612864fb479263dc93310d8930 (patch)
treeb10172d42668cb8b5199565c0e2eee4ac3e9c5c3 /protocols
downloadmossbar-1eae252f41eab7612864fb479263dc93310d8930.tar.gz
mossbar-1eae252f41eab7612864fb479263dc93310d8930.tar.bz2
mossbar-1eae252f41eab7612864fb479263dc93310d8930.zip
init
Diffstat (limited to 'protocols')
-rw-r--r--protocols/build.gradle.kts64
-rw-r--r--protocols/src/main/java/org/freedesktop/wayland/package-info.java22
2 files changed, 86 insertions, 0 deletions
diff --git a/protocols/build.gradle.kts b/protocols/build.gradle.kts
new file mode 100644
index 0000000..37d3966
--- /dev/null
+++ b/protocols/build.gradle.kts
@@ -0,0 +1,64 @@
+plugins {
+ id("mossbar.downloads")
+ `java-library`
+}
+
+dependencies {
+ annotationProcessor("org.freedesktop.wayland:wayland-scanner:2.0.0-nea-SNAPSHOT")
+ api("org.freedesktop.wayland:stubs-client:2.0.0-nea-SNAPSHOT")
+ implementation("com.github.spotbugs:spotbugs-annotations:4.9.3")
+}
+
+fun DownloadZipFile.GitLabSource.freeDesktopOrg() {
+ domain.set("gitlab.freedesktop.org")
+}
+
+val waylandCoreProtocols = downloads.zip("waylandCore") {
+ gitlab {
+ freeDesktopOrg()
+ owner.set("wayland")
+ project.set("wayland")
+ hash.set("1.23.91")
+ }
+ subDirectory.set("protocol/")
+}
+
+val wlrootsProtocols = downloads.zip("wlroots") {
+ gitlab {
+ freeDesktopOrg()
+ owner.set("wlroots")
+ project.set("wlr-protocols")
+ hash.set("a5028afbe4a1cf0daf020c4104c1565a09d6e58a")
+ }
+}
+
+val waylandProtocols = downloads.zip("waylandExtra") {
+ gitlab {
+ freeDesktopOrg()
+ owner.set("wayland")
+ project.set("wayland-protocols")
+ hash.set("1.44")
+ }
+}
+
+val allProtocols = tasks.register("allProtocols", Copy::class) {
+ from(waylandProtocols) {
+ into("extra")
+ }
+ from(waylandCoreProtocols) {
+ into("core")
+ }
+ from(wlrootsProtocols) {
+ into("wlr")
+ }
+ into(layout.buildDirectory.dir("allProtocols"))
+}
+
+tasks.compileJava {
+ dependsOn(allProtocols)
+ options.compilerArgs.add(
+ "-Awayland.scanner.protocol.root=${
+ allProtocols.map { it.destinationDir.absolutePath }.get()
+ }"
+ )
+}
diff --git a/protocols/src/main/java/org/freedesktop/wayland/package-info.java b/protocols/src/main/java/org/freedesktop/wayland/package-info.java
new file mode 100644
index 0000000..5202cf6
--- /dev/null
+++ b/protocols/src/main/java/org/freedesktop/wayland/package-info.java
@@ -0,0 +1,22 @@
+
+@WaylandCustomProtocols({
+ @WaylandCustomProtocol(
+ path = "core/wayland.xml",
+ generateServer = false
+ ),
+ @WaylandCustomProtocol(
+ path = "wlr/unstable/wlr-layer-shell-unstable-v1.xml",
+ generateServer = false
+ )
+})
+@WaylandProtocols(
+ pkgConfig = "",
+ path = "extra",
+ generateServer = false,
+ withUnstable = false
+)
+package org.freedesktop.wayland;
+
+import org.freedesktop.wayland.generator.api.WaylandCustomProtocol;
+import org.freedesktop.wayland.generator.api.WaylandCustomProtocols;
+import org.freedesktop.wayland.generator.api.WaylandProtocols; \ No newline at end of file