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

Discard Gradle Welcome message #244

Closed
anthonydahanne opened this issue May 24, 2023 · 0 comments
Closed

Discard Gradle Welcome message #244

anthonydahanne opened this issue May 24, 2023 · 0 comments
Labels
hacktoberfest Hacktoberfest eligible note:good-first-issue A good first issue to get started with note:ideal-for-contribution An issue that a contributor can help us with type:enhancement A general enhancement

Comments

@anthonydahanne
Copy link
Member

anthonydahanne commented May 24, 2023

Every time Gradle runs within the buildpack, it will print a welcome message to the user; since Gradle does that the first time it's run.

[builder]       Welcome to Gradle 7.6!
[builder]       
[builder]       Here are the highlights of this release:
[builder]        - Added support for Java 19.
[builder]        - Introduced `--rerun` flag for individual task rerun.
[builder]        - Improved dependency block for test suites to be strongly typed.
[builder]        - Added a pluggable system for Java toolchains provisioning.
[builder]       
[builder]       For more details see https://docs.gradle.org/7.6/release-notes.html

Possible Solution

There's a way to discard this message, using a flag that could be appended as a default flag, such as we already do with --no-demon : -Dorg.gradle.welcome=never ; see this SO post for example
For example, here's a workaround for now:

pack build applications/native-image4 \
  --builder paketobuildpacks/builder-jammy-tiny \
  --env BP_NATIVE_IMAGE=true --env BP_GRADLE_ADDITIONAL_BUILD_ARGUMENTS=-Dorg.gradle.welcome=never
[...]
[builder]     Executing gradlew --no-daemon assemble -Dorg.gradle.welcome=never
[builder]       Downloading https://services.gradle.org/distributions/gradle-7.6-bin.zip
[builder]       ...........10%............20%...........30%............40%............50%...........60%............70%............80%...........90%............100%
[builder]       To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.6/userguide/gradle_daemon.html#sec:disabling_the_daemon.
[builder]       Daemon will be stopped at the end of the build 
[builder]       > Task :compileJava
[builder]       > Task :processResources
[builder]       > Task :classes
[builder]       > Task :resolveMainClassName
[builder]       
[builder]       > Task :processAot

Motivation

I think it pollutes the logs, and would like them removed

@anthonydahanne anthonydahanne added type:enhancement A general enhancement note:ideal-for-contribution An issue that a contributor can help us with note:good-first-issue A good first issue to get started with labels May 24, 2023
dmikusa added a commit that referenced this issue May 27, 2023
Close #244: No more Gradle welcome message
@anthonydahanne anthonydahanne added the hacktoberfest Hacktoberfest eligible label Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Hacktoberfest eligible note:good-first-issue A good first issue to get started with note:ideal-for-contribution An issue that a contributor can help us with type:enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant