use of io.micronaut.starter.build.BuildProperties in project micronaut-starter by micronaut-projects.
the class ApplicationFeature method apply.
@Override
default void apply(GeneratorContext generatorContext) {
if (generatorContext.getBuildTool() == BuildTool.MAVEN) {
String mainClass = mainClassName(generatorContext);
if (mainClass != null) {
BuildProperties buildProperties = generatorContext.getBuildProperties();
buildProperties.put("exec.mainClass", mainClass);
buildProperties.put("packaging", DEFAULT_PACKAGING);
}
}
}
use of io.micronaut.starter.build.BuildProperties in project micronaut-starter by micronaut-projects.
the class AbstractAzureFunction method apply.
@Override
public void apply(GeneratorContext generatorContext) {
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
ApplicationType type = generatorContext.getApplicationType();
generatorContext.addTemplate("host.json", new URLTemplate("host.json", classLoader.getResource("functions/azure/host.json")));
generatorContext.addTemplate("local.settings.json", new URLTemplate("local.settings.json", classLoader.getResource("functions/azure/local.settings.json")));
BuildTool buildTool = generatorContext.getBuildTool();
Project project = generatorContext.getProject();
if (buildTool == BuildTool.MAVEN) {
BuildProperties props = generatorContext.getBuildProperties();
props.put("functionAppName", project.getName());
props.put("functionAppRegion", "westus");
props.put("functionResourceGroup", "java-functions-group");
props.put("stagingDirectory", "${project.build.directory}/azure-functions/${functionAppName}");
}
addFunctionTemplate(generatorContext, project);
applyFunction(generatorContext, type);
}
Aggregations