FINERACT-2181: Make 'staticWeaveJPA' gradle task cacheable
This commit is contained in:
committed by
Arnold Gálovics
parent
5a7d2d42f9
commit
dd2c29fb91
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user