From 08cd51b1eab6c4451e3f374b6083748f7d9b4667 Mon Sep 17 00:00:00 2001 From: "William L. Thomson Jr" Date: Mon, 21 Sep 2015 20:51:43 -0400 Subject: [PATCH] eclass/java-utils-2: Added proposed function to remove *.class and *.jar files from sources. Long term should be called automatically all the time with optional override via JAVA_PKG_NO_CLEAN. --- eclass/java-utils-2.eclass | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass index 6e333118f5bb..af3c7409b7e4 100644 --- a/eclass/java-utils-2.eclass +++ b/eclass/java-utils-2.eclass @@ -2824,3 +2824,12 @@ is-java-strict() { [[ -n ${JAVA_PKG_STRICT} ]] return $? } + +# @FUNCTION: java-pkg_clean +# @DESCRIPTION: +# java package cleaner function, will remove all *.class and *.jar files +# removing any bundled dependencies +java-pkg_clean() { + [[ -n "${JAVA_PKG_NO_CLEAN}" ]] && + find '(' -name '*.class' -o -name '*.jar' ')' -type f -delete -print || die +} -- 2.26.2