Introduce Settings container in AbstractAotProcessor

See gh-29266
This commit is contained in:
Sam Brannen
2022-10-10 18:41:42 +02:00
parent 7b4ff5ea74
commit cad7444afa
5 changed files with 159 additions and 94 deletions

View File

@@ -118,14 +118,23 @@ class ContextAotProcessorTests {
private static class DemoContextAotProcessor extends ContextAotProcessor {
DemoContextAotProcessor(Class<?> application,
Path sourceOutput, Path resourceOutput, Path classOutput) {
super(application, sourceOutput, resourceOutput, classOutput, "com.example", "example");
DemoContextAotProcessor(Class<?> application, Path rootPath) {
this(application, rootPath.resolve("source"), rootPath.resolve("resource"), rootPath.resolve("class"));
}
DemoContextAotProcessor(Class<?> application, Path rootPath) {
super(application, rootPath.resolve("source"), rootPath.resolve("resource"),
rootPath.resolve("class"), "com.example", "example");
DemoContextAotProcessor(Class<?> application, Path sourceOutput, Path resourceOutput, Path classOutput) {
super(application, createSettings(sourceOutput, resourceOutput, classOutput, "com.example", "example"));
}
private static Settings createSettings(Path sourceOutput, Path resourceOutput,
Path classOutput, String groupId, String artifactId) {
Settings settings = new Settings();
settings.setSourceOutput(sourceOutput);
settings.setResourceOutput(resourceOutput);
settings.setClassOutput(classOutput);
settings.setArtifactId(artifactId);
settings.setGroupId(groupId);
return settings;
}
@Override