FINERACT-2181: Make 'staticWeaveJPA' gradle task cacheable

This commit is contained in:
Adam Saghy
2025-06-19 07:12:59 +02:00
committed by Arnold Gálovics
parent 5a7d2d42f9
commit dd2c29fb91
15 changed files with 151 additions and 238 deletions
+6 -17
View File
@@ -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 ->