diff options
| author | Constantin Tarasov <tarcv@proton.me> | 2026-03-17 22:50:59 +0000 |
|---|---|---|
| committer | Julien Lepiller <julien@lepiller.eu> | 2026-03-18 19:05:07 +0100 |
| commit | 7429d710934ab9df84d524e33b68bf887c7bf567 (patch) | |
| tree | 748b46e62d3a1f0d33c27eda027275a487fd87b7 | |
| parent | a3639658c7ccab4af9878b5e9ba674eb7d079a22 (diff) | |
gnu: groovy: Compile to 1.8 bytecode.
This fixes system requirements of the packaged Groovy, so that they match
upstream ones. It allows using Groovy compiler and libraries from applications
or libraries targetting JDK 8.
* gnu/packages/groovy.scm (groovy-bootstrap, groovy-subproject)
(groovy-console): Compile to 1.8 bytecode.
Change-Id: I9d8dd393d8323660ca2af033504c997bca6e3cf9
| -rw-r--r-- | gnu/packages/groovy.scm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm index 07080f111f2..94b2fef8330 100644 --- a/gnu/packages/groovy.scm +++ b/gnu/packages/groovy.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu> ;;; Copyright © 2019 Tobias Geerinck-Rice <me@tobias.gr> +;;; Copyright © 2026 Constantin Tarasov <tarcv@proton.me> ;;; ;;; This file is part of GNU Guix. ;;; @@ -144,6 +145,8 @@ groovy submodules.") (add-before 'build 'generate-exception-utils (lambda _ (invoke "javac" "-cp" (getenv "CLASSPATH") + ;; Make the JAR usable from Java 8 as per https://groovy.apache.org/download.html#requirements + "-source" "1.8" "-target" "1.8" "config/ant/src/org/codehaus/groovy/ExceptionUtilsGenerator.java") (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":config/ant/src") @@ -155,6 +158,8 @@ groovy submodules.") (mkdir-p "target/classes/org/codehaus/groovy/runtime") (mkdir-p "target/classes/META-INF") (invoke "javac" "-cp" (getenv "CLASSPATH") + ;; Make the JAR usable from Java 8 as per https://groovy.apache.org/download.html#requirements + "-source" "1.8" "-target" "1.8" "src/main/java/org/codehaus/groovy/tools/DgmConverter.java") (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":src/main/java") @@ -179,6 +184,8 @@ groovy submodules.") "-cp" (getenv "CLASSPATH") "-d" "target/classes" "-j"; joint compilation + ;; Make the JAR usable from Java 8 as per https://groovy.apache.org/download.html#requirements + "-Jsource=1.8" "-Jtarget=1.8" (find-files "src/main" ".*\\.(groovy|java)$")) (invoke "jar" "-cf" "build/jar/groovy.jar" @@ -252,6 +259,8 @@ other groovy submodules."))) "org.codehaus.groovy.tools.FileSystemCompiler" "-cp" (getenv "CLASSPATH") "-d" "build/classes" "-j" + ;; Make the JAR usable from Java 8 as per https://groovy.apache.org/download.html#requirements + "-Jsource=1.8" "-Jtarget=1.8" (append (find-files ,(string-append "subprojects/" name "/src/main/java") ".*\\.(groovy|java)$") @@ -558,6 +567,8 @@ library used to build graphical interfaces.")))) "org.codehaus.groovy.tools.FileSystemCompiler" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") "-d" "build/test-classes" "-j" + ;; Make the JAR usable from Java 8 as per https://groovy.apache.org/download.html#requirements + "-Jsource=1.8" "-Jtarget=1.8" (append (find-files "subprojects/groovy-swing/src/test/java" ".*\\.(groovy|java)$") |
