Search in sources :

Example 1 with NativeImageOptions

use of org.graalvm.buildtools.gradle.dsl.NativeImageOptions in project micronaut-gradle-plugin by micronaut-projects.

the class NativeImageDockerfile method buildActualCommandLine.

protected List<String> buildActualCommandLine(Provider<String> executable, DockerBuildStrategy buildStrategy, BaseImageForBuildStrategyResolver imageResolver) {
    NativeImageOptions options = newNativeImageOptions("actualDockerOptions");
    prepareNativeImageOptions(options);
    if (buildStrategy == DockerBuildStrategy.ORACLE_FUNCTION) {
        options.getMainClass().set("com.fnproject.fn.runtime.EntryPoint");
        options.getBuildArgs().add("--report-unsupported-elements-at-runtime");
    } else if (buildStrategy == DockerBuildStrategy.LAMBDA) {
        JavaApplication javaApplication = getProject().getExtensions().getByType(JavaApplication.class);
        if (!javaApplication.getMainClass().isPresent()) {
            options.getMainClass().set("io.micronaut.function.aws.runtime.MicronautLambdaRuntime");
        }
        if (!options.getMainClass().isPresent()) {
            options.getMainClass().set("io.micronaut.function.aws.runtime.MicronautLambdaRuntime");
        }
    }
    List<String> commandLine = new ArrayList<>();
    commandLine.add("native-image");
    List<String> args = buildNativeImageCommandLineArgs(executable, options);
    commandLine.addAll(args);
    String baseImage = imageResolver.get();
    // add --static if image is scratch
    if (baseImage.equalsIgnoreCase("scratch") && !commandLine.contains("--static")) {
        commandLine.add("--static");
    }
    // to build a "mostly" static native-image if image when using distroless
    if (baseImage.contains("distroless") && !commandLine.contains("-H:+StaticExecutableWithDynamicLibC")) {
        commandLine.add("-H:+StaticExecutableWithDynamicLibC");
    }
    return commandLine;
}
Also used : NativeImageOptions(org.graalvm.buildtools.gradle.dsl.NativeImageOptions) BaseNativeImageOptions(org.graalvm.buildtools.gradle.internal.BaseNativeImageOptions) JavaApplication(org.gradle.api.plugins.JavaApplication) ArrayList(java.util.ArrayList)

Example 2 with NativeImageOptions

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

the class NativeImagePlugin method configureAgent.

