;; Debian adjustments for project.clj

(require '[debian.dh-clojure-lein.client :as deb])

(defn dh-clj-adjust-project [project when & _]
  "Drop eastwood plugin and logback-access-common, adjust slingshot coordinates"
  (case when
    :before-plugins
    (-> (project)
        (assoc :local-repo "debian/dh-clojure/tmp/maven-repo")
        (update :plugins deb/del-dep 'jonase/eastwood))
    :after-middleware
    (-> (project)
        (update :dependencies deb/add-dep '[slingshot/slingshot "debian"])
        (update :dependencies deb/del-dep 'io.github.clj-kondo/config-slingshot-slingshot)
        (update :dependencies deb/del-dep 'ch.qos.logback.access/logback-access-common))
    (project)))
