Skip to content

Commit

Permalink
fix mapstruct
Browse files Browse the repository at this point in the history
  • Loading branch information
kjozsa committed Nov 14, 2024
1 parent b9b8d28 commit d62ee2b
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions fineract-provider/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,22 @@ apply plugin: 'io.freefair.lombok'

check.dependsOn('cucumber')

dependencies {
annotationProcessor(
'org.projectlombok:lombok',
'org.mapstruct:mapstruct-processor',
'org.springframework.boot:spring-boot-configuration-processor'
)

implementation(
project(':fineract-core'),
project(':fineract-loan'),
project(':fineract-accounting'),
project(':fineract-savings'),
'org.mapstruct:mapstruct'
)
}

// Properly declare task for JPA enhancement
task enhanceJPA(type: JavaExec) {
description = 'Performs static weaving of entity classes'
Expand Down Expand Up @@ -84,6 +100,16 @@ task enhanceJPA(type: JavaExec) {
compileJava.finalizedBy enhanceJPA
compileTestJava.mustRunAfter enhanceJPA

// Ensure MapStruct runs before test compilation
tasks.withType(JavaCompile) {
options.compilerArgs += [
'-Amapstruct.defaultComponentModel=spring',
'-Amapstruct.suppressGeneratorTimestamp=true',
'-Amapstruct.suppressGeneratorVersionInfoComment=true',
'-Amapstruct.verbose=true'
]
}

// Configuration for Swagger documentation generation task
task prepareInputYaml {
def inputFile = file("${projectDir}/config/swagger/fineract-input.yaml.template")
Expand Down

0 comments on commit d62ee2b

Please sign in to comment.