Gentoo Archives: gentoo-commits

From: Florian Schmaus <flow@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/java:master commit in: eclass/
Date: Wed, 30 Jun 2021 07:22:14
Message-Id: 1625037724.bc66c7b0b3a29865ab8261ee60b62cd73fa884f3.flow@gentoo
1 commit: bc66c7b0b3a29865ab8261ee60b62cd73fa884f3
2 Author: Florian Schmaus <flow <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 30 07:20:59 2021 +0000
4 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 30 07:22:04 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/java.git/commit/?id=bc66c7b0
7
8 gradle.eclass: initial version
9
10 This is the start of a new eclass for the gradle build system. The
11 eclass is currently experimental and subject to change.
12
13 Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
14
15 eclass/gradle.eclass | 36 ++++++++++++++++++++++++++++++++++++
16 1 file changed, 36 insertions(+)
17
18 diff --git a/eclass/gradle.eclass b/eclass/gradle.eclass
19 new file mode 100644
20 index 00000000..f609c122
21 --- /dev/null
22 +++ b/eclass/gradle.eclass
23 @@ -0,0 +1,36 @@
24 +# Copyright 2021 Gentoo Authors
25 +# Distributed under the terms of the GNU General Public License v2
26 +
27 +# @ECLASS: gradle.eclass
28 +# @MAINTAINER:
29 +# Gentoo Java Project <java@g.o>
30 +# @AUTHOR:
31 +# Florian Schmaus <flow@g.o>
32 +# @BLURB: Utility functions for the gradle build system.
33 +# @DESCRIPTION:
34 +# Utility functions for the gradle build system.
35 +# WARNING: This eclass is currently experimental and
36 +# subject to change.
37 +
38 +EGRADLE_BIN="gradle"
39 +
40 +# @FUNCTION: egradle
41 +# @USAGE: [gradle-args]
42 +# @DESCRIPTION
43 +# Invoke gradle
44 +egradle() {
45 + # TODO --no-build-cache ?
46 + local gradle_args=(
47 + --console=plain
48 + --info
49 + --stacktrace
50 + --no-daemon
51 + --offline
52 + --no-build-cache
53 + --gradle-user-home "${T}/gradle_user_home"
54 + --project-cache-dir "${T}/gradle_project_cache"
55 + )
56 +
57 + einfo "gradle "${gradle_args[@]}" ${@}"
58 + "${EGRADLE_BIN}" "${gradle_args[@]}" ${@} || die "gradle failed"
59 +}