Search in sources :

Example 11 with NativeImageOptions

use of org.graalvm.buildtools.gradle.dsl.NativeImageOptions in project native-build-tools by graalvm.

the class NativeImagePlugin method registerGraalVMExtension.

private GraalVMExtension registerGraalVMExtension(Project project) {
    NamedDomainObjectContainer<NativeImageOptions> nativeImages = project.getObjects().domainObjectContainer(NativeImageOptions.class, name -> project.getObjects().newInstance(BaseNativeImageOptions.class, name, project.getObjects(), project.getProviders(), project.getExtensions().findByType(JavaToolchainService.class), project.getName()));
    GraalVMExtension graalvmNative = project.getExtensions().create(GraalVMExtension.class, "graalvmNative", DefaultGraalVmExtension.class, nativeImages, this, project);
    graalvmNative.getGeneratedResourcesDirectory().set(project.getLayout().getBuildDirectory().dir("native/generated/"));
    configureNativeConfigurationRepo((ExtensionAware) graalvmNative);
    return graalvmNative;
}
Also used : BaseNativeImageOptions(org.graalvm.buildtools.gradle.internal.BaseNativeImageOptions) GraalVMExtension(org.graalvm.buildtools.gradle.dsl.GraalVMExtension) NativeImageOptions(org.graalvm.buildtools.gradle.dsl.NativeImageOptions) BaseNativeImageOptions(org.graalvm.buildtools.gradle.internal.BaseNativeImageOptions) DeprecatedNativeImageOptions(org.graalvm.buildtools.gradle.internal.DeprecatedNativeImageOptions)

Aggregations

NativeImageOptions (org.graalvm.buildtools.gradle.dsl.NativeImageOptions)11 BaseNativeImageOptions (org.graalvm.buildtools.gradle.internal.BaseNativeImageOptions)8 DeprecatedNativeImageOptions (org.graalvm.buildtools.gradle.internal.DeprecatedNativeImageOptions)7 File (java.io.File)5 GraalVMExtension (org.graalvm.buildtools.gradle.dsl.GraalVMExtension)5 BuildNativeImageTask (org.graalvm.buildtools.gradle.tasks.BuildNativeImageTask)5 JavaApplication (org.gradle.api.plugins.JavaApplication)5 AgentCommandLineProvider (org.graalvm.buildtools.gradle.internal.AgentCommandLineProvider)4 GraalVMLogger (org.graalvm.buildtools.gradle.internal.GraalVMLogger)4 NativeImageExecutableLocator.graalvmHomeProvider (org.graalvm.buildtools.gradle.internal.NativeImageExecutableLocator.graalvmHomeProvider)4 GenerateResourcesConfigFile (org.graalvm.buildtools.gradle.tasks.GenerateResourcesConfigFile)4 NativeRunTask (org.graalvm.buildtools.gradle.tasks.NativeRunTask)4 URI (java.net.URI)3 URISyntaxException (java.net.URISyntaxException)3 Path (java.nio.file.Path)3 Arrays (java.util.Arrays)3 Collections (java.util.Collections)3 Locale (java.util.Locale)3 Map (java.util.Map)3 Set (java.util.Set)3