-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
14527e8
commit f4f3bd4
Showing
1 changed file
with
26 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
[clojure.tools.build.api :as b] | ||
[deps-deploy.deps-deploy :as dd])) | ||
|
||
(def lib 'metabase/macaw) | ||
(def lib 'io.github.metabase/macaw) | ||
(def github-url "https://github.com/metabase/macaw") | ||
(def scm-url "[email protected]:metabase/macaw.git") | ||
|
||
|
@@ -34,33 +34,6 @@ | |
|
||
(def basis (delay (b/create-basis {:project "deps.edn"}))) | ||
|
||
(defn clean [_] | ||
(b/delete {:path target})) | ||
|
||
(defn compile [_] | ||
(println "\nCompiling Java files...") | ||
(b/javac {:src-dirs ["java"] | ||
:class-dir class-dir | ||
:basis @basis | ||
:javac-opts ["--release" "11"]})) | ||
|
||
(defn jar [_] | ||
(println "\nStarting to build a JAR...") | ||
(compile nil) | ||
(println "\tWriting pom.xml...") | ||
(b/write-pom {:class-dir class-dir | ||
:lib lib | ||
:version version | ||
:basis @basis | ||
:src-dirs ["src"]}) | ||
(println "\tCopying source...") | ||
(b/copy-dir {:src-dirs ["src" "resources"] | ||
:target-dir class-dir}) | ||
(printf "\tBuilding %s...\n" jar-file) | ||
(b/jar {:class-dir class-dir | ||
:jar-file jar-file}) | ||
(println "Done! 🦜")) | ||
|
||
(def pom-template | ||
[[:description "A Clojure wrapper for JSqlParser"] | ||
[:url github-url] | ||
|
@@ -81,12 +54,36 @@ | |
{:lib lib | ||
:version version | ||
:jar-file jar-file | ||
:basis (b/create-basis {}) | ||
:basis @basis | ||
:class-dir class-dir | ||
:target target | ||
:src-dirs ["src" "java"] | ||
:pom-data pom-template}) | ||
|
||
(defn clean [_] | ||
(b/delete {:path target})) | ||
|
||
(defn compile [opts] | ||
(println "\nCompiling Java files...") | ||
(b/javac (merge default-options | ||
opts | ||
{:src-dirs ["java"] | ||
:javac-opts ["--release" "11"]}))) | ||
|
||
(defn jar [opts] | ||
(println "\nStarting to build a JAR...") | ||
(compile nil) | ||
(println "\tWriting pom.xml...") | ||
(b/write-pom (merge default-options opts)) | ||
(println "\tCopying source...") | ||
(b/copy-dir {:src-dirs ["src" "resources"] | ||
:target-dir class-dir}) | ||
(printf "\tBuilding %s...\n" jar-file) | ||
(b/jar {:class-dir class-dir | ||
:jar-file jar-file}) | ||
(println "Done! 🦜")) | ||
|
||
|
||
(defn deploy [opts] | ||
(let [opts (merge default-options opts)] | ||
(printf "Deploying %s...\n" jar-file) | ||
|