Skip to content

Commit

Permalink
Add Micronaut and Quarkus support
Browse files Browse the repository at this point in the history
  • Loading branch information
Malax committed Oct 4, 2024
1 parent 5519302 commit b21cff9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ elif is_spring_boot $BUILD_DIR; then
mcount "task.spring"
fi
DEFAULT_GRADLE_TASK="build -x ${GRADLE_CHECK_TASK}"
elif is_micronaut $BUILD_DIR; then
echo "-----> Micronaut detected"
DEFAULT_GRADLE_TASK="shadowJar -x ${GRADLE_CHECK_TASK}"
elif is_quarkus $BUILD_DIR; then
echo "-----> Quarkus detected"
DEFAULT_GRADLE_TASK="build"
elif is_ratpack $BUILD_DIR; then
echo "-----> Ratpack detected"
mcount "task.ratpack"
Expand Down
6 changes: 6 additions & 0 deletions bin/release
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ if [ ! -f $BUILD_DIR/Procfile ]; then
elif is_ratpack $BUILD_DIR && [ $(_ratpack_proc_count $BUILD_DIR) -eq 1 ]; then
echo "default_process_types:"
echo " web: $(_ratpack_proc $BUILD_DIR)"
elif is_micronaut $BUILD_DIR; then
echo "default_process_types:"
echo " web: java -Dmicronaut.server.port=\$PORT \$JAVA_OPTS -jar build/libs/*.jar"
elif is_quarkus $BUILD_DIR; then
echo "default_process_types:"
echo " web: java -Dquarkus.http.port=\$PORT \$JAVA_OPTS -jar build/quarkus-app/quarkus-run.jar"
else
echo "{}"
fi
Expand Down
10 changes: 10 additions & 0 deletions lib/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ is_spring_boot() {
test -z "$(grep "org.grails:grails-" ${gradleFile})"
}

is_micronaut() {
local gradleFile="$(gradle_build_file ${1})"
test -f ${gradleFile} && test -n "$(grep "io.micronaut" ${gradleFile})"
}

is_quarkus() {
local gradleFile="$(gradle_build_file ${1})"
test -f ${gradleFile} && test -n "$(grep "io.quarkus" ${gradleFile})"
}

is_ratpack() {
local gradleFile="$(gradle_build_file ${1})"
test -f ${gradleFile} &&
Expand Down

0 comments on commit b21cff9

Please sign in to comment.