FINERACT-2181: Make 'staticWeaveJPA' gradle task cacheable
This commit is contained in:
committed by
Arnold Gálovics
parent
5a7d2d42f9
commit
dd2c29fb91
@@ -0,0 +1,66 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.apache.fineract.gradle
|
||||
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.file.DirectoryProperty
|
||||
import org.gradle.api.file.RegularFileProperty
|
||||
import org.gradle.api.tasks.CacheableTask
|
||||
import org.gradle.api.tasks.InputDirectory
|
||||
import org.gradle.api.tasks.InputFile
|
||||
import org.gradle.api.tasks.OutputDirectory
|
||||
import org.gradle.api.tasks.PathSensitive
|
||||
import org.gradle.api.tasks.PathSensitivity
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.StandardCopyOption
|
||||
|
||||
@CacheableTask
|
||||
abstract class StaticWeaveJpaTask extends DefaultTask {
|
||||
|
||||
@InputDirectory
|
||||
@PathSensitive(PathSensitivity.RELATIVE)
|
||||
final DirectoryProperty inputClasses = project.objects.directoryProperty()
|
||||
|
||||
@InputFile
|
||||
@PathSensitive(PathSensitivity.RELATIVE)
|
||||
final RegularFileProperty persistenceXml = project.objects.fileProperty()
|
||||
|
||||
@OutputDirectory
|
||||
final DirectoryProperty outputDir = project.objects.directoryProperty()
|
||||
|
||||
@TaskAction
|
||||
void weave() {
|
||||
File weavingRoot = new File(temporaryDir, "static-weaving")
|
||||
File metaInf = new File(weavingRoot, "META-INF")
|
||||
metaInf.mkdirs()
|
||||
Files.copy(persistenceXml.get().asFile.toPath(), new File(metaInf, "persistence.xml").toPath(), StandardCopyOption.REPLACE_EXISTING)
|
||||
|
||||
project.javaexec {
|
||||
mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave")
|
||||
classpath = project.sourceSets.main.runtimeClasspath
|
||||
args = [
|
||||
"-persistenceinfo", weavingRoot.absolutePath,
|
||||
inputClasses.get().asFile.absolutePath,
|
||||
outputDir.get().asFile.absolutePath
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,30 +16,18 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import org.apache.fineract.gradle.StaticWeaveJpaTask
|
||||
description = 'Fineract Accounting'
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
tasks.register('staticWeaveJpa', JavaExec) {
|
||||
tasks.register("staticWeaveJpa", StaticWeaveJpaTask) {
|
||||
dependsOn classes
|
||||
|
||||
def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile
|
||||
def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile
|
||||
def persistenceInfo = layout.buildDirectory.dir('static-weaving').get()
|
||||
copy {
|
||||
from file("src/main/resources/jpa/static-weaving/module/accounting/persistence.xml")
|
||||
into "${persistenceInfo}/META-INF/"
|
||||
}
|
||||
|
||||
mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave")
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
|
||||
args = [
|
||||
'-persistenceinfo', persistenceInfo,
|
||||
classesDir.absolutePath,
|
||||
outputDir.absolutePath
|
||||
]
|
||||
inputClasses.set(layout.buildDirectory.dir("classes/java/main").get())
|
||||
persistenceXml.set(file("src/main/resources/jpa/static-weaving/module/accounting/persistence.xml"))
|
||||
outputDir.set(layout.buildDirectory.dir("weaved-classes").get())
|
||||
}
|
||||
|
||||
tasks.register("weavedJar", Jar) {
|
||||
|
||||
@@ -16,30 +16,18 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import org.apache.fineract.gradle.StaticWeaveJpaTask
|
||||
description = 'Fineract Branch'
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
tasks.register('staticWeaveJpa', JavaExec) {
|
||||
tasks.register("staticWeaveJpa", StaticWeaveJpaTask) {
|
||||
dependsOn classes
|
||||
|
||||
def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile
|
||||
def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile
|
||||
def persistenceInfo = layout.buildDirectory.dir('static-weaving').get()
|
||||
copy {
|
||||
from file("src/main/resources/jpa/static-weaving/module/branch/persistence.xml")
|
||||
into "${persistenceInfo}/META-INF/"
|
||||
}
|
||||
|
||||
mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave")
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
|
||||
args = [
|
||||
'-persistenceinfo', persistenceInfo,
|
||||
classesDir.absolutePath,
|
||||
outputDir.absolutePath
|
||||
]
|
||||
inputClasses.set(layout.buildDirectory.dir("classes/java/main").get())
|
||||
persistenceXml.set(file("src/main/resources/jpa/static-weaving/module/branch/persistence.xml"))
|
||||
outputDir.set(layout.buildDirectory.dir("weaved-classes").get())
|
||||
}
|
||||
|
||||
|
||||
@@ -72,6 +60,8 @@ compileJava {
|
||||
|
||||
// Configuration for Swagger documentation generation task
|
||||
// https://github.com/swagger-api/swagger-core/tree/master/modules/swagger-gradle-plugin
|
||||
|
||||
import org.apache.fineract.gradle.StaticWeaveJpaTask
|
||||
import org.apache.tools.ant.filters.ReplaceTokens
|
||||
|
||||
|
||||
|
||||
@@ -16,30 +16,18 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import org.apache.fineract.gradle.StaticWeaveJpaTask
|
||||
description = 'Fineract Charge'
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
tasks.register('staticWeaveJpa', JavaExec) {
|
||||
tasks.register("staticWeaveJpa", StaticWeaveJpaTask) {
|
||||
dependsOn classes
|
||||
|
||||
def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile
|
||||
def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile
|
||||
def persistenceInfo = layout.buildDirectory.dir('static-weaving').get()
|
||||
copy {
|
||||
from file("src/main/resources/jpa/static-weaving/module/charge/persistence.xml")
|
||||
into "${persistenceInfo}/META-INF/"
|
||||
}
|
||||
|
||||
mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave")
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
|
||||
args = [
|
||||
'-persistenceinfo', persistenceInfo,
|
||||
classesDir.absolutePath,
|
||||
outputDir.absolutePath
|
||||
]
|
||||
inputClasses.set(layout.buildDirectory.dir("classes/java/main").get())
|
||||
persistenceXml.set(file("src/main/resources/jpa/static-weaving/module/charge/persistence.xml"))
|
||||
outputDir.set(layout.buildDirectory.dir("weaved-classes").get())
|
||||
}
|
||||
|
||||
|
||||
@@ -72,6 +60,8 @@ compileJava {
|
||||
|
||||
// Configuration for Swagger documentation generation task
|
||||
// https://github.com/swagger-api/swagger-core/tree/master/modules/swagger-gradle-plugin
|
||||
|
||||
import org.apache.fineract.gradle.StaticWeaveJpaTask
|
||||
import org.apache.tools.ant.filters.ReplaceTokens
|
||||
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import org.apache.fineract.gradle.StaticWeaveJpaTask
|
||||
description = 'Fineract Command'
|
||||
|
||||
apply plugin: 'java'
|
||||
@@ -81,25 +82,12 @@ jmh {
|
||||
benchmarkMode = ['thrpt'] // Default benchmark mode
|
||||
}
|
||||
|
||||
tasks.register('staticWeaveJpa', JavaExec) {
|
||||
tasks.register("staticWeaveJpa", StaticWeaveJpaTask) {
|
||||
dependsOn classes
|
||||
|
||||
def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile
|
||||
def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile
|
||||
def persistenceInfo = layout.buildDirectory.dir('static-weaving').get()
|
||||
copy {
|
||||
from file("src/main/resources/jpa/static-weaving/module/command/persistence.xml")
|
||||
into "${persistenceInfo}/META-INF/"
|
||||
}
|
||||
|
||||
mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave")
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
|
||||
args = [
|
||||
'-persistenceinfo', persistenceInfo,
|
||||
classesDir.absolutePath,
|
||||
outputDir.absolutePath
|
||||
]
|
||||
inputClasses.set(layout.buildDirectory.dir("classes/java/main").get())
|
||||
persistenceXml.set(file("src/main/resources/jpa/static-weaving/module/command/persistence.xml"))
|
||||
outputDir.set(layout.buildDirectory.dir("weaved-classes").get())
|
||||
}
|
||||
|
||||
tasks.register("weavedJar", Jar) {
|
||||
|
||||
@@ -16,30 +16,18 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import org.apache.fineract.gradle.StaticWeaveJpaTask
|
||||
description = 'Fineract Core'
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
tasks.register('staticWeaveJpa', JavaExec) {
|
||||
tasks.register("staticWeaveJpa", StaticWeaveJpaTask) {
|
||||
dependsOn classes
|
||||
|
||||
def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile
|
||||
def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile
|
||||
def persistenceInfo = layout.buildDirectory.dir('static-weaving').get()
|
||||
copy {
|
||||
from file("src/main/resources/jpa/static-weaving/module/core/persistence.xml")
|
||||
into "${persistenceInfo}/META-INF/"
|
||||
}
|
||||
|
||||
mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave")
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
|
||||
args = [
|
||||
'-persistenceinfo', persistenceInfo,
|
||||
classesDir.absolutePath,
|
||||
outputDir.absolutePath
|
||||
]
|
||||
inputClasses.set(layout.buildDirectory.dir("classes/java/main").get())
|
||||
persistenceXml.set(file("src/main/resources/jpa/static-weaving/module/core/persistence.xml"))
|
||||
outputDir.set(layout.buildDirectory.dir("weaved-classes").get())
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -16,30 +16,18 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import org.apache.fineract.gradle.StaticWeaveJpaTask
|
||||
description = 'Fineract Document'
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
tasks.register('staticWeaveJpa', JavaExec) {
|
||||
tasks.register("staticWeaveJpa", StaticWeaveJpaTask) {
|
||||
dependsOn classes
|
||||
|
||||
def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile
|
||||
def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile
|
||||
def persistenceInfo = layout.buildDirectory.dir('static-weaving').get()
|
||||
copy {
|
||||
from file("src/main/resources/jpa/static-weaving/module/document/persistence.xml")
|
||||
into "${persistenceInfo}/META-INF/"
|
||||
}
|
||||
|
||||
mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave")
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
|
||||
args = [
|
||||
'-persistenceinfo', persistenceInfo,
|
||||
classesDir.absolutePath,
|
||||
outputDir.absolutePath
|
||||
]
|
||||
inputClasses.set(layout.buildDirectory.dir("classes/java/main").get())
|
||||
persistenceXml.set(file("src/main/resources/jpa/static-weaving/module/document/persistence.xml"))
|
||||
outputDir.set(layout.buildDirectory.dir("weaved-classes").get())
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -16,30 +16,18 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import org.apache.fineract.gradle.StaticWeaveJpaTask
|
||||
description = 'Fineract Investor'
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
tasks.register('staticWeaveJpa', JavaExec) {
|
||||
tasks.register("staticWeaveJpa", StaticWeaveJpaTask) {
|
||||
dependsOn classes
|
||||
|
||||
def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile
|
||||
def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile
|
||||
def persistenceInfo = layout.buildDirectory.dir('static-weaving').get()
|
||||
copy {
|
||||
from file("src/main/resources/jpa/static-weaving/module/investor/persistence.xml")
|
||||
into "${persistenceInfo}/META-INF/"
|
||||
}
|
||||
|
||||
mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave")
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
|
||||
args = [
|
||||
'-persistenceinfo', persistenceInfo,
|
||||
classesDir.absolutePath,
|
||||
outputDir.absolutePath
|
||||
]
|
||||
inputClasses.set(layout.buildDirectory.dir("classes/java/main").get())
|
||||
persistenceXml.set(file("src/main/resources/jpa/static-weaving/module/investor/persistence.xml"))
|
||||
outputDir.set(layout.buildDirectory.dir("weaved-classes").get())
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -16,30 +16,18 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import org.apache.fineract.gradle.StaticWeaveJpaTask
|
||||
description = 'Fineract Loan'
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
tasks.register('staticWeaveJpa', JavaExec) {
|
||||
tasks.register("staticWeaveJpa", StaticWeaveJpaTask) {
|
||||
dependsOn classes
|
||||
|
||||
def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile
|
||||
def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile
|
||||
def persistenceInfo = layout.buildDirectory.dir('static-weaving').get()
|
||||
copy {
|
||||
from file("src/main/resources/jpa/static-weaving/module/loan/persistence.xml")
|
||||
into "${persistenceInfo}/META-INF/"
|
||||
}
|
||||
|
||||
mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave")
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
|
||||
args = [
|
||||
'-persistenceinfo', persistenceInfo,
|
||||
classesDir.absolutePath,
|
||||
outputDir.absolutePath
|
||||
]
|
||||
inputClasses.set(layout.buildDirectory.dir("classes/java/main").get())
|
||||
persistenceXml.set(file("src/main/resources/jpa/static-weaving/module/loan/persistence.xml"))
|
||||
outputDir.set(layout.buildDirectory.dir("weaved-classes").get())
|
||||
}
|
||||
|
||||
|
||||
@@ -70,6 +58,8 @@ compileJava {
|
||||
|
||||
// Configuration for Swagger documentation generation task
|
||||
// https://github.com/swagger-api/swagger-core/tree/master/modules/swagger-gradle-plugin
|
||||
|
||||
import org.apache.fineract.gradle.StaticWeaveJpaTask
|
||||
import org.apache.tools.ant.filters.ReplaceTokens
|
||||
|
||||
|
||||
|
||||
@@ -16,30 +16,18 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import org.apache.fineract.gradle.StaticWeaveJpaTask
|
||||
description = 'Fineract Progressive Loan'
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
tasks.register('staticWeaveJpa', JavaExec) {
|
||||
tasks.register("staticWeaveJpa", StaticWeaveJpaTask) {
|
||||
dependsOn classes
|
||||
|
||||
def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile
|
||||
def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile
|
||||
def persistenceInfo = layout.buildDirectory.dir('static-weaving').get()
|
||||
copy {
|
||||
from file("src/main/resources/jpa/static-weaving/module/progressive-loan/persistence.xml")
|
||||
into "${persistenceInfo}/META-INF/"
|
||||
}
|
||||
|
||||
mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave")
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
|
||||
args = [
|
||||
'-persistenceinfo', persistenceInfo,
|
||||
classesDir.absolutePath,
|
||||
outputDir.absolutePath
|
||||
]
|
||||
inputClasses.set(layout.buildDirectory.dir("classes/java/main").get())
|
||||
persistenceXml.set(file("src/main/resources/jpa/static-weaving/module/progressive-loan/persistence.xml"))
|
||||
outputDir.set(layout.buildDirectory.dir("weaved-classes").get())
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import org.apache.fineract.gradle.StaticWeaveJpaTask
|
||||
description = 'Fineract Provider'
|
||||
|
||||
apply plugin: 'org.zeroturnaround.gradle.jrebel'
|
||||
@@ -30,25 +31,12 @@ apply plugin: 'se.thinkcode.cucumber-runner'
|
||||
|
||||
check.dependsOn('cucumber')
|
||||
|
||||
tasks.register('staticWeaveJpa', JavaExec) {
|
||||
tasks.register("staticWeaveJpa", StaticWeaveJpaTask) {
|
||||
dependsOn classes
|
||||
|
||||
def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile
|
||||
def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile
|
||||
def persistenceInfo = layout.buildDirectory.dir('static-weaving').get()
|
||||
copy {
|
||||
from file("src/main/resources/jpa/static-weaving/module/provider/persistence.xml")
|
||||
into "${persistenceInfo}/META-INF/"
|
||||
}
|
||||
|
||||
mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave")
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
|
||||
args = [
|
||||
'-persistenceinfo', persistenceInfo,
|
||||
classesDir.absolutePath,
|
||||
outputDir.absolutePath
|
||||
]
|
||||
inputClasses.set(layout.buildDirectory.dir("classes/java/main").get())
|
||||
persistenceXml.set(file("src/main/resources/jpa/static-weaving/module/provider/persistence.xml"))
|
||||
outputDir.set(layout.buildDirectory.dir("weaved-classes").get())
|
||||
}
|
||||
|
||||
tasks.register("weavedJar", Jar) {
|
||||
@@ -486,6 +474,7 @@ javadoc {
|
||||
tasks.register('devRun', org.springframework.boot.gradle.tasks.run.BootRun) {
|
||||
description = 'Runs the application quickly for development by skipping quality checks'
|
||||
group = 'Application'
|
||||
dependsOn staticWeaveJpa
|
||||
|
||||
// Configure the build to skip quality checks
|
||||
gradle.taskGraph.whenReady { graph ->
|
||||
|
||||
@@ -16,30 +16,18 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import org.apache.fineract.gradle.StaticWeaveJpaTask
|
||||
description = 'Fineract Rates'
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
tasks.register('staticWeaveJpa', JavaExec) {
|
||||
tasks.register("staticWeaveJpa", StaticWeaveJpaTask) {
|
||||
dependsOn classes
|
||||
|
||||
def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile
|
||||
def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile
|
||||
def persistenceInfo = layout.buildDirectory.dir('static-weaving').get()
|
||||
copy {
|
||||
from file("src/main/resources/jpa/static-weaving/module/rates/persistence.xml")
|
||||
into "${persistenceInfo}/META-INF/"
|
||||
}
|
||||
|
||||
mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave")
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
|
||||
args = [
|
||||
'-persistenceinfo', persistenceInfo,
|
||||
classesDir.absolutePath,
|
||||
outputDir.absolutePath
|
||||
]
|
||||
inputClasses.set(layout.buildDirectory.dir("classes/java/main").get())
|
||||
persistenceXml.set(file("src/main/resources/jpa/static-weaving/module/rates/persistence.xml"))
|
||||
outputDir.set(layout.buildDirectory.dir("weaved-classes").get())
|
||||
}
|
||||
|
||||
|
||||
@@ -72,6 +60,8 @@ compileJava {
|
||||
|
||||
// Configuration for Swagger documentation generation task
|
||||
// https://github.com/swagger-api/swagger-core/tree/master/modules/swagger-gradle-plugin
|
||||
|
||||
import org.apache.fineract.gradle.StaticWeaveJpaTask
|
||||
import org.apache.tools.ant.filters.ReplaceTokens
|
||||
|
||||
|
||||
|
||||
@@ -16,30 +16,18 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import org.apache.fineract.gradle.StaticWeaveJpaTask
|
||||
description = 'Fineract Report'
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
tasks.register('staticWeaveJpa', JavaExec) {
|
||||
tasks.register("staticWeaveJpa", StaticWeaveJpaTask) {
|
||||
dependsOn classes
|
||||
|
||||
def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile
|
||||
def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile
|
||||
def persistenceInfo = layout.buildDirectory.dir('static-weaving').get()
|
||||
copy {
|
||||
from file("src/main/resources/jpa/static-weaving/module/report/persistence.xml")
|
||||
into "${persistenceInfo}/META-INF/"
|
||||
}
|
||||
|
||||
mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave")
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
|
||||
args = [
|
||||
'-persistenceinfo', persistenceInfo,
|
||||
classesDir.absolutePath,
|
||||
outputDir.absolutePath
|
||||
]
|
||||
inputClasses.set(layout.buildDirectory.dir("classes/java/main").get())
|
||||
persistenceXml.set(file("src/main/resources/jpa/static-weaving/module/report/persistence.xml"))
|
||||
outputDir.set(layout.buildDirectory.dir("weaved-classes").get())
|
||||
}
|
||||
|
||||
|
||||
@@ -72,6 +60,8 @@ compileJava {
|
||||
|
||||
// Configuration for Swagger documentation generation task
|
||||
// https://github.com/swagger-api/swagger-core/tree/master/modules/swagger-gradle-plugin
|
||||
|
||||
import org.apache.fineract.gradle.StaticWeaveJpaTask
|
||||
import org.apache.tools.ant.filters.ReplaceTokens
|
||||
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import org.apache.fineract.gradle.StaticWeaveJpaTask
|
||||
description = 'Fineract Savings'
|
||||
|
||||
apply plugin: 'java'
|
||||
@@ -25,25 +26,12 @@ tasks.named('classes') {
|
||||
finalizedBy staticWeaveJpa
|
||||
}
|
||||
|
||||
tasks.register('staticWeaveJpa', JavaExec) {
|
||||
tasks.register("staticWeaveJpa", StaticWeaveJpaTask) {
|
||||
dependsOn classes
|
||||
|
||||
def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile
|
||||
def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile
|
||||
def persistenceInfo = layout.buildDirectory.dir('static-weaving').get()
|
||||
copy {
|
||||
from file("src/main/resources/jpa/static-weaving/module/savings/persistence.xml")
|
||||
into "${persistenceInfo}/META-INF/"
|
||||
}
|
||||
|
||||
mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave")
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
|
||||
args = [
|
||||
'-persistenceinfo', persistenceInfo,
|
||||
classesDir.absolutePath,
|
||||
outputDir.absolutePath
|
||||
]
|
||||
inputClasses.set(layout.buildDirectory.dir("classes/java/main").get())
|
||||
persistenceXml.set(file("src/main/resources/jpa/static-weaving/module/savings/persistence.xml"))
|
||||
outputDir.set(layout.buildDirectory.dir("weaved-classes").get())
|
||||
}
|
||||
|
||||
tasks.register("weavedJar", Jar) {
|
||||
@@ -74,6 +62,8 @@ compileJava {
|
||||
|
||||
// Configuration for Swagger documentation generation task
|
||||
// https://github.com/swagger-api/swagger-core/tree/master/modules/swagger-gradle-plugin
|
||||
|
||||
import org.apache.fineract.gradle.StaticWeaveJpaTask
|
||||
import org.apache.tools.ant.filters.ReplaceTokens
|
||||
|
||||
|
||||
|
||||
@@ -16,30 +16,18 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import org.apache.fineract.gradle.StaticWeaveJpaTask
|
||||
description = 'Fineract Taxes'
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
tasks.register('staticWeaveJpa', JavaExec) {
|
||||
tasks.register("staticWeaveJpa", StaticWeaveJpaTask) {
|
||||
dependsOn classes
|
||||
|
||||
def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile
|
||||
def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile
|
||||
def persistenceInfo = layout.buildDirectory.dir('static-weaving').get()
|
||||
copy {
|
||||
from file("src/main/resources/jpa/static-weaving/module/tax/persistence.xml")
|
||||
into "${persistenceInfo}/META-INF/"
|
||||
}
|
||||
|
||||
mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave")
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
|
||||
args = [
|
||||
'-persistenceinfo', persistenceInfo,
|
||||
classesDir.absolutePath,
|
||||
outputDir.absolutePath
|
||||
]
|
||||
inputClasses.set(layout.buildDirectory.dir("classes/java/main").get())
|
||||
persistenceXml.set(file("src/main/resources/jpa/static-weaving/module/tax/persistence.xml"))
|
||||
outputDir.set(layout.buildDirectory.dir("weaved-classes").get())
|
||||
}
|
||||
|
||||
|
||||
@@ -72,6 +60,8 @@ compileJava {
|
||||
|
||||
// Configuration for Swagger documentation generation task
|
||||
// https://github.com/swagger-api/swagger-core/tree/master/modules/swagger-gradle-plugin
|
||||
|
||||
import org.apache.fineract.gradle.StaticWeaveJpaTask
|
||||
import org.apache.tools.ant.filters.ReplaceTokens
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user