Ensure Java 17 is used in snap ant build
This commit is contained in:
parent
7fff5c40f1
commit
fed0aebb58
@ -15,7 +15,7 @@ description: |
|
|||||||
* Cross-platform (Java-based)
|
* Cross-platform (Java-based)
|
||||||
* Read more about it on the OpenRocket.info.
|
* Read more about it on the OpenRocket.info.
|
||||||
license: GPL-3.0
|
license: GPL-3.0
|
||||||
base: core18
|
base: core22
|
||||||
confinement: strict
|
confinement: strict
|
||||||
|
|
||||||
plugs:
|
plugs:
|
||||||
@ -31,7 +31,7 @@ plugs:
|
|||||||
apps:
|
apps:
|
||||||
openrocket:
|
openrocket:
|
||||||
extensions:
|
extensions:
|
||||||
- gnome-3-28
|
- gnome
|
||||||
command: bin/launcher
|
command: bin/launcher
|
||||||
plugs:
|
plugs:
|
||||||
- home
|
- home
|
||||||
@ -46,6 +46,12 @@ apps:
|
|||||||
parts:
|
parts:
|
||||||
openrocket:
|
openrocket:
|
||||||
plugin: ant
|
plugin: ant
|
||||||
|
build-packages:
|
||||||
|
- ant
|
||||||
|
- ant-contrib
|
||||||
|
- ant-optional
|
||||||
|
- openjdk-17-jdk
|
||||||
|
- openjdk-17-jre
|
||||||
source: .
|
source: .
|
||||||
source-type: git
|
source-type: git
|
||||||
ant-build-targets:
|
ant-build-targets:
|
||||||
@ -68,6 +74,8 @@ parts:
|
|||||||
VERSION=$(cat core/resources/build.properties | awk -F'=' '/build\.version/ { print $2 }')
|
VERSION=$(cat core/resources/build.properties | awk -F'=' '/build\.version/ { print $2 }')
|
||||||
snapcraftctl set-version "$VERSION"
|
snapcraftctl set-version "$VERSION"
|
||||||
override-build: |
|
override-build: |
|
||||||
|
export JAVA_HOME=$SNAP/usr/lib/jvm/java-17-openjdk-amd64
|
||||||
|
export PATH=$JAVA_HOME/bin:$PATH
|
||||||
snapcraftctl build
|
snapcraftctl build
|
||||||
mv swing/build/jar/OpenRocket.jar $SNAPCRAFT_PART_INSTALL/OpenRocket.jar
|
mv swing/build/jar/OpenRocket.jar $SNAPCRAFT_PART_INSTALL/OpenRocket.jar
|
||||||
stage-packages:
|
stage-packages:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user