From 69bbfd998e342da9cea6a2d16fef13cc6b2acd15 Mon Sep 17 00:00:00 2001 From: Manuel Fuchs Date: Fri, 4 Oct 2024 10:03:18 +0200 Subject: [PATCH] Add Micronaut and Quarkus support --- bin/compile | 6 ++++++ bin/release | 6 ++++++ lib/common.sh | 10 ++++++++++ 3 files changed, 22 insertions(+) diff --git a/bin/compile b/bin/compile index e51bce4..b619360 100755 --- a/bin/compile +++ b/bin/compile @@ -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 -x ${GRADLE_CHECK_TASK}" elif is_ratpack $BUILD_DIR; then echo "-----> Ratpack detected" mcount "task.ratpack" diff --git a/bin/release b/bin/release index 856c45d..9c47fe5 100755 --- a/bin/release +++ b/bin/release @@ -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 diff --git a/lib/common.sh b/lib/common.sh index bc71a0e..389c898 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -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} &&