Permalink
Browse files

Set up module split

Modeled after reitit.
  • Loading branch information...
miikka committed Apr 25, 2018
1 parent d0b4c15 commit 6bed625e96e5bfcb0835ff3d3b457baa7b343fa9
@@ -1,4 +1,4 @@
/target
target
/classes
/checkouts
pom.xml
@@ -13,4 +13,4 @@ bower_components
*.log
/kekkonen.iml
/.idea
.classpath
.classpath
@@ -0,0 +1,21 @@
(defproject metosin/kekkonen-core "0.5.0-SNAPSHOT"
:description "A lightweight, remote api library for Clojure."
:url "https://github.com/metosin/kekkonen"
:license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"}
:plugins [[lein-parent "0.3.4"]]
:parent-project {:path "../../project.clj"
:inherit [:deploy-repositories :managed-dependencies]}
:dependencies [[prismatic/plumbing]
[prismatic/schema]
[frankiesardo/linked]

;; http-stuff, separate module?
[metosin/ring-swagger]
[metosin/ring-swagger-ui]
[metosin/ring-http-response]
[ring-middleware-format]
[metosin/muuntaja]
[ring/ring-defaults]

;; client stuff, separate module?
[clj-http]])
@@ -0,0 +1,8 @@
(defproject metosin/kekkonen "0.5.0-SNAPSHOT"
:description "A lightweight, remote api library for Clojure."
:url "https://github.com/metosin/kekkonen"
:license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"}
:plugins [[lein-parent "0.3.4"]]
:parent-project {:path "../../project.clj"
:inherit [:deploy-repositories :managed-dependencies]}
:dependencies [[metosin/kekkonen-core]])
@@ -1,33 +1,37 @@
(defproject metosin/kekkonen "0.4.1-SNAPSHOT"
(defproject metosin/kekkonen-parent "0.5.0-SNAPSHOT"
:description "A lightweight, remote api library for Clojure."
:url "https://github.com/metosin/kekkonen"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"
:distribution :repo
:comments "same as Clojure"}
:dependencies [[prismatic/plumbing "0.5.4"]
[prismatic/schema "1.1.6"]
[frankiesardo/linked "1.2.9"]
:url "http://www.eclipse.org/legal/epl-v10.html"}

;; http-stuff, separate module?
[metosin/ring-swagger "0.24.0"]
[metosin/ring-swagger-ui "2.2.10"]
[metosin/ring-http-response "0.9.0"]
[ring-middleware-format "0.7.2"]
[metosin/muuntaja "0.3.1"]
[ring/ring-defaults "0.3.0"]
:managed-dependencies [[metosin/kekkonen "0.5.0-SNAPSHOT"]
[metosin/kekkonen-core "0.5.0-SNAPSHOT"]

;; client stuff, separate module?
[clj-http "2.3.0"]]
[prismatic/plumbing "0.5.4"]
[prismatic/schema "1.1.6"]
[frankiesardo/linked "1.2.9"]

;; http-stuff, separate module?
[metosin/ring-swagger "0.24.0"]
[metosin/ring-swagger-ui "2.2.10"]
[metosin/ring-http-response "0.9.0"]
[ring-middleware-format "0.7.2"]
[metosin/muuntaja "0.3.1"]
[ring/ring-defaults "0.3.0"]

;; client stuff, separate module?
[clj-http "2.3.0"]]
:profiles {:dev {:plugins [[lein-cloverage "1.0.10"]
[lein-midje "3.2.1"]]
:source-paths ["dev-src" "src"]
:dependencies [[org.clojure/clojure "1.8.0"]
:source-paths ["dev-src" "modules/kekkonen-core/src"]
:dependencies [[metosin/kekkonen]

[org.clojure/clojure "1.9.0"]
[criterium "0.4.4"]
[http-kit "2.2.0"]
; uploads
[javax.servlet/servlet-api "2.5"]
[midje "1.8.3"]]}
[midje "1.9.1"]]}
:perf {:jvm-opts ^:replace ["-Dclojure.compiler.direct-linking=true"]}
:1.7 {:dependencies [[org.clojure/clojure "1.7.0"]]}}
:deploy-repositories [["releases" :clojars]]
@@ -0,0 +1,8 @@
#!/bin/bash

set -e

# Modules
for ext in kekkonen-core kekkonen; do
cd modules/$ext; lein "$@"; cd ../..;
done
@@ -0,0 +1,8 @@
#!/bin/zsh

ext="sedbak$$"

find . -name project.clj -exec sed -i.$ext "s/\[metosin\/kekkonen\(.*\) \".*\"\]/[metosin\/kekkonen\1 \"$1\"\]/g" '{}' \;
find . -name project.clj -exec sed -i.$ext "s/defproject metosin\/kekkonen\(.*\) \".*\"/defproject metosin\/kekkonen\1 \"$1\"/g" '{}' \;
sed -i.$ext "s/\[metosin\/kekkonen\(.*\) \".*\"\]/[metosin\/kekkonen\1 \"$1\"\]/g" **/*.md
find . -name "*.$ext" -exec rm '{}' \;

0 comments on commit 6bed625

Please sign in to comment.