Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Micronaut and Quarkus support #144

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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