-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Conversation
@@ -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() |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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'
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@aguibert could you also take a look?