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 a9c459f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## [Unreleased]

* Remove heroku-18 support ([#128](https://github.com/heroku/heroku-buildpack-gradle/pull/128))
* Add default process type and build task detection for Micronaut and Quarkus. ([#144](https://github.com/heroku/heroku-buildpack-gradle/pull/144))

## [v39] - 2022-12-06

Expand Down
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 -x ${GRADLE_CHECK_TASK}"
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 a9c459f

Please sign in to comment.