mirror of
https://github.com/engineer-man/piston.git
synced 2025-05-02 09:56:27 +02:00
pkg(groovy-3.0.7): add compile step
This commit is contained in:
parent
9a52e369f2
commit
c46cafa96d
4 changed files with 28 additions and 3 deletions
packages/groovy/3.0.7
3
packages/groovy/3.0.7/build.sh
vendored
3
packages/groovy/3.0.7/build.sh
vendored
|
@ -8,6 +8,7 @@ tar xzf java.tar.gz --strip-components=1
|
||||||
rm java.tar.gz
|
rm java.tar.gz
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
curl -L "https://dl.bintray.com/groovy/maven/apache-groovy-binary-3.0.7.zip" -o groovy.zip
|
# Download Groovy binaries
|
||||||
|
curl -L "https://groovy.jfrog.io/artifactory/dist-release-local/groovy-zips/apache-groovy-binary-3.0.7.zip" -o groovy.zip
|
||||||
unzip -q groovy.zip
|
unzip -q groovy.zip
|
||||||
rm groovy.zip
|
rm groovy.zip
|
||||||
|
|
17
packages/groovy/3.0.7/compile
vendored
Normal file
17
packages/groovy/3.0.7/compile
vendored
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Compile groovy scripts into a separate "classes" directory
|
||||||
|
# NOTE: - Main file MUST be a groovy script
|
||||||
|
# - not supporting object class entry points as of now
|
||||||
|
groovyc -d classes "$@"
|
||||||
|
|
||||||
|
# Create the Manifest and include groovy jars:
|
||||||
|
# NOTE: - main class will be the first file ('.' becomes '_' and without the extension)
|
||||||
|
# - groovy lib jars MUST be in the class path in order to work properly
|
||||||
|
echo "Main-Class: $(sed 's/\./\_/g'<<<${1%.*})
|
||||||
|
Class-Path: $(echo $GROOVY_HOME/lib/*.jar | sed 's/\s/\n /g')
|
||||||
|
|
||||||
|
" > manifest.txt
|
||||||
|
|
||||||
|
# Create the jar from the manifest and classes
|
||||||
|
jar cfm out.jar manifest.txt -C classes .
|
7
packages/groovy/3.0.7/environment
vendored
7
packages/groovy/3.0.7/environment
vendored
|
@ -2,4 +2,9 @@
|
||||||
|
|
||||||
# Groovy requires JAVA_HOME to be set
|
# Groovy requires JAVA_HOME to be set
|
||||||
export JAVA_HOME=$PWD/java
|
export JAVA_HOME=$PWD/java
|
||||||
export PATH=$PWD/groovy-3.0.7/bin:$PATH
|
|
||||||
|
# GROOVY_HOME needed to get the groovy libs
|
||||||
|
export GROOVY_HOME=$PWD/groovy-3.0.7
|
||||||
|
|
||||||
|
# Add java and groovy binaries to the path
|
||||||
|
export PATH=$PWD/java/bin:$PWD/groovy-3.0.7/bin:$PATH
|
||||||
|
|
4
packages/groovy/3.0.7/run
vendored
4
packages/groovy/3.0.7/run
vendored
|
@ -1,3 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
groovy "$@"
|
# Run the jar created during compile
|
||||||
|
shift
|
||||||
|
java -jar out.jar "$@"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue