FINERACT-2181: Gradle task rework - Optimized weaving across all modules

This commit is contained in:
Adam Saghy
2025-06-22 22:41:34 +02:00
parent ee5290c92e
commit db28259b1a
36 changed files with 1310 additions and 943 deletions
+2 -27
View File
@@ -21,31 +21,10 @@ description = 'Fineract Charge'
apply plugin: 'java'
apply plugin: 'eclipse'
compileJava.doLast {
def mainSS = sourceSets.main
def source = mainSS.java.classesDirectory.get()
copy {
from file("src/main/resources/jpa/charge/persistence.xml")
into "${source}/META-INF/"
}
javaexec {
description = 'Performs EclipseLink static weaving of entity classes'
def target = source
main 'org.eclipse.persistence.tools.weaving.jpa.StaticWeave'
args '-persistenceinfo', source, source, target
classpath sourceSets.main.runtimeClasspath
}
delete {
delete "${source}/META-INF/persistence.xml"
}
compileJava {
dependsOn ':fineract-avro-schemas:buildJavaSdk'
}
// Configuration for Swagger documentation generation task
// https://github.com/swagger-api/swagger-core/tree/master/modules/swagger-gradle-plugin
import org.apache.tools.ant.filters.ReplaceTokens
configurations {
providedRuntime // needed for Spring Boot executable WAR
providedCompile
@@ -91,10 +70,6 @@ eclipse {
}
}
/* http://stackoverflow.com/questions/19653311/jpa-repository-works-in-idea-and-production-but-not-in-gradle */
sourceSets.main.output.resourcesDir = sourceSets.main.java.classesDirectory
sourceSets.test.output.resourcesDir = sourceSets.test.java.classesDirectory
if (!(project.hasProperty('env') && project.getProperty('env') == 'dev')) {
sourceSets {
test {