File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ # Wrapper script to invoke gradle from meson
3
+ set -e
4
+
5
+ # Do not execute gradle when ninja is called as root (it would download the
6
+ # whole gradle world in /root/.gradle).
7
+ # This is typically useful for calling "sudo ninja install" after a "ninja
8
+ # install"
9
+ if [[ " $EUID " == 0 ]]
10
+ then
11
+ echo " (not invoking gradle, since we are root)" >&2
12
+ exit 0
13
+ fi
14
+
15
+ PROJECT_ROOT=" $1 "
16
+ OUTPUT=" $2 "
17
+ BUILDTYPE=" $3 "
18
+
19
+ # gradlew is in the parent of the server directory
20
+ GRADLE=${GRADLE:- $PROJECT_ROOT / ../ gradlew}
21
+
22
+ if [[ " $BUILDTYPE " == debug ]]
23
+ then
24
+ " $GRADLE " -p " $PROJECT_ROOT " assembleDebug
25
+ cp " $PROJECT_ROOT /build/outputs/apk/debug/server-debug.apk" " $OUTPUT "
26
+ else
27
+ " $GRADLE " -p " $PROJECT_ROOT " assembleRelease
28
+ cp " $PROJECT_ROOT /build/outputs/apk/release/server-release-unsigned.apk" " $OUTPUT "
29
+ fi
You can’t perform that action at this time.
0 commit comments