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
Merged
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
4 changes: 2 additions & 2 deletions docs/src/main/asciidoc/writing-native-applications-tips.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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

]
}
----
Expand Down Expand Up @@ -221,7 +221,7 @@ When using Gradle, we need to configure the additional build arguments in the pl
----
buildNative {
additionalBuildArgs = [
'-H:ReflectionConfigurationFiles=resources/main/reflection-config.json'
"-H:ReflectionConfigurationFiles=${buildDir}/resources/main/reflection-config.json".toString()
]
}
----
Expand Down