play-cljc icon indicating copy to clipboard operation
play-cljc copied to clipboard

leiningen support?

Open qlanduril opened this issue 2 years ago • 2 comments

can we create a new project with leiningen?

qlanduril avatar Aug 05 '23 11:08 qlanduril

After making a project with the template, you can change the project.clj to look something like this:

(defproject my-awesome-game "0.1.0-SNAPSHOT"
  :repositories [["clojars" {:url "https://clojars.org/repo"
                             :sign-releases false}]]
  :clean-targets ^{:protect false} ["target"]
  :dependencies [[org.clojure/clojure "1.11.1"]
                 [play-cljc "0.9.6"]
                 [org.lwjgl/lwjgl "3.3.1"]
                 [org.lwjgl/lwjgl-glfw "3.3.1"]
                 [org.lwjgl/lwjgl-opengl "3.3.1"]
                 [org.lwjgl/lwjgl-stb "3.3.1"]
                 [org.lwjgl/lwjgl "3.3.1" :classifier "natives-linux"]
                 [org.lwjgl/lwjgl-glfw "3.3.1" :classifier "natives-linux"]
                 [org.lwjgl/lwjgl-opengl "3.3.1" :classifier "natives-linux"]
                 [org.lwjgl/lwjgl-stb "3.3.1" :classifier "natives-linux"]
                 [org.lwjgl/lwjgl "3.3.1" :classifier "natives-macos"]
                 [org.lwjgl/lwjgl-glfw "3.3.1" :classifier "natives-macos"]
                 [org.lwjgl/lwjgl-opengl "3.3.1" :classifier "natives-macos"]
                 [org.lwjgl/lwjgl-stb "3.3.1" :classifier "natives-macos"]
                 [org.lwjgl/lwjgl "3.3.1" :classifier "natives-macos-arm64"]
                 [org.lwjgl/lwjgl-glfw "3.3.1" :classifier "natives-macos-arm64"]
                 [org.lwjgl/lwjgl-opengl "3.3.1" :classifier "natives-macos-arm64"]
                 [org.lwjgl/lwjgl-stb "3.3.1" :classifier "natives-macos-arm64"]
                 [org.lwjgl/lwjgl "3.3.1" :classifier "natives-windows"]
                 [org.lwjgl/lwjgl-glfw "3.3.1" :classifier "natives-windows"]
                 [org.lwjgl/lwjgl-opengl "3.3.1" :classifier "natives-windows"]
                 [org.lwjgl/lwjgl-stb "3.3.1" :classifier "natives-windows"]]
  :jvm-opts ~(if (= "Mac OS X" (System/getProperty "os.name"))
               ["-XstartOnFirstThread"]
               [])
  :main my-awesome-game.start
  :aot [my-awesome-game.start])

oakes avatar Aug 06 '23 10:08 oakes

I just updated the template so it generates the project.clj this way now.

oakes avatar Aug 06 '23 14:08 oakes