private static void configureAgent(Project project, Map<String, Provider<Boolean>> agents, Provider<Boolean> disableToolchainDetection, NativeImageOptions nativeImageOptions, ExecOperations execOperations, FileSystemOperations fileOperations) {
    String postProcessTaskName = PROCESS_AGENT_RESOURCES_TASK_NAME_PREFIX + capitalize(nativeImageOptions.getName()) + PROCESS_AGENT_RESOURCES_TASK_NAME_SUFFIX;
    TaskProvider<ProcessGeneratedGraalResourceFiles> postProcessingTask = registerProcessAgentFilesTask(project, postProcessTaskName);
    TaskProvider<? extends JavaForkOptions> instrumentedTask = nativeImageOptions.getAgent().getInstrumentedTask().get();
    AgentCommandLineProvider cliProvider = project.getObjects().newInstance(AgentCommandLineProvider.class);
    Provider<Boolean> agent = agents.get(nativeImageOptions.getName());
    cliProvider.getEnabled().set(agent);
    Provider<Directory> outputDir = project.getLayout().getBuildDirectory().dir(AGENT_OUTPUT_FOLDER + "/" + instrumentedTask.getName());
    cliProvider.getOutputDirectory().set(outputDir);
    cliProvider.getAgentOptions().set(nativeImageOptions.getAgent().getOptions());
    instrumentedTask.get().getJvmArgumentProviders().add(cliProvider);
    instrumentedTask.configure(task -> task.doLast(new MergeAgentFiles(agent, graalvmHomeProvider(project.getProviders()), outputDir, disableToolchainDetection, nativeImageOptions, execOperations, fileOperations, project.getLogger())));
    // Gradle won't let us configure from configure so we have to eagerly create the post-processing task :(
    postProcessingTask.get().getGeneratedFilesDir().set(instrumentedTask.map(t -> outputDir.get()));
    // We can't set from(postProcessingTask) directly, otherwise a task
    // dependency would be introduced even if the agent is not enabled.
    // We should be able to write this:
    // nativeImageOptions.getConfigurationFileDirectories().from(
    // agent.map(enabled -> enabled ? postProcessingTask : project.files())
    // )
    // but Gradle won't track the postProcessingTask dependency so we have to write this:
    ConfigurableFileCollection files = project.getObjects().fileCollection();
    files.from(agent.map(enabled -> enabled ? postProcessingTask : project.files()));
    files.builtBy((Callable<Task>) () -> agent.get() ? postProcessingTask.get() : null);
    nativeImageOptions.getConfigurationFileDirectories().from(files);
}
Also used : GradleUtils(org.graalvm.buildtools.gradle.internal.GradleUtils) ConfigurableFileCollection(org.gradle.api.file.ConfigurableFileCollection) Arrays(java.util.Arrays) NativeImageExecutableLocator.graalvmHomeProvider(org.graalvm.buildtools.gradle.internal.NativeImageExecutableLocator.graalvmHomeProvider) BuildNativeImageTask(org.graalvm.buildtools.gradle.tasks.BuildNativeImageTask) URISyntaxException(java.net.URISyntaxException) ListProperty(org.gradle.api.provider.ListProperty) JavaPlugin(org.gradle.api.plugins.JavaPlugin) NamedDomainObjectContainer(org.gradle.api.NamedDomainObjectContainer) NativeConfigurations(org.graalvm.buildtools.gradle.internal.NativeConfigurations) ApplicationPlugin(org.gradle.api.plugins.ApplicationPlugin) OutputDirectory(org.gradle.api.tasks.OutputDirectory) Task(org.gradle.api.Task) Provider(org.gradle.api.provider.Provider) ModuleVersionIdentifier(org.gradle.api.artifacts.ModuleVersionIdentifier) ConfigurationContainer(org.gradle.api.artifacts.ConfigurationContainer) TaskProvider(org.gradle.api.tasks.TaskProvider) NativeImageOptions(org.graalvm.buildtools.gradle.dsl.NativeImageOptions) Locale(java.util.Locale) Map(java.util.Map) DuplicatesStrategy(org.gradle.api.file.DuplicatesStrategy) ExtensionAware(org.gradle.api.plugins.ExtensionAware) GraalVMExtension(org.graalvm.buildtools.gradle.dsl.GraalVMExtension) URI(java.net.URI) Path(java.nio.file.Path) LogLevel(org.gradle.api.logging.LogLevel) Project(org.gradle.api.Project) SharedConstants(org.graalvm.buildtools.utils.SharedConstants) GenerateResourcesConfigFile(org.graalvm.buildtools.gradle.tasks.GenerateResourcesConfigFile) GraalVMLogger(org.graalvm.buildtools.gradle.internal.GraalVMLogger) Set(java.util.Set) JavaForkOptions(org.gradle.process.JavaForkOptions) GFileUtils(org.gradle.util.GFileUtils) Collectors(java.util.stream.Collectors) TaskContainer(org.gradle.api.tasks.TaskContainer) ArchiveOperations(org.gradle.api.file.ArchiveOperations) DefaultTestBinaryConfig(org.graalvm.buildtools.gradle.internal.DefaultTestBinaryConfig) AGENT_OUTPUT_FOLDER(org.graalvm.buildtools.utils.SharedConstants.AGENT_OUTPUT_FOLDER) JavaToolchainService(org.gradle.jvm.toolchain.JavaToolchainService) AgentConfiguration(org.graalvm.buildtools.gradle.dsl.AgentConfiguration) Callable(java.util.concurrent.Callable) AbstractArchiveTask(org.gradle.api.tasks.bundling.AbstractArchiveTask) FileCollection(org.gradle.api.file.FileCollection) CommandLineArgumentProvider(org.gradle.process.CommandLineArgumentProvider) SourceSet(org.gradle.api.tasks.SourceSet) Inject(javax.inject.Inject) Configuration(org.gradle.api.artifacts.Configuration) LifecycleBasePlugin(org.gradle.language.base.plugins.LifecycleBasePlugin) VersionInfo(org.graalvm.buildtools.VersionInfo) AttributeContainer(org.gradle.api.attributes.AttributeContainer) Attribute(org.gradle.api.attributes.Attribute) DirectoryProperty(org.gradle.api.file.DirectoryProperty) SourceSetContainer(org.gradle.api.tasks.SourceSetContainer) ProcessGeneratedGraalResourceFiles(org.graalvm.buildtools.gradle.internal.ProcessGeneratedGraalResourceFiles) Directory(org.gradle.api.file.Directory) JvmReachabilityMetadataRepositoryExtension(org.graalvm.buildtools.gradle.dsl.JvmReachabilityMetadataRepositoryExtension) Test(org.gradle.api.tasks.testing.Test) FileSystemLocation(org.gradle.api.file.FileSystemLocation) FileSystemOperations(org.gradle.api.file.FileSystemOperations) BaseNativeImageOptions(org.graalvm.buildtools.gradle.internal.BaseNativeImageOptions) Jar(org.gradle.api.tasks.bundling.Jar) AGENT_PROPERTY(org.graalvm.buildtools.utils.SharedConstants.AGENT_PROPERTY) Action(org.gradle.api.Action) JavaPluginConvention(org.gradle.api.plugins.JavaPluginConvention) AgentCommandLineProvider(org.graalvm.buildtools.gradle.internal.AgentCommandLineProvider) NativeRunTask(org.graalvm.buildtools.gradle.tasks.NativeRunTask) ExecOperations(org.gradle.process.ExecOperations) DeprecatedNativeImageOptions(org.graalvm.buildtools.gradle.internal.DeprecatedNativeImageOptions) JavaApplication(org.gradle.api.plugins.JavaApplication) File(java.io.File) Consumer(java.util.function.Consumer) ObjectFactory(org.gradle.api.model.ObjectFactory) GradleUtils.transitiveProjectArtifacts(org.graalvm.buildtools.gradle.internal.GradleUtils.transitiveProjectArtifacts) Property(org.gradle.api.provider.Property) DefaultGraalVmExtension(org.graalvm.buildtools.gradle.internal.DefaultGraalVmExtension) JavaExec(org.gradle.api.tasks.JavaExec) JvmReachabilityMetadataService(org.graalvm.buildtools.gradle.internal.JvmReachabilityMetadataService) Collections(java.util.Collections) Plugin(org.gradle.api.Plugin) BuildNativeImageTask(org.graalvm.buildtools.gradle.tasks.BuildNativeImageTask) Task(org.gradle.api.Task) AbstractArchiveTask(org.gradle.api.tasks.bundling.AbstractArchiveTask) NativeRunTask(org.graalvm.buildtools.gradle.tasks.NativeRunTask) AgentCommandLineProvider(org.graalvm.buildtools.gradle.internal.AgentCommandLineProvider) ConfigurableFileCollection(org.gradle.api.file.ConfigurableFileCollection) ProcessGeneratedGraalResourceFiles(org.graalvm.buildtools.gradle.internal.ProcessGeneratedGraalResourceFiles) OutputDirectory(org.gradle.api.tasks.OutputDirectory) Directory(org.gradle.api.file.Directory)

