File: build.sh

package info (click to toggle)
proguard 6.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 7,824 kB
  • sloc: java: 89,110; xml: 893; sh: 171; makefile: 82
file content (38 lines) | stat: -rwxr-xr-x 1,080 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
#
# GNU/Linux build script for the ProGuard Gradle task.

cd $(dirname "$0")

source ../buildscripts/functions.sh

MAIN_CLASS=proguard.gradle.ProGuardTask

GRADLE_HOME=${GRADLE_HOME:-/usr/local/java/gradle}

GRADLE_PATH=\
$(echo $GRADLE_HOME/lib/plugins/gradle-plugins-*.jar):\
$(echo $GRADLE_HOME/lib/gradle-logging-*.jar):\
$(echo $GRADLE_HOME/lib/gradle-base-services-?.*.jar):\
$(echo $GRADLE_HOME/lib/gradle-base-services-groovy-*.jar):\
$(echo $GRADLE_HOME/lib/gradle-core-[0-9]*.jar):\
$(echo $GRADLE_HOME/lib/gradle-core-api-*.jar):\
$(echo /usr/share/java/groovy-all-*.jar)

# Make sure the Gradle jars are present.
if [ ! -f "${GRADLE_PATH%%:*}" ]; then
  echo "Please make sure the environment variable GRADLE_HOME is set correctly,"
  echo "if you want to compile the optional ProGuard Gradle task."
  exit 1
fi

# Make sure the ProGuard core has been compiled.
if [ ! -d ../core/$OUT ]; then
  ../core/build.sh || exit 1
fi

# Compile and package.
export CLASSPATH=../core/$OUT:$GRADLE_PATH

compile   $MAIN_CLASS && \
updatejar "$PROGUARD_JAR" || exit 1