Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add Clojure SDK build and publish docs

Add sdk/clojure/build.clj for building/installing/deploying the
Clojure SDK. Update deps.edn to add tools.build and deps-deploy and
set the build ns. Update README examples to use org.clojars.tsiry
coordinates, add Clojars publish instructions, and change the local
run hint to 'rockbox start'

+77 -6
+22 -5
sdk/clojure/README.md
··· 46 46 `deps.edn`: 47 47 48 48 ```clojure 49 - {:deps {com.rockbox/rockbox-clj {:git/url "https://github.com/tsirysndr/rockbox-zig" 50 - :git/sha "..." 51 - :deps/root "sdk/clojure"}}} 49 + {:deps {org.clojars.tsiry/rockbox-clj {:git/url "https://github.com/tsirysndr/rockbox-zig" 50 + :git/sha "..." 51 + :deps/root "sdk/clojure"}}} 52 52 ``` 53 53 54 54 Or pin via local path while developing: 55 55 56 56 ```clojure 57 - {:deps {com.rockbox/rockbox-clj {:local/root "/path/to/rockbox-zig/sdk/clojure"}}} 57 + {:deps {org.clojars.tsiry/rockbox-clj {:local/root "/path/to/rockbox-zig/sdk/clojure"}}} 58 + ``` 59 + 60 + ### Publishing to Clojars (maintainers) 61 + 62 + ```sh 63 + cd sdk/clojure 64 + 65 + # Bump version, then build the JAR 66 + VERSION=0.1.0 clojure -T:build jar 67 + 68 + # Install to local ~/.m2 for testing 69 + VERSION=0.1.0 clojure -T:build install 70 + 71 + # Deploy to Clojars (set creds first) 72 + export CLOJARS_USERNAME=tsiry 73 + export CLOJARS_PASSWORD=<deploy-token> 74 + VERSION=0.1.0 clojure -T:build deploy 58 75 ``` 59 76 60 77 `rockboxd` must be running and reachable. By default the SDK connects to 61 78 `http://localhost:6062/graphql`. Start it with: 62 79 63 80 ```sh 64 - ./zig/zig-out/bin/rockboxd 81 + rockbox start 65 82 ``` 66 83 67 84 ---
+49
sdk/clojure/build.clj
··· 1 + (ns build 2 + (:require [clojure.tools.build.api :as b] 3 + [deps-deploy.deps-deploy :as dd])) 4 + 5 + (def lib 'org.clojars.tsiry/rockbox-clj) 6 + (def version (or (System/getenv "VERSION") "0.1.0")) 7 + (def class-dir "target/classes") 8 + (def basis (delay (b/create-basis {:project "deps.edn"}))) 9 + (def jar-file (format "target/%s-%s.jar" (name lib) version)) 10 + 11 + (defn clean [_] 12 + (b/delete {:path "target"})) 13 + 14 + (defn jar [_] 15 + (b/write-pom {:class-dir class-dir 16 + :lib lib 17 + :version version 18 + :basis @basis 19 + :src-dirs ["src"] 20 + :scm {:url "https://github.com/tsirysndr/rockbox-zig" 21 + :connection "scm:git:git://github.com/tsirysndr/rockbox-zig.git" 22 + :developerConnection "scm:git:ssh://git@github.com/tsirysndr/rockbox-zig.git" 23 + :tag (str "v" version)} 24 + :pom-data [[:description "Idiomatic Clojure SDK for Rockbox — GraphQL client with WebSocket subscriptions and a tiny plugin system."] 25 + [:url "https://github.com/tsirysndr/rockbox-zig"] 26 + [:licenses 27 + [:license 28 + [:name "MIT License"] 29 + [:url "https://opensource.org/licenses/MIT"]]]]}) 30 + (b/copy-dir {:src-dirs ["src"] 31 + :target-dir class-dir}) 32 + (b/jar {:class-dir class-dir 33 + :jar-file jar-file})) 34 + 35 + (defn install [_] 36 + (clean nil) 37 + (jar nil) 38 + (b/install {:basis @basis 39 + :lib lib 40 + :version version 41 + :jar-file jar-file 42 + :class-dir class-dir})) 43 + 44 + (defn deploy [_] 45 + (clean nil) 46 + (jar nil) 47 + (dd/deploy {:installer :remote 48 + :artifact (b/resolve-path jar-file) 49 + :pom-file (b/pom-path {:lib lib :class-dir class-dir})}))
+6 -1
sdk/clojure/deps.edn
··· 16 16 17 17 :check 18 18 {:main-opts ["-e" 19 - "(require '[rockbox.core] '[rockbox.playback] '[rockbox.library] '[rockbox.playlist] '[rockbox.saved-playlists] '[rockbox.smart-playlists] '[rockbox.sound] '[rockbox.settings] '[rockbox.system] '[rockbox.browse] '[rockbox.devices] '[rockbox.bluetooth] '[rockbox.events] '[rockbox.plugin] '[rockbox.transport] '[rockbox.ws] '[rockbox.types]) (println :ok)"]}}} 19 + "(require '[rockbox.core] '[rockbox.playback] '[rockbox.library] '[rockbox.playlist] '[rockbox.saved-playlists] '[rockbox.smart-playlists] '[rockbox.sound] '[rockbox.settings] '[rockbox.system] '[rockbox.browse] '[rockbox.devices] '[rockbox.bluetooth] '[rockbox.events] '[rockbox.plugin] '[rockbox.transport] '[rockbox.ws] '[rockbox.types]) (println :ok)"]} 20 + 21 + :build 22 + {:deps {io.github.clojure/tools.build {:mvn/version "0.10.5"} 23 + slipset/deps-deploy {:mvn/version "0.2.2"}} 24 + :ns-default build}}}