Example 3 with NativeImageOptions

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

the class NativeImageCommandLineProvider method asArguments.

@Override
public List<String> asArguments() {
    NativeImageOptions options = getOptions().get();
    List<String> cliArgs = new ArrayList<>(20);
    cliArgs.add("-cp");
    String classpathString = buildClasspathString(options);
    cliArgs.add(classpathString);
    appendBooleanOption(cliArgs, options.getDebug(), "-H:GenerateDebugInfo=1");
    appendBooleanOption(cliArgs, options.getFallback().map(NEGATE), "--no-fallback");
    appendBooleanOption(cliArgs, options.getVerbose(), "--verbose");
    appendBooleanOption(cliArgs, options.getSharedLibrary(), "--shared");
    if (getOutputDirectory().isPresent()) {
        cliArgs.add("-H:Path=" + getOutputDirectory().get());
    }
    cliArgs.add("-H:Name=" + getExecutableName().get());
    options.getSystemProperties().get().forEach((n, v) -> {
        if (v != null) {
            cliArgs.add("-D" + n + "=\"" + v + "\"");
        }
    });
    options.getJvmArgs().get().forEach(jvmArg -> cliArgs.add("-J" + jvmArg));
    String configFiles = options.getConfigurationFileDirectories().getElements().get().stream().map(FileSystemLocation::getAsFile).map(File::getAbsolutePath).collect(Collectors.joining(","));
    if (!configFiles.isEmpty()) {
        cliArgs.add("-H:ConfigurationFileDirectories=" + configFiles);
    }
    if (getAgentEnabled().get()) {
        cliArgs.add("--allow-incomplete-classpath");
    }
    if (options.getMainClass().isPresent()) {
        cliArgs.add("-H:Class=" + options.getMainClass().get());
    }
    cliArgs.addAll(options.getBuildArgs().get());
    if (useArgFile.getOrElse(true)) {
        return NativeImageUtils.convertToArgsFile(cliArgs);
    }
    return Collections.unmodifiableList(cliArgs);
}
Also used : NativeImageOptions(org.graalvm.buildtools.gradle.dsl.NativeImageOptions) FileSystemLocation(org.gradle.api.file.FileSystemLocation) ArrayList(java.util.ArrayList)

