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

Restore ability to provide additional command line arguments to native build #9536

Closed
orion19792014 opened this issue May 22, 2020 · 0 comments · Fixed by #9852
Closed

Restore ability to provide additional command line arguments to native build #9536

orion19792014 opened this issue May 22, 2020 · 0 comments · Fixed by #9852
Labels
kind/enhancement New feature or request
Milestone

Comments

@orion19792014
Copy link

orion19792014 commented May 22, 2020

Description
It would be nice to restore ability to specify additional command line arguments for the native build in build.gradle file. This is most useful in the cases, when you are turning into the native mode applications, which are using libraries, for which quarkus extensions are not ready/not planned.

Starting from 1.4.0 there are only 2 ways to specify additional arguments:

  • using application.properties.
  • using command line arguments.

The option regarding application.properties, is not very desirable, because it would mean, that command line arguments needed for compilation of native application, will be present in configuration of application, which is needed only for execution of application.

The option regarding command line arguments is not portable across different environments. If before we needed to execute just one command to create native application on different environments (gradlew buildNative), now in each case we should specify additional command line arguments, and this list could be rather big (or create a wrapper for the gradle build -Dquarkus.package.type=native).

Implementation ideas
It would be nice to restore (if it is possible) ability to specify list of additional command line arguments for native build.
Something like:

buildNative {
    additionalBuildArgs = [
            '--enable-all-security-services',
            '--allow-incomplete-classpath',
            '-H:ReflectionConfigurationFiles=/native-config/reflection-config.json',
            '--initialize-at-run-time=<list of classes>',
            '--verbose', '-H:+TraceClassInitialization',
            '-H:IncludeResources=/src/main/resources/application.properties',
            '-H:+ReportExceptionStackTraces','-H:-SpawnIsolates','-H:EnableURLProtocols=http,https','-H:+JNI','-H:+ReportUnsupportedElementsAtRuntime',
            '-H:ResourceConfigurationFiles=/native-config/resource-config.json'
    ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants