git.fiddlerwoaroof.com
Browse code

chore: make project more self-contained

Ed Langley authored on 02/05/2020 08:52:57
Showing 10 changed files
... ...
@@ -1,2 +1,3 @@
1 1
 *~
2 2
 *.64xfasl
3
+bundle.jar
3 4
new file mode 100644
... ...
@@ -0,0 +1,8 @@
1
+all: bundle.jar jinterface/*.lisp
2
+
3
+bundle.jar: generate-bundle/deps.edn
4
+	clj -Sdeps '{:deps,{uberdeps,{:mvn/version,"0.1.10"}}}' -m uberdeps.uberjar \
5
+		  --deps-file generate-bundle/deps.edn --target ./bundle.jar
6
+
7
+jinterface/*.lisp: generate-ji-definitions.lisp build-ji.lisp bundle.jar
8
+	lw -build build-ji.lisp
0 9
new file mode 100644
... ...
@@ -0,0 +1,13 @@
1
+(require :asdf)
2
+(require "java-interface")
3
+
4
+(mapcar 'asdf:load-asd (directory "*.asd"))
5
+
6
+(load "./init.lisp")
7
+(pushnew :fwoar.gen *features*)
8
+
9
+(load "~/quicklisp/setup.lisp")
10
+(asdf:load-system :fwoar-lisputils)
11
+
12
+(load "packages.lisp")
13
+(load "generate-ji-definitions.lisp")
0 14
new file mode 100644
... ...
@@ -0,0 +1,3 @@
1
+{:deps {org.apache.curator/curator-recipes {:mvn/version "RELEASE",
2
+                                            :exclusions [org.apache.zookeeper/zookeeper]},
3
+        org.apache.zookeeper/zookeeper {:mvn/version "3.4.13"}}}
... ...
@@ -47,7 +47,7 @@
47 47
      :name 'fwoar.lw-curator.ji.al::class
48 48
      :dest "al.lisp")))
49 49
 
50
-#+(or)
50
+#+fwoar.gen
51 51
 (progn
52 52
   (run)
53 53
   (ql:quickload :lw-curator))
... ...
@@ -1,6 +1,5 @@
1
-(in-package :fwoar.lw-curator)
2
-(serapeum:eval-always
1
+(eval-when (:compile-toplevel :load-toplevel :execute)
3 2
   (unless (lw-ji:get-java-virtual-machine)
4 3
     (lw-ji:init-java-interface
5 4
      :jvm-library-path "/Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home/lib/server/libjvm.dylib"
6
-     :java-class-path (namestring (truename "~/curator-test/bundle.jar")))))
5
+     :java-class-path (namestring (asdf:system-relative-pathname :lw-curator "bundle" :type "jar")))))
... ...
@@ -53,9 +53,9 @@
53 53
 (lw-ji:define-java-constructor .new
54 54
                                "java.util.ArrayList"
55 55
                                :signatures
56
-                               ("java.util.ArrayList()"
57
-                                "java.util.ArrayList(java.util.Collection)"
58
-                                "java.util.ArrayList(int)")
56
+                               ("java.util.ArrayList(int)"
57
+                                "java.util.ArrayList()"
58
+                                "java.util.ArrayList(java.util.Collection)")
59 59
                                :class-symbol
60 60
                                nil)
61 61
 (lw-ji:define-java-caller .contains
... ...
@@ -234,8 +234,8 @@
234 234
                           "java/util/ArrayList"
235 235
                           "listIterator"
236 236
                           :signatures
237
-                          ("public java.util.ListIterator listIterator(int)"
238
-                           "public java.util.ListIterator listIterator()"))
237
+                          ("public java.util.ListIterator listIterator()"
238
+                           "public java.util.ListIterator listIterator(int)"))
239 239
 (lw-ji:define-java-caller .sort
240 240
                           "java/util/ArrayList"
241 241
                           "sort"
... ...
@@ -17,8 +17,8 @@
17 17
                                   ".POSTSAFENOTIFY"
18 18
                                   ".DELETE"
19 19
                                   ".RUNSAFE"
20
-                                  ".INTRANSACTION"
21 20
                                   ".GETCHILDREN"
21
+                                  ".INTRANSACTION"
22 22
                                   ".CLEARWATCHERREFERENCES"
23 23
                                   ".CLOSE"
24 24
                                   ".CREATE"
... ...
@@ -98,16 +98,16 @@
98 98
                           "runSafe"
99 99
                           :signatures
100 100
                           ("public abstract java.util.concurrent.CompletableFuture runSafe(java.lang.Runnable)"))
101
-(lw-ji:define-java-caller .intransaction
102
-                          "org/apache/curator/framework/CuratorFramework"
103
-                          "inTransaction"
104
-                          :signatures
105
-                          ("public abstract org.apache.curator.framework.api.transaction.CuratorTransaction inTransaction()"))
106 101
 (lw-ji:define-java-caller .getchildren
107 102
                           "org/apache/curator/framework/CuratorFramework"
108 103
                           "getChildren"
109 104
                           :signatures
110 105
                           ("public abstract org.apache.curator.framework.api.GetChildrenBuilder getChildren()"))
106
+(lw-ji:define-java-caller .intransaction
107
+                          "org/apache/curator/framework/CuratorFramework"
108
+                          "inTransaction"
109
+                          :signatures
110
+                          ("public abstract org.apache.curator.framework.api.transaction.CuratorTransaction inTransaction()"))
111 111
 (lw-ji:define-java-caller .clearwatcherreferences
112 112
                           "org/apache/curator/framework/CuratorFramework"
113 113
                           "clearWatcherReferences"
... ...
@@ -8,6 +8,7 @@
8 8
     :depends-on (#:alexandria
9 9
                  #:uiop
10 10
                  #:serapeum
11
+                 #:data-lens
11 12
                  #:fwoar-lisputils
12 13
                  (:require "java-interface"))
13 14
     :serial t
... ...
@@ -6,3 +6,28 @@
6 6
 (defpackage :fwoar.lw-curator
7 7
   (:use :cl )
8 8
   (:export ))
9
+
10
+(defpackage :fwoar.lw-curator.ji.framework
11
+  (:use :cl)
12
+  (:shadow #:class)
13
+  (:export #:class))
14
+(defpackage :fwoar.lw-curator.ji.cff
15
+  (:use :cl)
16
+  (:shadow #:class)
17
+  (:export #:class))
18
+(defpackage :fwoar.lw-curator.ji.bebr
19
+  (:use :cl)
20
+  (:shadow #:class)
21
+  (:export #:class))
22
+(defpackage :fwoar.lw-curator.ji.gcb
23
+  (:use :cl)
24
+  (:shadow #:class)
25
+  (:export #:class))
26
+(defpackage :fwoar.lw-curator.ji.gdb
27
+  (:use :cl)
28
+  (:shadow #:class)
29
+  (:export #:class))
30
+(defpackage :fwoar.lw-curator.ji.al
31
+  (:use :cl)
32
+  (:shadow #:class)
33
+  (:export #:class))