-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from ergon/feature/sequence-metamodel-generation
Feature/sequence metamodel generation
- Loading branch information
Showing
6 changed files
with
309 additions
and
302 deletions.
There are no files selected for viewing
87 changes: 42 additions & 45 deletions
87
gradle-plugin/src/main/java/ch/ergon/adam/gradleplugin/tasks/GenerateJooqMetamodelTask.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,66 @@ | ||
package ch.ergon.adam.gradleplugin.tasks; | ||
|
||
import java.nio.file.Path; | ||
import java.nio.file.Paths; | ||
|
||
import ch.ergon.adam.gradleplugin.util.AdamJooqMetamodelGenerator; | ||
import org.gradle.api.DefaultTask; | ||
import org.gradle.api.file.Directory; | ||
import org.gradle.api.tasks.Input; | ||
import org.gradle.api.tasks.Optional; | ||
import org.gradle.api.tasks.TaskAction; | ||
|
||
import ch.ergon.adam.gradleplugin.util.AdamJooqMetamodelGenerator; | ||
import java.nio.file.Path; | ||
|
||
public class GenerateJooqMetamodelTask extends DefaultTask { | ||
|
||
@Input | ||
@Optional | ||
private String jooqConfig; | ||
@Input | ||
@Optional | ||
private String jooqConfig; | ||
|
||
@Input | ||
private String packageName; | ||
@Input | ||
private String packageName; | ||
|
||
@Input | ||
private String outputPath; | ||
@Input | ||
private String outputPath; | ||
|
||
@Input | ||
private String source; | ||
@Input | ||
private String source; | ||
|
||
@TaskAction | ||
public void generateJooqMetamodel() throws Exception { | ||
Path output = getProject().getLayout().getProjectDirectory().dir(outputPath).getAsFile().toPath(); | ||
AdamJooqMetamodelGenerator generator = new AdamJooqMetamodelGenerator(packageName, output, getSource(), | ||
jooqConfig); | ||
generator.run(); | ||
} | ||
@TaskAction | ||
public void generateJooqMetamodel() throws Exception { | ||
Path output = getProject().getLayout().getProjectDirectory().dir(outputPath).getAsFile().toPath(); | ||
AdamJooqMetamodelGenerator generator = new AdamJooqMetamodelGenerator(packageName, output, getSource(), | ||
jooqConfig); | ||
generator.run(); | ||
} | ||
|
||
public String getJooqConfig() { | ||
return jooqConfig; | ||
} | ||
public String getJooqConfig() { | ||
return jooqConfig; | ||
} | ||
|
||
public void setJooqConfig(String jooqConfig) { | ||
this.jooqConfig = jooqConfig; | ||
} | ||
public void setJooqConfig(String jooqConfig) { | ||
this.jooqConfig = jooqConfig; | ||
} | ||
|
||
public String getPackageName() { | ||
return packageName; | ||
} | ||
public String getPackageName() { | ||
return packageName; | ||
} | ||
|
||
public void setPackageName(String packageName) { | ||
this.packageName = packageName; | ||
} | ||
public void setPackageName(String packageName) { | ||
this.packageName = packageName; | ||
} | ||
|
||
public String getOutputPath() { | ||
return outputPath; | ||
} | ||
public String getOutputPath() { | ||
return outputPath; | ||
} | ||
|
||
public void setOutputPath(String outputPath) { | ||
this.outputPath = outputPath; | ||
} | ||
public void setOutputPath(String outputPath) { | ||
this.outputPath = outputPath; | ||
} | ||
|
||
public String getSource() { | ||
return source; | ||
} | ||
public String getSource() { | ||
return source; | ||
} | ||
|
||
public void setSource(String source) { | ||
this.source = source; | ||
} | ||
public void setSource(String source) { | ||
this.source = source; | ||
} | ||
|
||
} |
Oops, something went wrong.