Skip to content

Commit

Permalink
mapstruct fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kjozsa committed Nov 14, 2024
1 parent 0fc51a6 commit 91e291e
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 45 deletions.
17 changes: 16 additions & 1 deletion custom/acme/event/starter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,22 @@
description = 'ACME Corp.: Fineract Event Starter'

group = 'com.acme.fineract.event'

archivesBaseName = 'acme-fineract-event-starter'

apply plugin: 'java'
apply plugin: 'io.freefair.lombok'
apply plugin: 'io.spring.dependency-management'

dependencies {
implementation(
project(':fineract-core')
)

testImplementation(
'org.junit.jupiter:junit-jupiter',
'org.mockito:mockito-core',
'org.mockito:mockito-junit-jupiter'
)
}

apply from: 'dependencies.gradle'
6 changes: 3 additions & 3 deletions custom/acme/loan/starter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ group = 'com.acme.fineract'

archivesBaseName = 'acme-fineract-loan-starter'

apply from: 'dependencies.gradle'

apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.freefair.lombok'
apply plugin: 'io.spring.dependency-management'

dependencies {
implementation(
Expand All @@ -40,3 +38,5 @@ dependencies {
'org.mockito:mockito-junit-jupiter'
)
}

apply from: 'dependencies.gradle'
2 changes: 1 addition & 1 deletion custom/acme/note/starter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ group = 'com.acme.fineract.portfolio.note'
archivesBaseName = 'acme-fineract-note-starter'

apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.freefair.lombok'
apply plugin: 'io.spring.dependency-management'

dependencies {
implementation(
Expand Down
76 changes: 36 additions & 40 deletions fineract-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,52 +19,46 @@
description = 'Fineract Core'

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'io.freefair.lombok'
apply plugin: 'io.spring.dependency-management'

compileJava.doLast {
def mainSS = sourceSets.main
def source = mainSS.java.classesDirectory.get()
copy {
from file("src/main/resources/jpa/core/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, '-classpath', sourceSets.main.runtimeClasspath, source, target
classpath sourceSets.main.runtimeClasspath
}
delete {
delete "${source}/META-INF/persistence.xml"
}
}
dependencies {
annotationProcessor(
'org.projectlombok:lombok',
'org.mapstruct:mapstruct-processor',
'org.springframework.boot:spring-boot-configuration-processor'
)

configurations {
providedRuntime // needed for Spring Boot executable WAR
providedCompile
compile() {
exclude module: 'hibernate-entitymanager'
exclude module: 'hibernate-validator'
exclude module: 'activation'
exclude module: 'bcmail-jdk14'
exclude module: 'bcprov-jdk14'
exclude module: 'bctsp-jdk14'
exclude module: 'c3p0'
exclude module: 'stax-api'
exclude module: 'jaxb-api'
exclude module: 'jaxb-impl'
exclude module: 'jboss-logging'
exclude module: 'itext-rtf'
exclude module: 'classworlds'
}
runtime
testAnnotationProcessor(
'org.projectlombok:lombok',
'org.mapstruct:mapstruct-processor'
)

implementation(
'org.mapstruct:mapstruct',
'org.springframework.boot:spring-boot-starter-web',
'org.springframework.boot:spring-boot-starter-security',
'org.springframework.boot:spring-boot-starter-batch',
'org.springframework.batch:spring-batch-integration'
)

testImplementation(
'org.junit.jupiter:junit-jupiter',
'org.mockito:mockito-core',
'org.mockito:mockito-junit-jupiter'
)
}

apply from: 'dependencies.gradle'
tasks.withType(JavaCompile) {
options.compilerArgs += [
'-Amapstruct.defaultComponentModel=spring',
'-Amapstruct.suppressGeneratorTimestamp=true',
'-Amapstruct.suppressGeneratorVersionInfoComment=true',
'-Amapstruct.verbose=true'
]
}

// Configuration for the modernizer plugin
// https://github.com/andygoossens/gradle-modernizer-plugin
modernizer {
ignoreClassNamePatterns = [
'.*AbstractPersistableCustom',
Expand All @@ -88,3 +82,5 @@ if (!(project.hasProperty('env') && project.getProperty('env') == 'dev')) {
}
}
}

apply from: 'dependencies.gradle'
5 changes: 5 additions & 0 deletions fineract-provider/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ dependencies {
'org.springframework.boot:spring-boot-configuration-processor'
)

testAnnotationProcessor(
'org.projectlombok:lombok',
'org.mapstruct:mapstruct-processor'
)

implementation(
project(':fineract-core'),
project(':fineract-loan'),
Expand Down

0 comments on commit 91e291e

Please sign in to comment.