Example 4 with NativeImageOptions

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

the class BuildNativeImageTask method exec.

@TaskAction
@SuppressWarnings("ConstantConditions")
public void exec() {
    List<String> args = buildActualCommandLineArgs();
    NativeImageOptions options = getOptions().get();
    GraalVMLogger logger = GraalVMLogger.of(getLogger());
    if (options.getVerbose().get()) {
        logger.lifecycle("Args are: " + args);
    }
    File executablePath = NativeImageExecutableLocator.findNativeImageExecutable(options, getDisableToolchainDetection(), getGraalVMHome(), getExecOperations(), logger);
    logger.lifecycle("Using executable path: " + executablePath);
    String executable = executablePath.getAbsolutePath();
    File outputDir = getOutputDirectory().getAsFile().get();
    if (outputDir.isDirectory() || outputDir.mkdirs()) {
        getExecOperations().exec(spec -> {
            spec.setWorkingDir(getWorkingDirectory());
            if (getTestListDirectory().isPresent()) {
                NativeImagePlugin.TrackingDirectorySystemPropertyProvider directoryProvider = getObjects().newInstance(NativeImagePlugin.TrackingDirectorySystemPropertyProvider.class);
                directoryProvider.getDirectory().set(getTestListDirectory());
                spec.getArgumentProviders().add(directoryProvider);
            }
            spec.args(args);
            getService().get();
            spec.setExecutable(executable);
        });
        logger.lifecycle("Native Image written to: " + outputDir);
    }
}
Also used : NativeImageOptions(org.graalvm.buildtools.gradle.dsl.NativeImageOptions) GraalVMLogger(org.graalvm.buildtools.gradle.internal.GraalVMLogger) File(java.io.File) RegularFile(org.gradle.api.file.RegularFile) InputFile(org.gradle.api.tasks.InputFile) NativeImagePlugin(org.graalvm.buildtools.gradle.NativeImagePlugin) TaskAction(org.gradle.api.tasks.TaskAction)

Example 5 with NativeImageOptions

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

the class NativeImagePlugin method configureJvmReachabilityConfigurationDirectories.

