org.dbtools.plugin.tasks.InitTask Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-dbtools-plugin Show documentation
Show all versions of gradle-dbtools-plugin Show documentation
DBTools ORM Class Generator.
package org.dbtools.plugin.tasks;
import org.dbtools.gen.DBToolsInit;
import org.dbtools.plugin.extensions.DBToolsExtension;
import org.gradle.api.DefaultTask;
import org.gradle.api.tasks.TaskAction;
public class InitTask extends DefaultTask {
@TaskAction
public void init() {
DBToolsExtension dbExt = (DBToolsExtension) getProject().getExtensions().findByName("dbtools");
DBToolsInit dbToolsInit = new DBToolsInit();
dbToolsInit.initDBTools(dbExt.getSchemaDir());
}
}