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
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
;
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())