Skip to content

Commit 4d18574

Browse files
committed
Attempt to fix build at Ubuntu
1 parent 7b4c47b commit 4d18574

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

snapcraft.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,14 @@ parts:
3737
plugin: dump
3838
source-type: git
3939
override-build: |
40-
snapcraftctl build
41-
export JAVAC=/usr/lib/jvm/java-11-openjdk-amd64/bin/javac && \
42-
./gradlew installDist && \
40+
JAVAC=/usr/lib/jvm/java-11-openjdk-amd64/bin/javac
41+
set +u # ignore unbound variables
42+
if [ "$https_proxy" != "" ]; then
43+
https_proxy_host=$(echo $https_proxy | cut -d'/' -f3 | cut -d':' -f1)
44+
https_proxy_port=$(echo $https_proxy | cut -d'/' -f3 | cut -d':' -f2)
45+
gradle_opts="-Dhttp.proxyHost=$https_proxy_host -Dhttp.proxyPort=$https_proxy_port -Dhttps.proxyHost=$https_proxy_host -Dhttps.proxyPort=$https_proxy_port -Djava.net.useSystemProxies=true"
46+
fi
47+
./gradlew $gradle_opts installDist && \
4348
mkdir -p ../install/usr/share/jgex && \
4449
cp -a build/install/jgex/lib/*.jar ../install/usr/share/jgex && \
4550
mkdir -p ../install/root && \

0 commit comments

Comments
 (0)