GNU bug report logs -
#26803
Java things
Previous Next
Reported by: Ricardo Wurmus <rekado <at> elephly.net>
Date: Sat, 6 May 2017 14:02:02 UTC
Severity: normal
Done: Ricardo Wurmus <rekado <at> elephly.net>
Bug is archived. No further changes may be made.
Full log
Message #293 received at 26803 <at> debbugs.gnu.org (full text, mbox):
Le 2017-05-06 17:36, Ricardo Wurmus a écrit :
> * gnu/packages/java.scm (java-guava): New variable.
> ---
> gnu/packages/java.scm | 52
> +++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 52 insertions(+)
>
> diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
> index 3a104f4c5..a9faf681d 100644
> --- a/gnu/packages/java.scm
> +++ b/gnu/packages/java.scm
> @@ -1878,6 +1878,58 @@ included:
> It provides packages in the @code{javax.annotations} namespace.")
> (license license:asl2.0)))
>
> +(define-public java-guava
> + (package
> + (name "java-guava")
> + ;; This is the last release of Guava that can be built with Java
> 7.
> + (version "20.0")
> + (source (origin
> + (method url-fetch)
> + (uri (string-append "https://github.com/google/guava/"
> + "releases/download/v" version
> + "/guava-" version "-sources.jar"))
> + (sha256
> + (base32
> +
> "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
> + (build-system ant-build-system)
> + (arguments
> + `(#:tests? #f ; no tests included
> + #:jar-name "guava.jar"
> + #:phases
> + (modify-phases %standard-phases
> + (add-after 'unpack 'trim-sources
> + (lambda _
> + (with-directory-excursion "src/com/google/common"
> + ;; Remove annotations to avoid extra dependencies:
> + ;; * "j2objc" annotations are used when converting Java
> to
> + ;; Objective C;
> + ;; * "errorprone" annotations catch common Java
> mistakes at
> + ;; compile time;
> + ;; * "IgnoreJRERequirement" is used for Android.
> + (substitute* (find-files "." "\\.java$")
> + (("import com.google.j2objc.*") "")
> + (("import com.google.errorprone.annotation.*") "")
> + (("import org.codehaus.mojo.animal_sniffer.*") "")
> + (("@CanIgnoreReturnValue") "")
> + (("@LazyInit") "")
> + (("@WeakOuter") "")
> + (("@RetainedWith") "")
> + (("@Weak") "")
> + (("@ForOverride") "")
> + (("@J2ObjCIncompatible") "")
> + (("@IgnoreJRERequirement") "")))
> + #t)))))
> + (inputs
> + `(("java-jsr305" ,java-jsr305)))
> + (home-page "https://github.com/google/guava")
> + (synopsis "Google core libraries for Java")
> + (description "Guava is a set of core libraries that includes new
> +collection types (such as multimap and multiset), immutable
> collections, a
> +graph library, functional types, an in-memory cache, and
> APIs/utilities for
> +concurrency, I/O, hashing, primitives, reflection, string processing,
> and much
> +more!")
> + (license license:asl2.0)))
> +
> (define-public java-commons-cli
> (package
> (name "java-commons-cli")
Hi, I have a recipe for errorprone, j2objc and animal-sniffer, although
they're still WIP. I simply split them in two, one part with the
annotations only that are required for guava, and the rest that requires
guava. This requires patches to get two separate jar files. I'll send
something this evening. Anyway, if that works, I think we can start by
this recipe and add the annotation packages later.
This bug report was last modified 8 years and 94 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.