use of org.graalvm.buildtools.gradle.internal.DefaultGraalVmExtension in project native-build-tools by graalvm.
the class NativeImagePlugin method apply.
@Override
public void apply(Project project) {
Provider<NativeImageService> nativeImageServiceProvider = NativeImageService.registerOn(project);
logger = GraalVMLogger.of(project.getLogger());
DefaultGraalVmExtension graalExtension = (DefaultGraalVmExtension) registerGraalVMExtension(project);
graalExtension.getUseArgFile().convention(true);
project.getPlugins().withType(JavaPlugin.class, javaPlugin -> configureJavaProject(project, nativeImageServiceProvider, graalExtension));
project.afterEvaluate(p -> {
Map<String, Provider<Boolean>> agents = graalExtension.getAgentProperties();
graalExtension.getBinaries().all(options -> {
AgentConfiguration agentConfiguration = options.getAgent();
if (agentConfiguration.getInstrumentedTask().isPresent()) {
configureAgent(p, agents, graalExtension.getToolchainDetection().map(b -> !b), options, getExecOperations(), getFileOperations());
}
});
});
}
Aggregations