private void configureJvmReachabilityConfigurationDirectories(Project project, GraalVMExtension graalExtension, NativeImageOptions options, SourceSet sourceSet) {
    JvmReachabilityMetadataRepositoryExtension repositoryExtension = reachabilityExtensionOn(graalExtension);
    Provider<JvmReachabilityMetadataService> serviceProvider = project.getGradle().getSharedServices().registerIfAbsent("nativeConfigurationService", JvmReachabilityMetadataService.class, spec -> {
        LogLevel logLevel = determineLogLevel();
        spec.getParameters().getLogLevel().set(logLevel);
        spec.getParameters().getUri().set(repositoryExtension.getUri());
        spec.getParameters().getCacheDir().set(new File(project.getGradle().getGradleUserHomeDir(), "native-build-tools/repositories"));
    });
    options.getConfigurationFileDirectories().from(repositoryExtension.getEnabled().flatMap(enabled -> {
        if (enabled) {
            if (repositoryExtension.getUri().isPresent()) {
                Configuration classpath = project.getConfigurations().getByName(sourceSet.getRuntimeClasspathConfigurationName());
                Set<String> excludedModules = repositoryExtension.getExcludedModules().getOrElse(Collections.emptySet());
                Map<String, String> forcedVersions = repositoryExtension.getModuleToConfigVersion().getOrElse(Collections.emptyMap());
                return serviceProvider.map(repo -> repo.findConfigurationDirectoriesFor(query -> classpath.getIncoming().getResolutionResult().allComponents(component -> {
                    ModuleVersionIdentifier moduleVersion = component.getModuleVersion();
                    String module = moduleVersion.getGroup() + ":" + moduleVersion.getName();
                    if (!excludedModules.contains(module)) {
                        query.forArtifact(artifact -> {
                            artifact.gav(module + ":" + moduleVersion.getVersion());
                            if (forcedVersions.containsKey(module)) {
                                artifact.forceConfigVersion(forcedVersions.get(module));
                            }
                        });
                    }
                    query.useLatestConfigWhenVersionIsUntested();
                })).stream().map(Path::toAbsolutePath).map(Path::toFile).collect(Collectors.toList()));
            }
        }
        return project.getProviders().provider(Collections::emptySet);
    }));
}
Also used : GradleUtils(org.graalvm.buildtools.gradle.internal.GradleUtils) ConfigurableFileCollection(org.gradle.api.file.ConfigurableFileCollection) Arrays(java.util.Arrays) NativeImageExecutableLocator.graalvmHomeProvider(org.graalvm.buildtools.gradle.internal.NativeImageExecutableLocator.graalvmHomeProvider) BuildNativeImageTask(org.graalvm.buildtools.gradle.tasks.BuildNativeImageTask) URISyntaxException(java.net.URISyntaxException) ListProperty(org.gradle.api.provider.ListProperty) JavaPlugin(org.gradle.api.plugins.JavaPlugin) NamedDomainObjectContainer(org.gradle.api.NamedDomainObjectContainer) NativeConfigurations(org.graalvm.buildtools.gradle.internal.NativeConfigurations) ApplicationPlugin(org.gradle.api.plugins.ApplicationPlugin) OutputDirectory(org.gradle.api.tasks.OutputDirectory) Task(org.gradle.api.Task) Provider(org.gradle.api.provider.Provider) ModuleVersionIdentifier(org.gradle.api.artifacts.ModuleVersionIdentifier) ConfigurationContainer(org.gradle.api.artifacts.ConfigurationContainer) TaskProvider(org.gradle.api.tasks.TaskProvider) NativeImageOptions(org.graalvm.buildtools.gradle.dsl.NativeImageOptions) Locale(java.util.Locale) Map(java.util.Map) DuplicatesStrategy(org.gradle.api.file.DuplicatesStrategy) ExtensionAware(org.gradle.api.plugins.ExtensionAware) GraalVMExtension(org.graalvm.buildtools.gradle.dsl.GraalVMExtension) URI(java.net.URI) Path(java.nio.file.Path) LogLevel(org.gradle.api.logging.LogLevel) Project(org.gradle.api.Project) SharedConstants(org.graalvm.buildtools.utils.SharedConstants) GenerateResourcesConfigFile(org.graalvm.buildtools.gradle.tasks.GenerateResourcesConfigFile) GraalVMLogger(org.graalvm.buildtools.gradle.internal.GraalVMLogger) Set(java.util.Set) JavaForkOptions(org.gradle.process.JavaForkOptions) GFileUtils(org.gradle.util.GFileUtils) Collectors(java.util.stream.Collectors) TaskContainer(org.gradle.api.tasks.TaskContainer) ArchiveOperations(org.gradle.api.file.ArchiveOperations) DefaultTestBinaryConfig(org.graalvm.buildtools.gradle.internal.DefaultTestBinaryConfig) AGENT_OUTPUT_FOLDER(org.graalvm.buildtools.utils.SharedConstants.AGENT_OUTPUT_FOLDER) JavaToolchainService(org.gradle.jvm.toolchain.JavaToolchainService) AgentConfiguration(org.graalvm.buildtools.gradle.dsl.AgentConfiguration) Callable(java.util.concurrent.Callable) AbstractArchiveTask(org.gradle.api.tasks.bundling.AbstractArchiveTask) FileCollection(org.gradle.api.file.FileCollection) CommandLineArgumentProvider(org.gradle.process.CommandLineArgumentProvider) SourceSet(org.gradle.api.tasks.SourceSet) Inject(javax.inject.Inject) Configuration(org.gradle.api.artifacts.Configuration) LifecycleBasePlugin(org.gradle.language.base.plugins.LifecycleBasePlugin) VersionInfo(org.graalvm.buildtools.VersionInfo) AttributeContainer(org.gradle.api.attributes.AttributeContainer) Attribute(org.gradle.api.attributes.Attribute) DirectoryProperty(org.gradle.api.file.DirectoryProperty) SourceSetContainer(org.gradle.api.tasks.SourceSetContainer) ProcessGeneratedGraalResourceFiles(org.graalvm.buildtools.gradle.internal.ProcessGeneratedGraalResourceFiles) Directory(org.gradle.api.file.Directory) JvmReachabilityMetadataRepositoryExtension(org.graalvm.buildtools.gradle.dsl.JvmReachabilityMetadataRepositoryExtension) Test(org.gradle.api.tasks.testing.Test) FileSystemLocation(org.gradle.api.file.FileSystemLocation) FileSystemOperations(org.gradle.api.file.FileSystemOperations) BaseNativeImageOptions(org.graalvm.buildtools.gradle.internal.BaseNativeImageOptions) Jar(org.gradle.api.tasks.bundling.Jar) AGENT_PROPERTY(org.graalvm.buildtools.utils.SharedConstants.AGENT_PROPERTY) Action(org.gradle.api.Action) JavaPluginConvention(org.gradle.api.plugins.JavaPluginConvention) AgentCommandLineProvider(org.graalvm.buildtools.gradle.internal.AgentCommandLineProvider) NativeRunTask(org.graalvm.buildtools.gradle.tasks.NativeRunTask) ExecOperations(org.gradle.process.ExecOperations) DeprecatedNativeImageOptions(org.graalvm.buildtools.gradle.internal.DeprecatedNativeImageOptions) JavaApplication(org.gradle.api.plugins.JavaApplication) File(java.io.File) Consumer(java.util.function.Consumer) ObjectFactory(org.gradle.api.model.ObjectFactory) GradleUtils.transitiveProjectArtifacts(org.graalvm.buildtools.gradle.internal.GradleUtils.transitiveProjectArtifacts) Property(org.gradle.api.provider.Property) DefaultGraalVmExtension(org.graalvm.buildtools.gradle.internal.DefaultGraalVmExtension) JavaExec(org.gradle.api.tasks.JavaExec) JvmReachabilityMetadataService(org.graalvm.buildtools.gradle.internal.JvmReachabilityMetadataService) Collections(java.util.Collections) Plugin(org.gradle.api.Plugin) ModuleVersionIdentifier(org.gradle.api.artifacts.ModuleVersionIdentifier) Path(java.nio.file.Path) Set(java.util.Set) SourceSet(org.gradle.api.tasks.SourceSet) AgentConfiguration(org.graalvm.buildtools.gradle.dsl.AgentConfiguration) Configuration(org.gradle.api.artifacts.Configuration) JvmReachabilityMetadataRepositoryExtension(org.graalvm.buildtools.gradle.dsl.JvmReachabilityMetadataRepositoryExtension) JvmReachabilityMetadataService(org.graalvm.buildtools.gradle.internal.JvmReachabilityMetadataService) GenerateResourcesConfigFile(org.graalvm.buildtools.gradle.tasks.GenerateResourcesConfigFile) File(java.io.File) Map(java.util.Map) LogLevel(org.gradle.api.logging.LogLevel)

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