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 http://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
.Plugin
;
11 import org
.gradle
.api
.Project
;
14 * The YoSQL Gradle plugin. It configures the {@link YoSqlExtension} and registers the {@link GenerateTask}.
16 public class YoSqlPlugin
implements Plugin
<Project
> {
19 public void apply(final Project project
) {
20 final var extension
= project
.getExtensions().create("yosql", YoSqlExtension
.class);
22 project
.getTasks().register("generateJavaCode", GenerateTask
.class, task
->
23 task
.getFiles().set(extension
.files()));