gradle.scm
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu> |
3 | ;;; |
4 | ;;; This file is part of GNU Guix. |
5 | ;;; |
6 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
7 | ;;; under the terms of the GNU General Public License as published by |
8 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
9 | ;;; your option) any later version. |
10 | ;;; |
11 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
12 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | ;;; GNU General Public License for more details. |
15 | ;;; |
16 | ;;; You should have received a copy of the GNU General Public License |
17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
18 | |
19 | (define-module (more packages gradle) |
20 | #:use-module ((guix licenses) #:prefix license:) |
21 | #:use-module (gnu packages) |
22 | #:use-module (guix packages) |
23 | #:use-module (guix download) |
24 | #:use-module (guix utils) |
25 | #:use-module (guix build-system ant) |
26 | #:use-module (guix build-system trivial) |
27 | #:use-module (gnu packages bash) |
28 | #:use-module (gnu packages java) |
29 | #:use-module (more packages groovy) |
30 | #:use-module (more packages java) |
31 | #:use-module (more packages maven)) |
32 | |
33 | ;; Gradle requires guava@17. |
34 | ;; TODO: patch gradle to support at least guava@20 and send it upstream. |
35 | (define-public java-guava-for-gradle |
36 | (package |
37 | (inherit java-guava) |
38 | (version "17.0") |
39 | (source (origin |
40 | (method url-fetch) |
41 | (uri (string-append "https://github.com/google/guava/" |
42 | "archive/v" version ".tar.gz")) |
43 | (sha256 |
44 | (base32 |
45 | "0kg2n0dfdncbm3kgf8fa6kig8djfhar24vf0yf287x27w5sqzhnb")))) |
46 | (arguments |
47 | `(#:jar-name "guava.jar" |
48 | #:source-dir "guava/src/" |
49 | #:tests? #f)))); Not in a "java" subdirectory |
50 | |
51 | (define (gradle-subproject subproject projects runtime) |
52 | "Gradle is made of a lot of subprojects. Each subproject can be compiled in |
53 | a certain order and in the same way. |
54 | |
55 | This procedure builds the java source of @code{subproject}. |
56 | |
57 | Each subproject contains at least a text file, gradle-*-classpath.properties |
58 | that contain dependency information. This file is created using the |
59 | @code{projects} and @code{runtime} parameters." |
60 | (package |
61 | (name (string-append "gradle-" subproject)) |
62 | (version "4.4.0") |
63 | (source (origin |
64 | (method url-fetch) |
65 | (uri (string-append "https://github.com/gradle/gradle/archive/v" |
66 | version ".tar.gz")) |
67 | (file-name (string-append "gradle-" version ".tar.gz")) |
68 | (sha256 |
69 | (base32 |
70 | "026232dy578nl8gzj1nfc9r25p8alcwdbwb9b8s3bw4krxmy6saz")) |
71 | (patches |
72 | (search-patches |
73 | "gradle-match-files-witouht-version-number.patch")))) |
74 | (build-system ant-build-system) |
75 | (arguments |
76 | ;; The jar-name must be this exactly: gradle will not find its jar files |
77 | ;; if they are named differently. |
78 | `(#:jar-name (string-append "gradle-" ,subproject "-4.4.jar") |
79 | #:source-dir (string-append "subprojects/" ,subproject "/src/main/java") |
80 | #:jdk ,icedtea-8 |
81 | #:tests? #f;; Ignore tests for now |
82 | #:test-dir (string-append "subprojects/" ,subproject "/src/test") |
83 | #:phases |
84 | (modify-phases %standard-phases |
85 | (add-before 'build 'add-implementation-info |
86 | (lambda _ |
87 | ;; Add implementation information to the MANIFEST.MF file. We can |
88 | ;; substitute this in the manifest phase. |
89 | (substitute* "build.xml" |
90 | (("message=\"") |
91 | (string-append "message=\"Implementation-Title: Gradle" |
92 | "${line.separator}" |
93 | "Implementation-Version: 4.4" |
94 | "${line.separator}"))) |
95 | #t)) |
96 | (add-before 'build 'add-properties |
97 | (lambda* (#:key inputs #:allow-other-keys) |
98 | (mkdir-p "build/classes") |
99 | ;; This file contains dependency information. |
100 | ;; The projects list is a list of gradle-subprojects that this |
101 | ;; subproject depends directly on at runtime. This information |
102 | ;; can be found in the *.gradle file in the subproject's directory. |
103 | ;; |
104 | ;; The runtime list is a list of external projects this subproject |
105 | ;; depends on. This list must be a list of jar files, so we transform |
106 | ;; the project name into a list of jar files the package contains. |
107 | ;; This information can also be found in the *.gradle file of the |
108 | ;; subproject. |
109 | (with-output-to-file (string-append "build/classes/gradle-" |
110 | ,subproject |
111 | "-classpath.properties") |
112 | (lambda _ |
113 | (format #t "projects=~a\nruntime=~a\n" |
114 | (string-join ',projects ",") |
115 | (string-join |
116 | (map basename |
117 | (apply append |
118 | (map (lambda (lib) (find-files (assoc-ref inputs lib) |
119 | ".*.jar")) |
120 | ',runtime))) |
121 | ",")))) |
122 | #t)) |
123 | (add-before 'build 'copy-resources |
124 | (lambda _ |
125 | ;; If the subproject has a resources directory, copy it to the jar |
126 | ;; file. |
127 | (let ((resources (string-append "subprojects/" ,subproject |
128 | "/src/main/resources"))) |
129 | (if (file-exists? resources) |
130 | (copy-recursively resources "build/classes")))))))) |
131 | (inputs '()) |
132 | (native-inputs '()) |
133 | (home-page "") |
134 | (synopsis "Build system") |
135 | (description "Build system") |
136 | (license license:asl2.0))) |
137 | |
138 | (define (gradle-groovy-subproject subproject projects runtime) |
139 | "This procedure is similar to @code{gradle-groovy-subproject}, but it |
140 | builds a module containing groovy source code." |
141 | (let ((base (gradle-subproject subproject projects runtime))) |
142 | (package |
143 | (inherit base) |
144 | (arguments |
145 | (substitute-keyword-arguments (package-arguments base) |
146 | ((#:source-dir source-dir) |
147 | `(string-append "subprojects/" ,subproject "/src/main/groovy")) |
148 | ((#:phases phases) |
149 | `(modify-phases ,phases |
150 | (add-before 'build 'use-groovy |
151 | (lambda _ |
152 | (substitute* "build.xml" |
153 | ;; Change the compiler to groovyc |
154 | (("javac") "groovyc") |
155 | ;; Make it fork |
156 | (("includeantruntime=\"false\"") |
157 | "includeantruntime=\"false\" fork=\"yes\"") |
158 | ;; groovyc doesn't understand the --classpath argument (bug?) |
159 | (("classpath=\"@refidclasspath\"") |
160 | "classpathref=\"classpath\"") |
161 | ;; To enable joint compilation |
162 | (("classpathref=\"classpath\" />") |
163 | "classpathref=\"classpath\"><javac source=\"1.5\" target=\"1.5\" /></groovyc>") |
164 | ;; Actually create a definition of the groovyc task. |
165 | ;; FIXME: Can't we use groovy-ant for that? |
166 | (("<project basedir=\".\">") |
167 | "<project basedir=\".\"><taskdef name=\"groovyc\" |
168 | classname=\"org.codehaus.groovy.ant.Groovyc\" />")))))))) |
169 | (native-inputs |
170 | `(("groovy" ,groovy) |
171 | ,@(package-inputs groovy)))))) |
172 | |
173 | ;; This gradle plugin is not a subproject, but it is required by buildsrc. |
174 | (define-public gradle-japicmp-plugin |
175 | (package |
176 | (name "gradle-japicmp-plugin") |
177 | (version "0.2.6") |
178 | (source (origin |
179 | (method url-fetch) |
180 | (uri (string-append "https://github.com/melix/japicmp-gradle-plugin/" |
181 | "archive/RELEASE_" |
182 | (string-map (lambda (x) (if (eq? x #\.) #\_ x)) |
183 | version) |
184 | ".tar.gz")) |
185 | (sha256 |
186 | (base32 |
187 | "09frla9a1f33s31di5wcirm50ddhgww8wanlygc8068xnb5ch357")))) |
188 | (build-system ant-build-system) |
189 | (arguments |
190 | `(#:jar-name "gradle-japicmp-plugin.jar" |
191 | #:source-dir "src/main/java" |
192 | #:tests? #f; FIXME: can't compile |
193 | #:jdk ,icedtea-8)) |
194 | (inputs |
195 | `(("gradle-base-services" ,gradle-base-services) |
196 | ("gradle-base-services-groovy" ,gradle-base-services-groovy) |
197 | ("gradle-core" ,gradle-core) |
198 | ("gradle-core-api" ,gradle-core-api) |
199 | ("gradle-logging" ,gradle-logging) |
200 | ("gradle-workers" ,gradle-workers) |
201 | ("groovy-bootstrap" ,groovy-bootstrap) |
202 | ("groovy-templates" ,groovy-templates) |
203 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
204 | ("java-japicmp" ,java-japicmp) |
205 | ("java-javax-inject" ,java-javax-inject) |
206 | ("java-jboss-javassist" ,java-jboss-javassist))) |
207 | (home-page "") |
208 | (synopsis "") |
209 | (description "") |
210 | (license license:asl2.0))) |
211 | |
212 | ;; This package is not meant to be available at runtime: it a build dependency |
213 | ;; only. It contains task definitions used to build submodules. Unfortunately, |
214 | ;; it depends on many subprojects at runtime, and cannot be used without a |
215 | ;; complete gradle. |
216 | (define-public gradle-buildsrc |
217 | (package |
218 | (inherit (gradle-subproject "buildsrc" '() '())) |
219 | (name "gradle-buildsrc") |
220 | (arguments |
221 | `(#:jar-name "gradle-buildsrc.jar" |
222 | #:source-dir "buildSrc/src/main/groovy:buildSrc/src/main/java" |
223 | #:test-dir "buildSrc/src/test" |
224 | #:jdk ,icedtea-8 |
225 | #:tests? #f;; Ignore tests for now |
226 | #:phases |
227 | (modify-phases %standard-phases |
228 | (add-before 'build 'copy-resources |
229 | (lambda _ |
230 | (copy-recursively "buildSrc/src/main/resources" "build/classes") |
231 | #t)) |
232 | (add-before 'build 'remove-deps |
233 | (lambda _ |
234 | ;; Requires asciidoctor, which is implemented with jruby :/ |
235 | (delete-file "buildSrc/src/main/groovy/org/gradle/build/docs/CacheableAsciidoctorTask.groovy") |
236 | ;; Requires http-builder, but it requires old software |
237 | (delete-file "buildSrc/src/main/groovy/org/gradle/testing/DistributedPerformanceTest.groovy") |
238 | #t)) |
239 | (add-before 'build 'remove-jarjar |
240 | (lambda _ |
241 | (substitute* '("buildSrc/src/main/groovy/org/gradle/build/docs/dsl/source/SourceMetaDataVisitor.java" |
242 | "buildSrc/src/main/groovy/org/gradle/build/docs/dsl/source/ExtractDslMetaDataTask.groovy") |
243 | (("groovyjarjarantlr") "antlr")))) |
244 | (add-before 'build 'fixes |
245 | (lambda _ |
246 | (substitute* "buildSrc/src/main/groovy/org/gradle/binarycompatibility/rules/SinceAnnotationMissingRule.java" |
247 | ;; Fix for java8 (cannot convert to String) |
248 | (("Declaration.getName\\(\\)") "Declaration.getName().toString()") |
249 | ;; Fix for guava |
250 | (("getComment\\(\\).getContent\\(\\)") "getComment().get().toString()") |
251 | ;; javaparser is more recent than expected |
252 | (("getVariables\\(\\).get\\(0\\).getId\\(\\).getName\\(\\)") |
253 | "getVariables().get(0).getName().toString()")) |
254 | (substitute* "buildSrc/src/main/groovy/org/gradle/binarycompatibility/rules/AbstractGradleViolationRule.groovy" |
255 | (("it.name.name") "it.name.asString()")) |
256 | #t)) |
257 | (add-before 'build 'use-groovy |
258 | (lambda _ |
259 | (substitute* "build.xml" |
260 | (("javac") "groovyc") |
261 | (("includeantruntime=\"false\"") |
262 | "includeantruntime=\"false\" fork=\"yes\"") |
263 | (("classpath=\"@refidclasspath\"") |
264 | "classpathref=\"classpath\"") |
265 | ;; To enable joint compilation |
266 | (("classpathref=\"classpath\" />") |
267 | "classpathref=\"classpath\"><javac source=\"7\" target=\"7\" /></groovyc>") |
268 | (("<project basedir=\".\">") |
269 | "<project basedir=\".\"><taskdef name=\"groovyc\" |
270 | classname=\"org.codehaus.groovy.ant.Groovyc\" />")) |
271 | #t))))) |
272 | (inputs |
273 | `(("gradle-base-services" ,gradle-base-services) |
274 | ("gradle-base-services-groovy" ,gradle-base-services-groovy) |
275 | ("gradle-core" ,gradle-core) |
276 | ("gradle-core-api" ,gradle-core-api) |
277 | ("gradle-japicmp-plugin" ,gradle-japicmp-plugin) |
278 | ("gradle-logging" ,gradle-logging) |
279 | ("gradle-messaging" ,gradle-messaging) |
280 | ("gradle-model-core" ,gradle-model-core) |
281 | ("gradle-native" ,gradle-native) |
282 | ("gradle-platform-base" ,gradle-platform-base) |
283 | ("gradle-platform-jvm" ,gradle-platform-jvm) |
284 | ("gradle-platform-native" ,gradle-platform-native) |
285 | ("gradle-plugins" ,gradle-plugins) |
286 | ("gradle-process-services" ,gradle-process-services) |
287 | ("gradle-reporting" ,gradle-reporting) |
288 | ("gradle-testing-base" ,gradle-testing-base) |
289 | ("gradle-testing-jvm" ,gradle-testing-jvm) |
290 | ("groovy-xml" ,groovy-xml) |
291 | ("java-commons-lang" ,java-commons-lang) |
292 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
293 | ("java-japicmp" ,java-japicmp) |
294 | ("java-javaparser" ,java-javaparser) |
295 | ("java-javax-inject" ,java-javax-inject) |
296 | ("java-jboss-javassist" ,java-jboss-javassist) |
297 | ("java-jsoup" ,java-jsoup) |
298 | ("java-parboiled" ,java-parboiled) |
299 | ("java-pegdown" ,java-pegdown) |
300 | ("java-slf4j-api" ,java-slf4j-api))) |
301 | (native-inputs |
302 | `(("groovy" ,groovy) |
303 | ,@(package-inputs groovy))))) |
304 | |
305 | (define-public gradle-internal-testing |
306 | (package |
307 | (inherit (gradle-groovy-subproject "internal-testing" '() '())) |
308 | (inputs |
309 | `(("gradle-native" ,gradle-native) |
310 | ("gradle-base-services" ,gradle-base-services) |
311 | ("groovy-xml" ,groovy-xml) |
312 | ("java-commons-io" ,java-commons-io) |
313 | ("java-commons-lang" ,java-commons-lang) |
314 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
315 | ("java-hamcrest-all" ,java-hamcrest-all) |
316 | ("java-jmock" ,java-jmock) |
317 | ("java-jmock-junit4" ,java-jmock-junit4) |
318 | ("java-jmock-legacy" ,java-jmock-legacy) |
319 | ("java-jsoup" ,java-jsoup) |
320 | ("java-junit" ,java-junit) |
321 | ("java-slf4j-api" ,java-slf4j-api) |
322 | ("java-spockframework-core" ,java-spockframework-core))))) |
323 | |
324 | ;; Cycle with internal-testing |
325 | (define-public gradle-base-services |
326 | (let ((base (gradle-subproject |
327 | "base-services" '() |
328 | '("java-guava-for-gradle" "java-slf4j-api" "java-commons-lang" |
329 | "java-commons-io" "java-jsr305" "java-jcip-annotations")))) |
330 | (package |
331 | (inherit base) |
332 | (arguments |
333 | (substitute-keyword-arguments (package-arguments base) |
334 | ((#:phases phases) |
335 | `(modify-phases ,phases |
336 | (add-before 'build 'create-build-receipt |
337 | (lambda _ |
338 | (mkdir-p "build/classes/org/gradle") |
339 | (with-output-to-file "build/classes/org/gradle/build-receipt.properties" |
340 | (lambda _ |
341 | (format #t "baseVersion=4.4 |
342 | commitId=cf7821a6f79f8e2a598df21780e3ff7ce8db2b82 |
343 | buildTimestamp=19710101000000+0000 |
344 | buildTimestampIso=1971-01-01 00\\:00\\:00 UTC |
345 | versionNumber=4.4 |
346 | isSnapshot=false"))) |
347 | #t)))))) |
348 | (inputs |
349 | `(("java-guava-for-gradle" ,java-guava-for-gradle) |
350 | ("java-slf4j-api" ,java-slf4j-api) |
351 | ("java-commons-lang" ,java-commons-lang) |
352 | ("java-commons-io" ,java-commons-io) |
353 | ("java-jsr305" ,java-jsr305) |
354 | ("java-jcip-annotations" ,java-jcip-annotations))) |
355 | (native-inputs |
356 | `(("java-junit" ,java-junit) |
357 | ("java-hamcrest-core" ,java-hamcrest-core)))))) |
358 | |
359 | (define-public gradle-base-services-groovy |
360 | (package |
361 | (inherit (gradle-subproject "base-services-groovy" '("gradle-base-services") |
362 | '("groovy-bootstrap"))) |
363 | (inputs |
364 | `(("gradle-base-services" ,gradle-base-services) |
365 | ("groovy-bootstrap" ,groovy-bootstrap) |
366 | ("java-asm-6" ,java-asm-6) |
367 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
368 | ("java-jsr305" ,java-jsr305))))) |
369 | |
370 | (define-public gradle-build-option |
371 | (package |
372 | (inherit (gradle-subproject "build-option" '("gradle-cli") '())) |
373 | (inputs |
374 | `(("gradle-cli" ,gradle-cli) |
375 | ("java-commons-lang" ,java-commons-lang) |
376 | ("java-jsr305" ,java-jsr305))))) |
377 | |
378 | (define-public gradle-cli |
379 | (package |
380 | (inherit (gradle-subproject "cli" '() '())))) |
381 | |
382 | (define-public gradle-native |
383 | (package |
384 | (inherit (gradle-subproject "native" '("gradle-base-services") |
385 | '("java-native-platform" "java-commons-io" |
386 | "java-slf4j-api" "java-jansi" |
387 | "java-guava-for-gradle"))) |
388 | (inputs |
389 | `(("gradle-base-services" ,gradle-base-services) |
390 | ("java-commons-io" ,java-commons-io) |
391 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
392 | ("java-jansi" ,java-jansi) |
393 | ("java-jsr305" ,java-jsr305) |
394 | ("java-native-platform" ,java-native-platform) |
395 | ("java-slf4j-api" ,java-slf4j-api))))) |
396 | |
397 | (define-public gradle-messaging |
398 | (let ((base (gradle-subproject "messaging" '("gradle-base-services") |
399 | '("java-slf4j-api" "java-kryo" "java-objenesis" |
400 | "java-minlog" "java-reflectasm" "java-asm-6")))) |
401 | (package |
402 | (inherit base) |
403 | (arguments |
404 | (substitute-keyword-arguments (package-arguments base) |
405 | ((#:phases phases) |
406 | `(modify-phases ,phases |
407 | (add-before 'build 'fix-kryo |
408 | (lambda _ |
409 | ;; gradle depends on kryo-2.20 from 2013, we packaged version 4. |
410 | (substitute* "subprojects/messaging/src/main/java/org/gradle/internal/serialize/kryo/KryoBackedEncoder.java" |
411 | (("public int getWritePosition") |
412 | "public long getWritePosition")) |
413 | #t)))))) |
414 | (inputs |
415 | `(("gradle-base-services" ,gradle-base-services) |
416 | ("gradle-base-services-groovy" ,gradle-base-services-groovy) |
417 | ("java-asm-6" ,java-asm-6) |
418 | ("java-commons-lang" ,java-commons-lang) |
419 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
420 | ("java-jsr305" ,java-jsr305) |
421 | ("java-kryo" ,java-kryo) |
422 | ("java-minlog" ,java-minlog) |
423 | ("java-objenesis" ,java-objenesis) |
424 | ("java-reflectasm" ,java-reflectasm) |
425 | ("java-slf4j-api" ,java-slf4j-api)))))) |
426 | |
427 | (define-public gradle-persistent-cache |
428 | (package |
429 | (inherit (gradle-subproject |
430 | "persistent-cache" |
431 | '("gradle-base-services" "gradle-messaging" "gradle-native") |
432 | '("java-jcip-annotations" "java-commons-collections" |
433 | "java-commons-io" "java-commons-lang"))) |
434 | (inputs |
435 | `(("gradle-base-services" ,gradle-base-services) |
436 | ("gradle-messaging" ,gradle-messaging) |
437 | ("gradle-native" ,gradle-native) |
438 | ("java-commons-collections" ,java-commons-collections) |
439 | ("java-commons-io" ,java-commons-io) |
440 | ("java-commons-lang" ,java-commons-lang) |
441 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
442 | ("java-jcip-annotations" ,java-jcip-annotations) |
443 | ("java-jsr305" ,java-jsr305) |
444 | ("java-slf4j-api" ,java-slf4j-api))))) |
445 | |
446 | (define-public gradle-logging |
447 | (package |
448 | (inherit (gradle-subproject |
449 | "logging" |
450 | '("gradle-native" "gradle-base-services" "gradle-messaging" |
451 | "gradle-cli" "gradle-build-option") |
452 | ;; Maybe log4j-over-slf4j and jcl-over-slf4j |
453 | '("java-slf4j-api" "java-jul-to-slf4j" "ant" "java-commons-lang" |
454 | "java-guava-for-gradle" "java-jansi" "java-jansi-native" |
455 | "java-jcip-annotations"))) |
456 | (inputs |
457 | `(("gradle-base-services" ,gradle-base-services) |
458 | ("gradle-build-option" ,gradle-build-option) |
459 | ("gradle-cli" ,gradle-cli) |
460 | ("gradle-messaging" ,gradle-messaging) |
461 | ("gradle-native" ,gradle-native) |
462 | ("java-commons-lang" ,java-commons-lang) |
463 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
464 | ("java-jansi" ,java-jansi) |
465 | ("java-jansi-native" ,java-jansi-native) |
466 | ("java-jcip-annotations" ,java-jcip-annotations) |
467 | ("java-jsr305" ,java-jsr305) |
468 | ("java-slf4j-api" ,java-slf4j-api) |
469 | ("java-jul-to-slf4j" ,java-jul-to-slf4j))))) |
470 | |
471 | (define-public gradle-model-core |
472 | (package |
473 | (inherit (gradle-subproject |
474 | "model-core" |
475 | '("gradle-base-services-groovy" "gradle-base-services") |
476 | '("groovy-bootstrap" "java-slf4j-api" "java-guava-for-gradle" |
477 | "java-jcip-annotations" "java-commons-lang" "java-asm-6"))) |
478 | (inputs |
479 | `(("gradle-base-services" ,gradle-base-services) |
480 | ("gradle-base-services-groovy" ,gradle-base-services-groovy) |
481 | ("groovy-bootstrap" ,groovy-bootstrap) |
482 | ("java-asm-6" ,java-asm-6) |
483 | ("java-commons-lang" ,java-commons-lang) |
484 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
485 | ("java-jcip-annotations" ,java-jcip-annotations) |
486 | ("java-jsr305" ,java-jsr305) |
487 | ("java-slf4j-api" ,java-slf4j-api))))) |
488 | |
489 | (define-public gradle-resources |
490 | (package |
491 | (inherit (gradle-subproject |
492 | "resources" |
493 | '("gradle-base-services" "gradle-messaging" "gradle-native" |
494 | "gradle-model-core") |
495 | '("java-guava-for-gradle" "java-commons-io"))) |
496 | (inputs |
497 | `(("gradle-base-services" ,gradle-base-services) |
498 | ("gradle-model-core" ,gradle-model-core) |
499 | ("gradle-native" ,gradle-native) |
500 | ("java-commons-io" ,java-commons-io) |
501 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
502 | ("java-jsr305" ,java-jsr305))))) |
503 | |
504 | (define-public gradle-build-cache |
505 | (package |
506 | (inherit (gradle-subproject |
507 | "build-cache" |
508 | '("gradle-messaging" "gradle-native" "gradle-persistent-cache" |
509 | "gradle-resources" "gradle-logging" "gradle-base-services") |
510 | '("java-javax-inject" "java-commons-io"))) |
511 | (inputs |
512 | `(("gradle-base-services" ,gradle-base-services) |
513 | ("gradle-logging" ,gradle-logging) |
514 | ("gradle-persistent-cache" ,gradle-persistent-cache) |
515 | ("gradle-resources" ,gradle-resources) |
516 | ("java-commons-io" ,java-commons-io) |
517 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
518 | ("java-javax-inject" ,java-javax-inject) |
519 | ("java-jsr305" ,java-jsr305) |
520 | ("java-slf4j-api" ,java-slf4j-api))))) |
521 | |
522 | (define-public gradle-process-services |
523 | (package |
524 | (inherit (gradle-subproject |
525 | "process-services" |
526 | '("gradle-messaging" "gradle-native" "gradle-base-services") |
527 | '("java-guava-for-gradle" "java-slf4j-api"))) |
528 | (inputs |
529 | `(("gradle-base-services" ,gradle-base-services) |
530 | ("gradle-messaging" ,gradle-messaging) |
531 | ("gradle-native" ,gradle-native) |
532 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
533 | ("java-jsr305" ,java-jsr305) |
534 | ("java-native-platform" ,java-native-platform) |
535 | ("java-slf4j-api" ,java-slf4j-api))))) |
536 | |
537 | (define-public gradle-core-api |
538 | (package |
539 | (inherit (gradle-subproject |
540 | "core-api" |
541 | '("gradle-base-services" "gradle-base-services-groovy" |
542 | "gradle-build-cache" "gradle-logging" "gradle-model-core" |
543 | "gradle-persistent-cache" "gradle-process-services" |
544 | "gradle-resources") |
545 | '("ant" "java-commons-io" "java-commons-lang" |
546 | "java-jcip-annotations"))) |
547 | (inputs |
548 | `(("gradle-base-services" ,gradle-base-services) |
549 | ("gradle-base-services-groovy" ,gradle-base-services-groovy) |
550 | ("gradle-build-cache" ,gradle-build-cache) |
551 | ("gradle-logging" ,gradle-logging) |
552 | ("gradle-model-core" ,gradle-model-core) |
553 | ("gradle-persistent-cache" ,gradle-persistent-cache) |
554 | ("gradle-process-services" ,gradle-process-services) |
555 | ("gradle-resources" ,gradle-resources) |
556 | ("groovy-ant" ,groovy-ant) |
557 | ("groovy-bootstrap" ,groovy-bootstrap) |
558 | ("java-commons-io" ,java-commons-io) |
559 | ("java-commons-lang" ,java-commons-lang) |
560 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
561 | ("java-jcip-annotations" ,java-jcip-annotations) |
562 | ("java-jsr305" ,java-jsr305) |
563 | ("java-slf4j-api" ,java-slf4j-api))))) |
564 | |
565 | (define-public gradle-model-groovy |
566 | (package |
567 | (inherit (gradle-subproject |
568 | "model-groovy" |
569 | '("gradle-base-services-groovy" "gradle-base-services" |
570 | "gradle-model-core") |
571 | '("groovy-bootstrap" "java-jcip-annotations" "java-guava-for-gradle"))) |
572 | (inputs |
573 | `(("gradle-base-services" ,gradle-base-services) |
574 | ("gradle-base-services-groovy" ,gradle-base-services-groovy) |
575 | ("gradle-model-core" ,gradle-model-core) |
576 | ("groovy-bootstrap" ,groovy-bootstrap) |
577 | ("java-asm-6" ,java-asm-6) |
578 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
579 | ("java-jcip-annotations" ,java-jcip-annotations) |
580 | ("java-jsr305" ,java-jsr305))))) |
581 | |
582 | (define-public gradle-jvm-services |
583 | (package |
584 | (inherit (gradle-subproject |
585 | "jvm-services" |
586 | '("gradle-base-services" "gradle-process-services") |
587 | '())) |
588 | (inputs |
589 | `(("gradle-base-services" ,gradle-base-services) |
590 | ("gradle-process-services" ,gradle-process-services))))) |
591 | |
592 | (define-public gradle-core |
593 | (let ((base (gradle-subproject |
594 | "core" |
595 | '("gradle-docs" "gradle-model-groovy" "gradle-base-services" |
596 | "gradle-base-services-groovy" "gradle-messaging" |
597 | "gradle-logging" "gradle-resources" "gradle-cli" |
598 | "gradle-build-option" "gradle-native" "gradle-persistent-cache" |
599 | "gradle-build-cache" "gradle-core-api" "gradle-process-services" |
600 | "gradle-jvm-services" "gradle-model-core") |
601 | '("groovy-ant" "groovy-bootstrap" "groovy-json" "groovy-templates" |
602 | "groovy-xml" "ant" "java-guava-for-gradle" |
603 | "java-javax-inject" "java-asm-6" "java-slf4j-api" |
604 | "java-commons-collections" "java-commons-io" |
605 | "java-commons-lang" "java-jcip-annotations" "java-jaxp" |
606 | "java-native-platform" "java-commons-compress")))) |
607 | (package |
608 | (inherit base) |
609 | (arguments |
610 | (substitute-keyword-arguments (package-arguments base) |
611 | ((#:phases phases) |
612 | `(modify-phases ,phases |
613 | (add-before 'build 'create-properties |
614 | (lambda _ |
615 | (mkdir-p "build/classes") |
616 | (with-directory-excursion "build/classes" |
617 | (with-output-to-file "gradle-implementation-plugins.properties" |
618 | (lambda _ |
619 | (format #t "plugins=gradle-tooling-api-builders"))) |
620 | (with-output-to-file "gradle-plugins.properties" |
621 | (lambda _ |
622 | (format #t (string-append |
623 | "plugins=gradle-announce,gradle-antlr," |
624 | "gradle-build-cache-http,gradle-build-comparison," |
625 | "gradle-build-init,gradle-code-quality," |
626 | "gradle-composite-builds,gradle-diagnostics," |
627 | "gradle-ear,gradle-ide,gradle-ide-native," |
628 | "gradle-ide-play,gradle-ivy,gradle-jacoco," |
629 | "gradle-javascript,gradle-language-groovy," |
630 | "gradle-language-java,gradle-language-jvm," |
631 | "gradle-language-native,gradle-language-scala," |
632 | "gradle-maven,gradle-osgi,gradle-platform-base," |
633 | "gradle-platform-jvm,gradle-platform-native," |
634 | "gradle-platform-play,gradle-plugin-development," |
635 | "gradle-plugin-use,gradle-plugins,gradle-publish," |
636 | "gradle-reporting,gradle-resources-gcs," |
637 | "gradle-resources-http,gradle-resources-s3," |
638 | "gradle-resources-sftp,gradle-scala," |
639 | "gradle-signing,gradle-testing-base," |
640 | "gradle-testing-jvm,gradle-testing-native," |
641 | "gradle-wrapper")))) |
642 | #t))))))) |
643 | (inputs |
644 | `(("gradle-base-services" ,gradle-base-services) |
645 | ("gradle-base-services-groovy" ,gradle-base-services-groovy) |
646 | ("gradle-build-cache" ,gradle-build-cache) |
647 | ("gradle-build-option" ,gradle-build-option) |
648 | ("gradle-cli" ,gradle-cli) |
649 | ("gradle-core-api" ,gradle-core-api) |
650 | ("gradle-jvm-services" ,gradle-jvm-services) |
651 | ("gradle-logging" ,gradle-logging) |
652 | ("gradle-messaging" ,gradle-messaging) |
653 | ("gradle-model-core" ,gradle-model-core) |
654 | ("gradle-model-groovy" ,gradle-model-groovy) |
655 | ("gradle-native" ,gradle-native) |
656 | ("gradle-persistent-cache" ,gradle-persistent-cache) |
657 | ("gradle-process-services" ,gradle-process-services) |
658 | ("gradle-resources" ,gradle-resources) |
659 | ("groovy-ant" ,groovy-ant) |
660 | ("groovy-bootstrap" ,groovy-bootstrap) |
661 | ("groovy-json" ,groovy-json) |
662 | ("groovy-templates" ,groovy-templates) |
663 | ("groovy-xml" ,groovy-xml) |
664 | ("java-asm-6" ,java-asm-6) |
665 | ("java-commons-collections" ,java-commons-collections) |
666 | ("java-commons-compress" ,java-commons-compress) |
667 | ("java-commons-io" ,java-commons-io) |
668 | ("java-commons-lang" ,java-commons-lang) |
669 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
670 | ("java-javax-inject" ,java-javax-inject) |
671 | ("java-jaxp" ,java-jaxp) |
672 | ("java-jcip-annotations" ,java-jcip-annotations) |
673 | ("java-jsr305" ,java-jsr305) |
674 | ("java-native-platform" ,java-native-platform) |
675 | ("java-slf4j-api" ,java-slf4j-api)))))) |
676 | |
677 | (define-public gradle-wrapper |
678 | (package |
679 | (inherit (gradle-subproject "wrapper" '("gradle-cli") '())) |
680 | (inputs |
681 | `(("gradle-base-services" ,gradle-base-services) |
682 | ("gradle-cli" ,gradle-cli))))) |
683 | |
684 | (define-public gradle-tooling-api |
685 | (package |
686 | (inherit (gradle-subproject |
687 | "tooling-api" |
688 | '("gradle-core" "gradle-messaging" "gradle-wrapper" |
689 | "gradle-base-services") |
690 | '())) |
691 | (inputs |
692 | `(("gradle-base-services" ,gradle-base-services) |
693 | ("gradle-core" ,gradle-core) |
694 | ("gradle-core-api" ,gradle-core-api) |
695 | ("gradle-logging" ,gradle-logging) |
696 | ("gradle-messaging" ,gradle-messaging) |
697 | ("gradle-wrapper" ,gradle-wrapper) |
698 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
699 | ("java-jcip-annotations" ,java-jcip-annotations) |
700 | ("java-jsr305" ,java-jsr305) |
701 | ("java-slf4j-api" ,java-slf4j-api))))) |
702 | |
703 | (define-public gradle-launcher |
704 | (let ((base (gradle-subproject |
705 | "launcher" |
706 | '("gradle-base-services" "gradle-core-api" "gradle-core") |
707 | '("java-asm-6" "java-commons-io" "java-slf4j-api")))) |
708 | (package |
709 | (inherit base) |
710 | (inputs |
711 | `(("gradle-base-services" ,gradle-base-services) |
712 | ("gradle-build-option" ,gradle-build-option) |
713 | ("gradle-cli" ,gradle-cli) |
714 | ("gradle-core" ,gradle-core) |
715 | ("gradle-core-api" ,gradle-core-api) |
716 | ("gradle-jvm-services" ,gradle-jvm-services) |
717 | ("gradle-logging" ,gradle-logging) |
718 | ("gradle-messaging" ,gradle-messaging) |
719 | ("gradle-native" ,gradle-native) |
720 | ("gradle-persistent-cache" ,gradle-persistent-cache) |
721 | ("gradle-process-services" ,gradle-process-services) |
722 | ("gradle-tooling-api" ,gradle-tooling-api) |
723 | ("groovy-bootstrap" ,groovy-bootstrap) |
724 | ("java-asm-6" ,java-asm-6) |
725 | ("java-commons-io" ,java-commons-io) |
726 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
727 | ("java-jcip-annotations" ,java-jcip-annotations) |
728 | ("java-jsr305" ,java-jsr305) |
729 | ("java-slf4j-api" ,java-slf4j-api))) |
730 | (arguments |
731 | `(#:main-class "org.gradle.launcher.GradleMain" |
732 | ,@(substitute-keyword-arguments (package-arguments base) |
733 | ((#:phases phases) |
734 | `(modify-phases ,phases |
735 | (add-before 'build 'add-classpath |
736 | (lambda _ |
737 | (substitute* "build.xml" |
738 | (("message=\"") |
739 | (string-append "message=\"Class-Path: " |
740 | "gradle-base-services-4.4.jar " |
741 | "gradle-core-api-4.4.jar " |
742 | "gradle-core-4.4.jar" |
743 | "${line.separator}"))) |
744 | #t)))))))))) |
745 | |
746 | (define-public gradle-installation-beacon |
747 | (package |
748 | (inherit (gradle-subproject "installation-beacon" '() '())))) |
749 | |
750 | (define-public gradle-workers |
751 | (package |
752 | (inherit (gradle-subproject "workers" '("gradle-core") '("java-jcip-annotations"))) |
753 | (inputs |
754 | `(("gradle-base-services" ,gradle-base-services) |
755 | ("gradle-core" ,gradle-core) |
756 | ("gradle-core-api" ,gradle-core-api) |
757 | ("gradle-logging" ,gradle-logging) |
758 | ("gradle-messaging" ,gradle-messaging) |
759 | ("gradle-native" ,gradle-native) |
760 | ("gradle-process-services" ,gradle-process-services) |
761 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
762 | ("java-javax-inject" ,java-javax-inject) |
763 | ("java-jcip-annotations" ,java-jcip-annotations) |
764 | ("java-jsr305" ,java-jsr305) |
765 | ("java-slf4j-api" ,java-slf4j-api))))) |
766 | |
767 | (define-public gradle-reporting |
768 | (package |
769 | (inherit (gradle-subproject |
770 | "reporting" |
771 | '("gradle-core") |
772 | '("groovy-bootstrap" "java-jatl" "java-commons-lang"))) |
773 | (inputs |
774 | `(("gradle-base-services" ,gradle-base-services) |
775 | ("gradle-base-services-groovy" ,gradle-base-services-groovy) |
776 | ("gradle-core" ,gradle-core) |
777 | ("gradle-core-api" ,gradle-core-api) |
778 | ("gradle-logging" ,gradle-logging) |
779 | ("gradle-model-core" ,gradle-model-core) |
780 | ("groovy-bootstrap" ,groovy-bootstrap) |
781 | ("java-commons-lang" ,java-commons-lang) |
782 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
783 | ("java-jatl" ,java-jatl) |
784 | ("java-javax-inject" ,java-javax-inject))))) |
785 | |
786 | (define-public gradle-resources-http |
787 | (package |
788 | (inherit (gradle-subproject |
789 | "resources-http" |
790 | '("gradle-resources" "gradle-base-services" "gradle-core") |
791 | ;; TODO: jcl-over-slf4j |
792 | '("java-httpcomponents-client" "java-httpcomponents-core" |
793 | "java-commons-codec" "java-jcifs" "java-slf4j-api" |
794 | "java-guava-for-gradle" "java-commons-lang" "java-commons-io" |
795 | "java-nekohtml" "java-xerces" "java-jaxp"))) |
796 | (inputs |
797 | `(("gradle-base-services" ,gradle-base-services) |
798 | ("gradle-core" ,gradle-core) |
799 | ("gradle-core-api" ,gradle-core-api) |
800 | ("gradle-model-core" ,gradle-model-core) |
801 | ("gradle-resources" ,gradle-resources) |
802 | ("java-commons-codec" ,java-commons-codec) |
803 | ("java-commons-io" ,java-commons-io) |
804 | ("java-commons-lang" ,java-commons-lang) |
805 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
806 | ("java-httpcomponents-client" ,java-httpcomponents-client) |
807 | ("java-httpcomponents-core" ,java-httpcomponents-core) |
808 | ("java-jaxp" ,java-jaxp) |
809 | ("java-jcifs" ,java-jcifs) |
810 | ("java-jsr305" ,java-jsr305) |
811 | ("java-nekohtml" ,java-nekohtml) |
812 | ("java-slf4j-api" ,java-slf4j-api) |
813 | ("java-xerces" ,java-xerces))))) |
814 | |
815 | (define-public gradle-dependency-management |
816 | (let ((base (gradle-subproject |
817 | "dependency-management" |
818 | '("gradle-installation-beacon" "gradle-core" "gradle-resources" |
819 | "gradle-version-control" "gradle-resources-http" |
820 | "gradle-runtime-api-info") |
821 | ;; TODO: maven-core aether-connector-wagon aether-util aether-spi |
822 | ;; aether-impl aether-api wagon-http-shared wagon-provider-api |
823 | ;; wagon-http wagon-file maven-aether-provider maven-plugin-api |
824 | ;; maven-repository-metadata maven-artifact maven-moel |
825 | ;; maven-model-builder maven-compat plexus-sec-dispacher |
826 | ;; plexus-cipher plexus-classworlds plexus-container-default |
827 | ;; plexus-component-annotations plexus-interpolation plexus-utils |
828 | ;; maven-settings maven-settings-builder xbean-reflect |
829 | '("java-asm-6" "java-commons-lang" "java-commons-io" |
830 | "java-apache-ivy" "java-slf4j-api" "java-gson" |
831 | "java-jcip-annotations" "java-bouncycastle-bcprov" |
832 | "java-jsch")))) |
833 | (package |
834 | (inherit base) |
835 | (arguments |
836 | (substitute-keyword-arguments (package-arguments base) |
837 | ((#:phases phases) |
838 | `(modify-phases ,phases |
839 | (add-before 'build 'fix |
840 | (lambda _ |
841 | (substitute* "subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/ivyresolve/parser/IvyXmlModuleDescriptorParser.java" |
842 | (("new NamespaceId\\(uri, localName\\)") |
843 | "new NamespaceId(uri, localName).toString()")) |
844 | (substitute* "subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/resolveengine/store/DefaultBinaryStore.java" |
845 | (("offset = encoder") "offset = (int)encoder")) |
846 | #t)))))) |
847 | (inputs |
848 | `(("gradle-base-services" ,gradle-base-services) |
849 | ("gradle-base-services-groovy" ,gradle-base-services-groovy) |
850 | ("gradle-build-cache" ,gradle-build-cache) |
851 | ("gradle-core" ,gradle-core) |
852 | ("gradle-core-api" ,gradle-core-api) |
853 | ("gradle-logging" ,gradle-logging) |
854 | ("gradle-messaging" ,gradle-messaging) |
855 | ("gradle-model-core" ,gradle-model-core) |
856 | ("gradle-native" ,gradle-native) |
857 | ("gradle-persistent-cache" ,gradle-persistent-cache) |
858 | ("gradle-resources" ,gradle-resources) |
859 | ("gradle-resources-http" ,gradle-resources-http) |
860 | ("groovy-bootstrap" ,groovy-bootstrap) |
861 | ("java-apache-ivy" ,java-apache-ivy) |
862 | ("java-asm-6" ,java-asm-6) |
863 | ("java-bouncycastle-bcprov" ,java-bouncycastle-bcprov) |
864 | ("java-commons-io" ,java-commons-io) |
865 | ("java-commons-lang" ,java-commons-lang) |
866 | ("java-gson" ,java-gson) |
867 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
868 | ("java-javax-inject" ,java-javax-inject) |
869 | ("java-jcip-annotations" ,java-jcip-annotations) |
870 | ("java-jsch" ,java-jsch) |
871 | ("java-jsr305" ,java-jsr305) |
872 | ("java-slf4j-api" ,java-slf4j-api) |
873 | ("maven-settings" ,maven-settings) |
874 | ("maven-settings-builder" ,maven-settings-builder)))))) |
875 | |
876 | (define-public gradle-platform-base |
877 | (package |
878 | (inherit (gradle-subproject |
879 | "platform-base" |
880 | '("gradle-core" "gradle-dependency-management" "gradle-workers") |
881 | '("java-commons-collections" "groovy-bootstrap"))) |
882 | (inputs |
883 | `(("gradle-base-services" ,gradle-base-services) |
884 | ("gradle-base-services-groovy" ,gradle-base-services-groovy) |
885 | ("gradle-core" ,gradle-core) |
886 | ("gradle-core-api" ,gradle-core-api) |
887 | ("gradle-dependency-management" ,gradle-dependency-management) |
888 | ("gradle-model-core" ,gradle-model-core) |
889 | ("gradle-workers" ,gradle-workers) |
890 | ("groovy-bootstrap" ,groovy-bootstrap) |
891 | ("java-commons-collections" ,java-commons-collections) |
892 | ("java-commons-lang" ,java-commons-lang) |
893 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
894 | ("java-jsr305" ,java-jsr305))))) |
895 | |
896 | (define-public gradle-testing-base |
897 | (let ((base (gradle-subproject |
898 | "testing-base" |
899 | '("gradle-core" "gradle-reporting" "gradle-platform-base") |
900 | '("java-kryo" "java-objenesis" "java-minlog" "java-reflectasm" |
901 | "java-asm-6")))) |
902 | (package |
903 | (inherit base) |
904 | (arguments |
905 | (substitute-keyword-arguments (package-arguments base) |
906 | ((#:phases phases) |
907 | `(modify-phases ,phases |
908 | (add-before 'build 'fix |
909 | (lambda _ |
910 | (substitute* "subprojects/testing-base/src/main/java/org/gradle/api/internal/tasks/testing/junit/result/TestOutputStore.java" |
911 | (("int total = output") |
912 | "int total = (int)output")) |
913 | #t)))))) |
914 | (inputs |
915 | `(("gradle-base-services" ,gradle-base-services) |
916 | ("gradle-base-services-groovy" ,gradle-base-services-groovy) |
917 | ("gradle-core" ,gradle-core) |
918 | ("gradle-core-api" ,gradle-core-api) |
919 | ("gradle-logging" ,gradle-logging) |
920 | ("gradle-messaging" ,gradle-messaging) |
921 | ("gradle-model-core" ,gradle-model-core) |
922 | ("gradle-platform-base" ,gradle-platform-base) |
923 | ("gradle-process-services" ,gradle-process-services) |
924 | ("gradle-reporting" ,gradle-reporting) |
925 | ("groovy-bootstrap" ,groovy-bootstrap) |
926 | ("java-asm-6" ,java-asm-6) |
927 | ("java-bouncycastle-bcprov" ,java-bouncycastle-bcprov) |
928 | ("java-commons-io" ,java-commons-io) |
929 | ("java-commons-lang" ,java-commons-lang) |
930 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
931 | ("java-javax-inject" ,java-javax-inject) |
932 | ("java-jsr305" ,java-jsr305) |
933 | ("java-kryo" ,java-kryo) |
934 | ("java-minlog" ,java-minlog) |
935 | ("java-objenesis" ,java-objenesis) |
936 | ("java-reflectasm" ,java-reflectasm) |
937 | ("java-slf4j-api" ,java-slf4j-api)))))) |
938 | |
939 | (define-public gradle-diagnostics |
940 | (package |
941 | (inherit (gradle-subproject |
942 | "diagnostics" |
943 | '("gradle-dependency-management" "gradle-base-services-groovy" |
944 | "gradle-core" "gradle-reporting" "gradle-platform-base") |
945 | '("groovy-bootstrap" "groovy-json" "java-guava-for-gradle" "java-jatl" |
946 | "java-commons-lang" "java-commons-collections"))) |
947 | (inputs |
948 | `(("gradle-base-services" ,gradle-base-services) |
949 | ("gradle-base-services-groovy" ,gradle-base-services-groovy) |
950 | ("gradle-core" ,gradle-core) |
951 | ("gradle-core-api" ,gradle-core-api) |
952 | ("gradle-dependency-management" ,gradle-dependency-management) |
953 | ("gradle-logging" ,gradle-logging) |
954 | ("gradle-model-core" ,gradle-model-core) |
955 | ("gradle-platform-base" ,gradle-platform-base) |
956 | ("gradle-reporting" ,gradle-reporting) |
957 | ("groovy-bootstrap" ,groovy-bootstrap) |
958 | ("groovy-json" ,groovy-json) |
959 | ("java-commons-collections" ,java-commons-collections) |
960 | ("java-commons-lang" ,java-commons-lang) |
961 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
962 | ("java-jatl" ,java-jatl) |
963 | ("java-javax-inject" ,java-javax-inject) |
964 | ("java-jsr305" ,java-jsr305) |
965 | ("java-slf4j-api" ,java-slf4j-api))))) |
966 | |
967 | (define-public gradle-platform-jvm |
968 | (package |
969 | (inherit (gradle-subproject |
970 | "platform-jvm" |
971 | '("gradle-platform-base" "gradle-core" "gradle-diagnostics") |
972 | '())) |
973 | (inputs |
974 | `(("gradle-base-services" ,gradle-base-services) |
975 | ("gradle-base-services-groovy" ,gradle-base-services-groovy) |
976 | ("gradle-core" ,gradle-core) |
977 | ("gradle-core-api" ,gradle-core-api) |
978 | ("gradle-dependency-management" ,gradle-dependency-management) |
979 | ("gradle-diagnostics" ,gradle-diagnostics) |
980 | ("gradle-logging" ,gradle-logging) |
981 | ("gradle-model-core" ,gradle-model-core) |
982 | ("gradle-native" ,gradle-native) |
983 | ("gradle-platform-base" ,gradle-platform-base) |
984 | ("gradle-process-services" ,gradle-process-services) |
985 | ("groovy-bootstrap" ,groovy-bootstrap) |
986 | ("java-asm-6" ,java-asm-6) |
987 | ("java-commons-io" ,java-commons-io) |
988 | ("java-commons-lang" ,java-commons-lang) |
989 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
990 | ("java-javax-inject" ,java-javax-inject) |
991 | ("java-jsr305" ,java-jsr305))))) |
992 | |
993 | (define-public gradle-testing-jvm |
994 | (package |
995 | (inherit (gradle-subproject |
996 | "testing-jvm" |
997 | '("gradle-core" "gradle-platform-jvm" "gradle-language-java" |
998 | "gradle-testing-base") |
999 | '("java-junit" "java-bsh" "java-testng" "java-snakeyaml" |
1000 | "java-jcommander" "java-hamcrest-core"))) |
1001 | (inputs |
1002 | `(("gradle-base-services" ,gradle-base-services) |
1003 | ("gradle-base-services-groovy" ,gradle-base-services-groovy) |
1004 | ("gradle-core" ,gradle-core) |
1005 | ("gradle-core-api" ,gradle-core-api) |
1006 | ("gradle-diagnostics" ,gradle-diagnostics) |
1007 | ("gradle-dependency-management" ,gradle-dependency-management) |
1008 | ("gradle-jvm-services" ,gradle-jvm-services) |
1009 | ("gradle-logging" ,gradle-logging) |
1010 | ("gradle-messaging" ,gradle-messaging) |
1011 | ("gradle-model-core" ,gradle-model-core) |
1012 | ("gradle-platform-base" ,gradle-platform-base) |
1013 | ("gradle-platform-jvm" ,gradle-platform-jvm) |
1014 | ("gradle-process-services" ,gradle-process-services) |
1015 | ("gradle-reporting" ,gradle-reporting) |
1016 | ("gradle-testing-base" ,gradle-testing-base) |
1017 | ("groovy-bootstrap" ,groovy-bootstrap) |
1018 | ("groovy-xml" ,groovy-xml) |
1019 | ("java-asm-6" ,java-asm-6) |
1020 | ("java-bsh" ,java-bsh) |
1021 | ("java-commons-io" ,java-commons-io) |
1022 | ("java-commons-lang" ,java-commons-lang) |
1023 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
1024 | ("java-hamcrest-core" ,java-hamcrest-core) |
1025 | ("java-javax-inject" ,java-javax-inject) |
1026 | ("java-jcommander" ,java-jcommander) |
1027 | ("java-junit" ,java-junit) |
1028 | ("java-slf4j-api" ,java-slf4j-api) |
1029 | ("java-snakeyaml" ,java-snakeyaml) |
1030 | ("java-testng" ,java-testng))))) |
1031 | |
1032 | (define-public gradle-platform-native |
1033 | (package |
1034 | (inherit (gradle-subproject |
1035 | "platform-native" |
1036 | '("gradle-core" "gradle-platform-base" "gradle-diagnostics") |
1037 | '("groovy-bootstrap" "java-commons-io"))) |
1038 | (inputs |
1039 | `(("gradle-base-services" ,gradle-base-services) |
1040 | ("gradle-base-services-groovy" ,gradle-base-services-groovy) |
1041 | ("gradle-core" ,gradle-core) |
1042 | ("gradle-core-api" ,gradle-core-api) |
1043 | ("gradle-diagnostics" ,gradle-diagnostics) |
1044 | ("gradle-logging" ,gradle-logging) |
1045 | ("gradle-model-core" ,gradle-model-core) |
1046 | ("gradle-native" ,gradle-native) |
1047 | ("gradle-platform-base" ,gradle-platform-base) |
1048 | ("gradle-process-services" ,gradle-process-services) |
1049 | ("gradle-workers" ,gradle-workers) |
1050 | ("groovy-bootstrap" ,groovy-bootstrap) |
1051 | ("java-commons-io" ,java-commons-io) |
1052 | ("java-commons-lang" ,java-commons-lang) |
1053 | ("java-gson" ,java-gson) |
1054 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
1055 | ("java-javax-inject" ,java-javax-inject) |
1056 | ("java-jsr305" ,java-jsr305) |
1057 | ("java-native-platform" ,java-native-platform) |
1058 | ("java-slf4j-api" ,java-slf4j-api))))) |
1059 | |
1060 | (define-public gradle-composite-builds |
1061 | (package |
1062 | (inherit (gradle-subproject |
1063 | "composite-builds" |
1064 | '("gradle-core" "gradle-dependency-management" "gradle-launcher") |
1065 | '())) |
1066 | (inputs |
1067 | `(("gradle-base-services" ,gradle-base-services) |
1068 | ("gradle-base-services-groovy" ,gradle-base-services-groovy) |
1069 | ("gradle-core" ,gradle-core) |
1070 | ("gradle-core-api" ,gradle-core-api) |
1071 | ("gradle-dependency-management" ,gradle-dependency-management) |
1072 | ("gradle-launcher" ,gradle-launcher) |
1073 | ("gradle-logging" ,gradle-logging) |
1074 | ("gradle-model-core" ,gradle-model-core) |
1075 | ("groovy-bootstrap" ,groovy-bootstrap) |
1076 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
1077 | ("java-javax-inject" ,java-javax-inject) |
1078 | ("java-slf4j-api" ,java-slf4j-api))))) |
1079 | |
1080 | (define-public gradle-language-jvm |
1081 | (package |
1082 | (inherit (gradle-subproject |
1083 | "language-jvm" |
1084 | '("gradle-core" "gradle-platform-jvm" "gradle-platform-base") |
1085 | '())) |
1086 | (inputs |
1087 | `(("gradle-base-services" ,gradle-base-services) |
1088 | ("gradle-base-services-groovy" ,gradle-base-services-groovy) |
1089 | ("gradle-core" ,gradle-core) |
1090 | ("gradle-core-api" ,gradle-core-api) |
1091 | ("gradle-logging" ,gradle-logging) |
1092 | ("gradle-model-core" ,gradle-model-core) |
1093 | ("gradle-platform-base" ,gradle-platform-base) |
1094 | ("gradle-platform-jvm" ,gradle-platform-jvm) |
1095 | ("gradle-process-services" ,gradle-process-services) |
1096 | ("gradle-workers" ,gradle-workers) |
1097 | ("groovy-bootstrap" ,groovy-bootstrap) |
1098 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
1099 | ("java-javax-inject" ,java-javax-inject) |
1100 | ("java-jsr305" ,java-jsr305))))) |
1101 | |
1102 | (define-public gradle-language-java |
1103 | (package |
1104 | (inherit (gradle-subproject |
1105 | "language-java" |
1106 | '("gradle-core" "gradle-platform-jvm" "gradle-language-jvm") |
1107 | '())) |
1108 | (inputs |
1109 | `(("gradle-base-services" ,gradle-base-services) |
1110 | ("gradle-base-services-groovy" ,gradle-base-services-groovy) |
1111 | ("gradle-core" ,gradle-core) |
1112 | ("gradle-core-api" ,gradle-core-api) |
1113 | ("gradle-dependency-management" ,gradle-dependency-management) |
1114 | ("gradle-jvm-services" ,gradle-jvm-services) |
1115 | ("gradle-language-jvm" ,gradle-language-jvm) |
1116 | ("gradle-logging" ,gradle-logging) |
1117 | ("gradle-messaging" ,gradle-messaging) |
1118 | ("gradle-model-core" ,gradle-model-core) |
1119 | ("gradle-persistent-cache" ,gradle-persistent-cache) |
1120 | ("gradle-platform-base" ,gradle-platform-base) |
1121 | ("gradle-platform-jvm" ,gradle-platform-jvm) |
1122 | ("gradle-process-services" ,gradle-process-services) |
1123 | ("gradle-workers" ,gradle-workers) |
1124 | ("groovy-bootstrap" ,groovy-bootstrap) |
1125 | ("java-asm-6" ,java-asm-6) |
1126 | ("java-commons-lang" ,java-commons-lang) |
1127 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
1128 | ("java-javax-inject" ,java-javax-inject) |
1129 | ("java-jsr305" ,java-jsr305) |
1130 | ("java-slf4j-api" ,java-slf4j-api))))) |
1131 | |
1132 | (define-public gradle-language-groovy |
1133 | (package |
1134 | (inherit (gradle-subproject |
1135 | "language-groovy" |
1136 | '("gradle-core" "gradle-platform-jvm" "gradle-language-java") |
1137 | '())) |
1138 | (inputs |
1139 | `(("gradle-base-services" ,gradle-base-services) |
1140 | ("gradle-base-services-groovy" ,gradle-base-services-groovy) |
1141 | ("gradle-core" ,gradle-core) |
1142 | ("gradle-core-api" ,gradle-core-api) |
1143 | ("gradle-language-java" ,gradle-language-java) |
1144 | ("gradle-language-jvm" ,gradle-language-jvm) |
1145 | ("gradle-logging" ,gradle-logging) |
1146 | ("gradle-model-core" ,gradle-model-core) |
1147 | ("gradle-platform-base" ,gradle-platform-base) |
1148 | ("gradle-platform-jvm" ,gradle-platform-jvm) |
1149 | ("gradle-process-services" ,gradle-process-services) |
1150 | ("gradle-workers" ,gradle-workers) |
1151 | ("groovy-bootstrap" ,groovy-bootstrap) |
1152 | ("java-asm-6" ,java-asm-6) |
1153 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
1154 | ("java-javax-inject" ,java-javax-inject) |
1155 | ("java-jsr305" ,java-jsr305) |
1156 | ("java-slf4j-api" ,java-slf4j-api))))) |
1157 | |
1158 | (define-public gradle-plugins |
1159 | (package |
1160 | (inherit (gradle-subproject |
1161 | "plugins" |
1162 | '("gradle-composite-builds" "gradle-core" "gradle-workers" |
1163 | "gradle-dependency-management" "gradle-reporting" |
1164 | "gradle-platform-jvm" "gradle-language-jvm" |
1165 | "gradle-language-java" "gradle-language-groovy" |
1166 | "gradle-diagnostics" "gradle-testing-jvm") |
1167 | '("groovy-bootstrap" "ant" "java-asm-6" "java-commons-io" |
1168 | "java-commons-lang" "java-commons-cli" "java-slf4j-api"))) |
1169 | (inputs |
1170 | `(("gradle-base-services" ,gradle-base-services) |
1171 | ("gradle-base-services-groovy" ,gradle-base-services-groovy) |
1172 | ("gradle-build-cache" ,gradle-build-cache) |
1173 | ("gradle-composite-builds" ,gradle-composite-builds) |
1174 | ("gradle-core" ,gradle-core) |
1175 | ("gradle-core-api" ,gradle-core-api) |
1176 | ("gradle-dependency-management" ,gradle-dependency-management) |
1177 | ("gradle-diagnostics" ,gradle-diagnostics) |
1178 | ("gradle-language-groovy" ,gradle-language-groovy) |
1179 | ("gradle-language-java" ,gradle-language-java) |
1180 | ("gradle-language-jvm" ,gradle-language-jvm) |
1181 | ("gradle-logging" ,gradle-logging) |
1182 | ("gradle-model-core" ,gradle-model-core) |
1183 | ("gradle-persistent-cache" ,gradle-persistent-cache) |
1184 | ("gradle-platform-base" ,gradle-platform-base) |
1185 | ("gradle-platform-jvm" ,gradle-platform-jvm) |
1186 | ("gradle-reporting" ,gradle-reporting) |
1187 | ("gradle-testing-base" ,gradle-testing-base) |
1188 | ("gradle-testing-jvm" ,gradle-testing-jvm) |
1189 | ("gradle-process-services" ,gradle-process-services) |
1190 | ("gradle-workers" ,gradle-workers) |
1191 | ("groovy-ant" ,groovy-ant) |
1192 | ("groovy-bootstrap" ,groovy-bootstrap) |
1193 | ("groovy-templates" ,groovy-templates) |
1194 | ("java-asm-6" ,java-asm-6) |
1195 | ("java-commons-cli" ,java-commons-cli) |
1196 | ("java-commons-io" ,java-commons-io) |
1197 | ("java-commons-lang" ,java-commons-lang) |
1198 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
1199 | ("java-javax-inject" ,java-javax-inject) |
1200 | ("java-jsr305" ,java-jsr305) |
1201 | ("java-slf4j-api" ,java-slf4j-api))))) |
1202 | |
1203 | ;; This package doesn't work. I need to understand how api-mapping.txt and |
1204 | ;; default-imports.txt are generated. Currently they are generated by a custom |
1205 | ;; task defined in buildsrc that is run by gradle, but we don't have enough of |
1206 | ;; gradle to run that. |
1207 | (define-public gradle-docs |
1208 | (let ((base (gradle-subproject "docs" '() '()))) |
1209 | (package |
1210 | (inherit base) |
1211 | (arguments |
1212 | (substitute-keyword-arguments (package-arguments base) |
1213 | ((#:phases phases) |
1214 | `(modify-phases ,phases |
1215 | (replace 'build |
1216 | (lambda _ |
1217 | (substitute* "build.xml" |
1218 | (("compile, ") "")) |
1219 | (with-output-to-file "build/classes/default-imports.txt" |
1220 | (lambda _ |
1221 | (format #t ""))) |
1222 | (with-output-to-file "build/classes/api-mapping.txt" |
1223 | (lambda _ |
1224 | (format #t ""))) |
1225 | (zero? (system* "ant" "jar"))))))))))) |
1226 | |
1227 | ;; Gradle doesn't provide a gradle binary or script, so we provide it instead. |
1228 | ;; Gradle expects that all its modules and dependency jars are located in the |
1229 | ;; same directory. That directory must be called "lib". |
1230 | ;; In this package, we create a script that puts gradle-launcher in the |
1231 | ;; classpath (that's ok because gradle-launcher has a Class-Path declaration in |
1232 | ;; its MANIFEST.MF). This runs the main entry point of gradle that will look |
1233 | ;; for its requirements in that directory. I don't really understand how this |
1234 | ;; is done, since the classpath contains only jar files and not directories, |
1235 | ;; and it seems to look for gradle-installation-beacon, but it's definitely not |
1236 | ;; in the classpath... |
1237 | ;; |
1238 | ;; Currently, gradle can find its modules and start running, but it will fail |
1239 | ;; at reading the api-mapping.txt file from gradle-docs. |
1240 | (define-public gradle |
1241 | (package |
1242 | (inherit gradle-base-services) |
1243 | (name "gradle") |
1244 | (build-system trivial-build-system) |
1245 | (arguments |
1246 | `(#:modules ((guix build utils)) |
1247 | #:builder (begin |
1248 | (use-modules (guix build utils)) |
1249 | (let* ((output (assoc-ref %outputs "out")) |
1250 | (bindir (string-append output "/bin")) |
1251 | (libdir (string-append output "/lib")) |
1252 | (filename (string-append bindir "/gradle")) |
1253 | (dependencies |
1254 | '("gradle-wrapper" |
1255 | "gradle-tooling-api" |
1256 | "gradle-resources" |
1257 | "gradle-process-services" |
1258 | "gradle-persistent-cache" |
1259 | "gradle-native" |
1260 | "gradle-model-groovy" |
1261 | "gradle-model-core" |
1262 | "gradle-messaging" |
1263 | "gradle-logging" |
1264 | "gradle-launcher" |
1265 | "gradle-jvm-services" |
1266 | "gradle-internal-testing" |
1267 | "gradle-installation-beacon" |
1268 | "gradle-docs" |
1269 | "gradle-core-api" |
1270 | "gradle-core" |
1271 | "gradle-cli" |
1272 | "gradle-build-option" |
1273 | "gradle-build-cache" |
1274 | "gradle-base-services-groovy" |
1275 | "gradle-base-services" |
1276 | "groovy-ant" |
1277 | "groovy-bootstrap" |
1278 | "groovy-json" |
1279 | "groovy-templates" |
1280 | "groovy-xml" |
1281 | "java-asm-6" |
1282 | "java-commons-compress" |
1283 | "java-commons-collections" |
1284 | "java-commons-io" |
1285 | "java-commons-lang" |
1286 | "java-guava-for-gradle" |
1287 | "java-jansi" |
1288 | "java-jansi-native" |
1289 | "java-javax-inject" |
1290 | "java-jaxp" |
1291 | "java-jcip-annotations" |
1292 | "java-jsr305" |
1293 | "java-jul-to-slf4j" |
1294 | "java-kryo" |
1295 | "java-minlog" |
1296 | "java-native-platform" |
1297 | "java-objenesis" |
1298 | "java-reflectasm" |
1299 | "java-slf4j-api" |
1300 | "ant"))) |
1301 | (mkdir-p bindir) |
1302 | (mkdir-p (string-append libdir "/plugins")) |
1303 | (with-output-to-file filename |
1304 | (lambda _ |
1305 | (format #t "#!~a\n |
1306 | export GRADLE_HOME=~a\n |
1307 | ~a -cp ~a -Dorg.gradle.appname=gradle org.gradle.launcher.GradleMain $@" |
1308 | (string-append (assoc-ref %build-inputs "bash") |
1309 | "/bin/bash") |
1310 | output |
1311 | (string-append (assoc-ref %build-inputs "icedtea-8") |
1312 | "/bin/java") |
1313 | (string-append libdir "/gradle-launcher-4.4.jar")))) |
1314 | (chmod filename #o755) |
1315 | ;; Create a symlink for every dependency listed above. |
1316 | (for-each |
1317 | (lambda (lib) |
1318 | (symlink lib (string-append libdir "/" (basename lib)))) |
1319 | (apply append |
1320 | (map |
1321 | (lambda (lib) |
1322 | (find-files (assoc-ref %build-inputs lib) |
1323 | ".*.jar")) |
1324 | dependencies))) |
1325 | ;; Using a symlink for gradle-launcher doesn't seem to work. |
1326 | (delete-file (string-append libdir "/gradle-launcher-4.4.jar")) |
1327 | (copy-file (string-append (assoc-ref %build-inputs "gradle-launcher") |
1328 | "/share/java/gradle-launcher-4.4.jar") |
1329 | (string-append libdir |
1330 | "/gradle-launcher-4.4.jar")))))) |
1331 | (inputs |
1332 | `(("gradle-wrapper" ,gradle-wrapper) |
1333 | ("gradle-tooling-api" ,gradle-tooling-api) |
1334 | ("gradle-resources" ,gradle-resources) |
1335 | ("gradle-process-services" ,gradle-process-services) |
1336 | ("gradle-persistent-cache" ,gradle-persistent-cache) |
1337 | ("gradle-native" ,gradle-native) |
1338 | ("gradle-model-groovy" ,gradle-model-groovy) |
1339 | ("gradle-model-core" ,gradle-model-core) |
1340 | ("gradle-messaging" ,gradle-messaging) |
1341 | ("gradle-logging" ,gradle-logging) |
1342 | ("gradle-launcher" ,gradle-launcher) |
1343 | ("gradle-jvm-services" ,gradle-jvm-services) |
1344 | ("gradle-internal-testing" ,gradle-internal-testing) |
1345 | ("gradle-installation-beacon" ,gradle-installation-beacon) |
1346 | ("gradle-docs" ,gradle-docs) |
1347 | ("gradle-core-api" ,gradle-core-api) |
1348 | ("gradle-core" ,gradle-core) |
1349 | ("gradle-cli" ,gradle-cli) |
1350 | ("gradle-build-option" ,gradle-build-option) |
1351 | ("gradle-build-cache" ,gradle-build-cache) |
1352 | ("gradle-base-services-groovy" ,gradle-base-services-groovy) |
1353 | ("gradle-base-services" ,gradle-base-services) |
1354 | ("groovy-ant" ,groovy-ant) |
1355 | ("groovy-bootstrap" ,groovy-bootstrap) |
1356 | ("groovy-json" ,groovy-json) |
1357 | ("groovy-templates" ,groovy-templates) |
1358 | ("groovy-xml" ,groovy-xml) |
1359 | ("icedtea-8" ,icedtea-8) |
1360 | ("java-asm-6" ,java-asm-6) |
1361 | ("java-commons-compress" ,java-commons-compress) |
1362 | ("java-commons-collections" ,java-commons-collections) |
1363 | ("java-commons-io" ,java-commons-io) |
1364 | ("java-commons-lang" ,java-commons-lang) |
1365 | ("java-guava-for-gradle" ,java-guava-for-gradle) |
1366 | ("java-jansi" ,java-jansi) |
1367 | ("java-jansi-native" ,java-jansi-native) |
1368 | ("java-javax-inject" ,java-javax-inject) |
1369 | ("java-jaxp" ,java-jaxp) |
1370 | ("java-jcip-annotations" ,java-jcip-annotations) |
1371 | ("java-jsr305" ,java-jsr305) |
1372 | ("java-jul-to-slf4j" ,java-jul-to-slf4j) |
1373 | ("java-kryo" ,java-kryo) |
1374 | ("java-minlog" ,java-minlog) |
1375 | ("java-native-platform" ,java-native-platform) |
1376 | ("java-objenesis" ,java-objenesis) |
1377 | ("java-reflectasm" ,java-reflectasm) |
1378 | ("java-slf4j-api" ,java-slf4j-api) |
1379 | ("ant" ,ant) |
1380 | ("bash" ,bash))) |
1381 | (native-inputs '()))) |
1382 |