This repository has been archived by the owner on Apr 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 56
/
project.clj
130 lines (106 loc) · 5.96 KB
/
project.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
(defproject sample/sample "0.0.1-SNAPSHOT"
:description "Sample Android project to test lein-droid plugin."
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:global-vars {*warn-on-reflection* true}
:source-paths ["src/clojure" "src"]
:java-source-paths ["src/java"]
:javac-options ["-target" "1.6" "-source" "1.6" "-Xlint:-options"]
:plugins [[lein-droid "0.4.6"]]
:dependencies [[org.clojure-android/clojure "1.7.0-RC1" :use-resources true]
;; [com.google.android.gms/play-services "7.0.0" :extension "aar"]
;; [com.android.support/appcompat-v7 "18.0.0" :extension "aar"]
[neko/neko "4.0.0-alpha5"]]
:profiles {:default [:dev]
:dev
[:android-common :android-user
;; The above profiles can be specified in your profiles.clj and
;; contain machine-specific options such as {:android {:sdk-path
;; "/path/to/sdk"}}. :android-user profile is for global
;; dev-related options like CIDER configuration.
{:dependencies [[org.clojure/tools.nrepl "0.2.10"]]
:target-path "target/debug"
:android {:aot :all-with-unused
;; The namespace of the app package - having a
;; different one for dev and release allows you to
;; install both at the same time.
:rename-manifest-package "test.leindroid.sample.debug"
:manifest-options {:app-name "Android-Clojure (debug)"}
}}]
:release
[:android-common
{:target-path "target/release"
:android { ;; Specify the path to your private keystore and the
;; the alias of the key you want to sign APKs with.
;; :keystore-path "/home/user/.android/private.keystore"
;; :key-alias "mykeyalias"
;; :sigalg "MD5withRSA"
;; You can specify these to avoid entering them for
;; each rebuild, but generally it's a bad idea.
;; :keypass "android"
;; :storepass "android"
:ignore-log-priority [:debug :verbose]
:aot :all
;; This tells lein-droid to build in release mode,
;; disabling debugging and signing the resulting
;; package.
:build-type :release}}]
:lean
[:release
{:dependencies ^:replace [[org.skummet/clojure "1.7.0-r1"]
[neko/neko "4.0.0-alpha5"]]
:exclusions [[org.clojure/clojure]
[org.clojure-android/clojure]]
:jvm-opts ["-Dclojure.compile.ignore-lean-classes=true"]
:global-vars ^:replace {clojure.core/*warn-on-reflection* true}
:android {:use-debug-keystore true
:proguard-execute true
:proguard-conf-path "build/proguard-minify.cfg"
:lean-compile true
:skummet-skip-vars [;; You can list here var names that
;; you want to keep non-lean. E.g.:
;; "#'foo.bar/my-function"
]}}]
;; Here's an example of using different profiles
:trial-version-dev
[:dev ; Inherits from :dev profile
{:android {:rename-manifest-package "my.sample.app.dev.trial"
;; And then some options which might be
;; additional/different source-paths to pull in different
;; code, or a manifest option which configures some aspect
;; of your application.
}}]}
:android {;; Specify the path to the Android SDK directory either here or in
;; :android-common profile in your ~/.lein/profiles.clj file.
;; :sdk-path "/home/user/path/to/android-sdk/"
;; Use this if you don't want to use the latest version of
;; Android Build Tools.
;; :build-tools-version "19.0.3"
;; Specify this if your project is a library.
;; :library true
:dex-opts ["-JXmx4096M" "--incremental"]
;; If you hit the 65k method limit while dexing, uncomment the
;; following lines. Also remove the --incremental option above.
;; :multi-dex true
;; :multi-dex-proguard-conf-path "build/proguard-multi-dex.cfg"
;; Sequence of external jars or class folders to include
;; into project.
;; :external-classes-paths ["path/to/external/jar/file"
;; "path/to/classfiles/"]
;; Sequence of jars, resources from which will be added to
;; application package.
;; :resource-jars-paths ["path/to/resource/jar"]
;; Sequence of native libraries files that will be added
;; to application package.
;; :native-libraries-paths ["path/to/native/library"]
;; Target version affects api used for compilation.
:target-version 18
;; Sequence of namespaces that should not be compiled.
:aot-exclude-ns ["clojure.parallel" "clojure.core.reducers"]
;; This specifies replacements which are inserted into
;; AndroidManifest-template.xml at build time. See Clostache for
;; more advanced substitution syntax. Version name and code are
;; automatically inserted
:manifest-options {:app-name "@string/app_name"}
})