aboutsummaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorFlorian Schmaus <flow@gentoo.org>2021-06-30 09:20:59 +0200
committerFlorian Schmaus <flow@gentoo.org>2021-06-30 09:22:04 +0200
commitbc66c7b0b3a29865ab8261ee60b62cd73fa884f3 (patch)
treee0ff92979ba03f0641c2455890386ad2eb65ca05 /eclass
parentvirtual/gradle: update metadata, use my @gentoo.org address (diff)
downloadjava-bc66c7b0b3a29865ab8261ee60b62cd73fa884f3.tar.gz
java-bc66c7b0b3a29865ab8261ee60b62cd73fa884f3.tar.bz2
java-bc66c7b0b3a29865ab8261ee60b62cd73fa884f3.zip
gradle.eclass: initial version
This is the start of a new eclass for the gradle build system. The eclass is currently experimental and subject to change. Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/gradle.eclass36
1 files changed, 36 insertions, 0 deletions
diff --git a/eclass/gradle.eclass b/eclass/gradle.eclass
new file mode 100644
index 00000000..f609c122
--- /dev/null
+++ b/eclass/gradle.eclass
@@ -0,0 +1,36 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: gradle.eclass
+# @MAINTAINER:
+# Gentoo Java Project <java@gentoo.org>
+# @AUTHOR:
+# Florian Schmaus <flow@gentoo.org>
+# @BLURB: Utility functions for the gradle build system.
+# @DESCRIPTION:
+# Utility functions for the gradle build system.
+# WARNING: This eclass is currently experimental and
+# subject to change.
+
+EGRADLE_BIN="gradle"
+
+# @FUNCTION: egradle
+# @USAGE: [gradle-args]
+# @DESCRIPTION
+# Invoke gradle
+egradle() {
+ # TODO --no-build-cache ?
+ local gradle_args=(
+ --console=plain
+ --info
+ --stacktrace
+ --no-daemon
+ --offline
+ --no-build-cache
+ --gradle-user-home "${T}/gradle_user_home"
+ --project-cache-dir "${T}/gradle_project_cache"
+ )
+
+ einfo "gradle "${gradle_args[@]}" ${@}"
+ "${EGRADLE_BIN}" "${gradle_args[@]}" ${@} || die "gradle failed"
+}