add missing names configuration
[yosql.git] / yosql-tooling / yosql-tooling-gradle / src / main / java / wtf / metio / yosql / tooling / gradle / GenerateTaskConfiguration.java
blob55610ff7f119e4a2a1a3a2f910b9f9cb35d4047d
1 /*
2 * This file is part of yosql. It is subject to the license terms in the LICENSE file found in the top-level
3 * directory of this distribution and at https://creativecommons.org/publicdomain/zero/1.0/. No part of yosql,
4 * including this file, may be copied, modified, propagated, or distributed except according to the terms contained
5 * in the LICENSE file.
6 */
8 package wtf.metio.yosql.tooling.gradle;
10 import org.gradle.api.Action;
11 import wtf.metio.yosql.models.immutables.RuntimeConfiguration;
13 public class GenerateTaskConfiguration implements Action<GenerateTask> {
15 private final YoSqlExtension extension;
17 public GenerateTaskConfiguration(final YoSqlExtension extension) {
18 this.extension = extension;
21 @Override
22 public void execute(final GenerateTask task) {
23 task.getRuntimeConfiguration().set(RuntimeConfiguration.builder()
24 .setAnnotations(extension.getAnnotations().asConfiguration())
25 .setConverter(extension.getConverter().asConfiguration())
26 .setFiles(extension.getFiles().asConfiguration())
27 .setJava(extension.getJava().asConfiguration())
28 .setLogging(extension.getLogging().asConfiguration())
29 .setNames(extension.getNames().asConfiguration())
30 .setRepositories(extension.getRepositories().asConfiguration())
31 .setResources(extension.getResources().asConfiguration())
32 .build());