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

Show more robust gradle graal configuration in docs #5510

Merged
merged 1 commit into from
Nov 18, 2019

Conversation

geoand
Copy link
Contributor

@geoand geoand commented Nov 15, 2019

@aguibert could you also take a look?

@@ -77,7 +77,7 @@ When using Gradle, we need to configure the additional build arguments in the pl
----
buildNative {
additionalBuildArgs = [
'-H:ResourceConfigurationFiles=../resources/main/resources-config.json'
"-H:ResourceConfigurationFiles=${buildDir}/resources/main/resources-config.json".toString()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know Gradle very well but is the toString() needed? It looks weird.

(Just asking, I suppose you added it because it was required)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea the toString() is needed otherwise Groovy interprets it as a groovy.lang.GString and not a java.lang.String and then we get a classcastexception. An alternative would be to do:

'-H:ResourceConfigurationFiles=' + buildDir + '/resources/main/resources-config.json'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly, groovy has its own GString which needs to be converted to regular String

@@ -77,7 +77,7 @@ When using Gradle, we need to configure the additional build arguments in the pl
----
buildNative {
additionalBuildArgs = [
'-H:ResourceConfigurationFiles=../resources/main/resources-config.json'
"-H:ResourceConfigurationFiles=${buildDir}/resources/main/resources-config.json".toString()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea the toString() is needed otherwise Groovy interprets it as a groovy.lang.GString and not a java.lang.String and then we get a classcastexception. An alternative would be to do:

'-H:ResourceConfigurationFiles=' + buildDir + '/resources/main/resources-config.json'

@geoand geoand requested a review from gastaldi November 18, 2019 07:10
Copy link
Contributor

@gastaldi gastaldi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gastaldi gastaldi added this to the 1.1.0 milestone Nov 18, 2019
@gastaldi gastaldi merged commit 4e3a5d3 into quarkusio:master Nov 18, 2019
@geoand geoand deleted the gradle-graal-config-doc branch November 18, 2019 07:35
@gsmet gsmet modified the milestones: 1.1.0, 1.0.0.Final Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants