Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
52 changes: 23 additions & 29 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ buildscript {

dependencies {
classpath 'com.bmuschko:gradle-cargo-plugin:2.9.0'
classpath 'org.eclipse.persistence:eclipselink:4.0.9'
classpath 'org.eclipse.persistence:eclipselink:5.0.1'
classpath 'jakarta.ws.rs:jakarta.ws.rs-api:3.1.0'
classpath 'com.google.cloud.tools:jib-layer-filter-extension-gradle:0.3.0'
classpath 'org.apache.commons:commons-lang3:3.20.0'
Expand All @@ -110,10 +110,9 @@ plugins {
id 'com.adarshr.test-logger' version '4.0.0'
id 'com.diffplug.spotless' version '6.25.0' apply false
id 'org.nosphere.apache.rat' version '0.8.1' apply false
id 'com.github.hierynomus.license' version '0.16.1' apply false
id 'com.github.jk1.dependency-license-report' version '2.9' apply false
id 'org.zeroturnaround.gradle.jrebel' version '1.2.2' apply false
id 'org.springframework.boot' version '3.5.15' apply false
id 'org.springframework.boot' version '4.0.7' apply false
id 'net.ltgt.errorprone' version '4.4.0' apply false
id 'io.swagger.core.v3.swagger-gradle-plugin' version '2.2.49' apply false
id 'com.gorylenko.gradle-git-properties' version '2.5.7' apply false
Expand Down Expand Up @@ -163,6 +162,9 @@ gitVersioning.apply {

ext['groovy.version'] = '4.0.17'
ext['swaggerFile'] = "$rootDir/fineract-provider/build/resources/main/static/fineract.json".toString()
ext['apacheLicenseHeader'] = "/**\n" + rootProject.file("$rootDir/APACHE_LICENSETEXT.md").readLines()
.collect { it.isEmpty() ? " *" : " * $it" }
.join("\n") + "\n */\n"

// Apply static weaving configuration to all subprojects
subprojects { subproject ->
Expand Down Expand Up @@ -197,10 +199,12 @@ allprojects {

apply plugin: 'com.adarshr.test-logger'
apply plugin: 'com.diffplug.spotless'
apply plugin: 'com.github.hierynomus.license'
apply plugin: 'net.ltgt.errorprone'

tasks.withType(JavaCompile).configureEach {
inputs.file(rootProject.file('lombok.config'))
.withPropertyName('lombokConfig')
.withPathSensitivity(PathSensitivity.RELATIVE)
options.errorprone {
disableWarningsInGeneratedCode = true
disable(
Expand Down Expand Up @@ -250,29 +254,6 @@ allprojects {
lineEndings 'UNIX'
}

// Configuration for Gradle license plug-in
// https://github.com/hierynomus/license-gradle-plugin
license {
header rootProject.file("$rootDir/APACHE_LICENSETEXT.md")
excludes([
"**/gradlew*",
"**/git.properties",
"**/*.html",
"**/templates/**",
"**/features/**",
"**/results/**",
"**/package-info.java",
"**/keystore.jks",
"**/legacy-docs/**",
"**/banner.txt",
"**/build.gradle.mustache",
"**/pom.mustache",
"**/avro/**/*.java",
"**/org/apache/fineract/client/**/*.java"
])
strictCheck true
}

licenseReport {
outputDir = "$projectDir/licenses"
}
Expand Down Expand Up @@ -408,6 +389,11 @@ configure(project.fineractJavaProjects) {
cacheChangingModulesFor 0, 'seconds'
cacheDynamicVersionsFor 0, 'seconds'
}
// com.sun.activation:jakarta.activation is superseded by jakarta.activation-api +
// org.eclipse.angus:angus-activation; multiple third-party libraries (e.g. jaxb-runtime
// via tika, via hibernate-core) pull it in transitively without excluding it themselves,
// so it must be excluded globally to avoid classpath duplicates
exclude group: 'com.sun.activation', module: 'jakarta.activation'
}

tasks.withType(JavaCompile).configureEach {
Expand Down Expand Up @@ -493,7 +479,7 @@ configure(project.fineractJavaProjects) {
}

check {
dependsOn(rat, licenseMain, licenseTest)
dependsOn(rat)
}

dependencies {
Expand Down Expand Up @@ -540,6 +526,13 @@ configure(project.fineractJavaProjects) {
}
}

format 'javaLicenseHeader', {
target sourceSets.main.java, sourceSets.test.java
targetExclude '**/build/**', '**/bin/**', '**/out/**', '**/package-info.java', '**/avro/**/*.java',
'**/org/apache/fineract/client/**/*.java'
licenseHeader(rootProject.ext['apacheLicenseHeader'], 'package ')
}

lineEndings 'UNIX'
}

Expand Down Expand Up @@ -691,7 +684,7 @@ configure(project.fineractJavaProjects) {
}

check {
dependsOn(rat, licenseMain, licenseTest)
dependsOn(rat)
}

dependencies {
Expand All @@ -700,6 +693,7 @@ configure(project.fineractJavaProjects) {
'org.slf4j:slf4j-api',
'org.slf4j:log4j-over-slf4j',
'org.slf4j:jul-to-slf4j',
'org.slf4j:jcl-over-slf4j',
)
implementation ("ch.qos.logback:logback-classic") {
exclude(module: "slf4j-api")
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ configurations.all {
}

dependencies {
implementation 'com.sun.activation:jakarta.activation'
implementation 'com.sun.mail:jakarta.mail'
implementation 'org.eclipse.angus:angus-activation'
implementation 'org.eclipse.angus:angus-mail'
implementation 'org.freemarker:freemarker'
implementation ('com.tmatesoft.svnkit:svnkit') {
exclude group: 'net.i2p.crypto', module: 'eddsa'
Expand Down
34 changes: 17 additions & 17 deletions buildSrc/src/main/groovy/org.apache.fineract.dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ dependencyManagement {
mavenBom 'com.squareup.okhttp3:okhttp-bom:4.12.0'
mavenBom 'org.slf4j:slf4j-bom:2.0.17'
mavenBom 'io.micrometer:micrometer-bom:1.16.5'
mavenBom 'org.springframework.boot:spring-boot-dependencies:3.5.15'
mavenBom 'org.springframework.boot:spring-boot-dependencies:4.0.7'
mavenBom 'io.awspring.cloud:spring-cloud-aws-dependencies:4.0.2'
mavenBom 'io.opentelemetry:opentelemetry-bom:1.62.0'
mavenBom 'org.jetbrains.kotlin:kotlin-bom:2.3.21'
mavenBom 'org.junit:junit-bom:5.14.4'
mavenBom 'org.junit:junit-bom:6.0.3'
mavenBom 'com.fasterxml.jackson:jackson-bom:2.22.1'
mavenBom 'io.cucumber:cucumber-bom:7.34.3'
mavenBom 'org.mockito:mockito-bom:5.23.0'
Expand All @@ -50,7 +50,7 @@ dependencyManagement {
dependency 'ch.qos.logback.contrib:logback-jackson:0.1.5'
dependency 'org.codehaus.janino:janino:3.1.12'

dependency 'org.eclipse.persistence:org.eclipse.persistence.jpa:4.0.9'
dependency 'org.eclipse.persistence:org.eclipse.persistence.jpa:5.0.1'
dependency 'com.google.guava:guava:33.6.0-jre'
dependency 'com.google.code.gson:gson:2.14.0'
dependency 'com.google.googlejavaformat:google-java-format:1.35.0'
Expand All @@ -63,6 +63,7 @@ dependencyManagement {
exclude 'com.sun.mail:javax.mail'
exclude 'javax.activation:activation'
}
dependency 'org.apache.commons:commons-email2-jakarta:2.0.0-M1'
dependency 'commons-io:commons-io:2.22.0'
dependency 'com.github.librepdf:openpdf:3.0.4'
dependency ('org.mnode.ical4j:ical4j:3.2.19') {
Expand Down Expand Up @@ -180,7 +181,7 @@ dependencyManagement {
dependency 'com.vdurmont:semver4j:3.1.0'
dependency 'org.beryx:text-io:3.4.1'

dependency ('org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.17') {
dependency ('org.springdoc:springdoc-openapi-starter-webmvc-ui:3.0.2') {
exclude 'io.swagger.core.v3:swagger-core'
}

Expand All @@ -198,10 +199,7 @@ dependencyManagement {

dependency 'jakarta.annotation:jakarta.annotation-api:3.0.0'
dependency 'jakarta.activation:jakarta.activation-api:2.1.4'
dependency ('com.sun.mail:jakarta.mail:2.0.2') {
// Spring needs this version
exclude 'com.sun.activation:jakarta.activation'
}
dependency 'org.eclipse.angus:angus-activation:2.0.3'
dependency ('jakarta.xml.bind:jakarta.xml.bind-api:4.0.5') {
exclude 'jakarta.activation:jakarta.activation-api'
}
Expand Down Expand Up @@ -270,10 +268,9 @@ dependencyManagement {
dependency 'org.openjdk.jmh:jmh-core:1.37'
dependency 'org.openjdk.jmh:jmh-generator-annprocess:1.37'

dependency 'org.springframework.restdocs:spring-restdocs-asciidoctor:3.0.5'
dependency 'org.springframework.restdocs:spring-restdocs-mockmvc:3.0.5'
dependency 'org.springframework.restdocs:spring-restdocs-webtestclient:3.0.5'
dependency 'org.springframework.restdocs:spring-restdocs-restassured:3.0.5'
dependency 'org.springframework.restdocs:spring-restdocs-asciidoctor:4.0.1'
dependency 'org.springframework.restdocs:spring-restdocs-mockmvc:4.0.1'
dependency 'org.springframework.restdocs:spring-restdocs-webtestclient:4.0.1'

dependency 'com.lmax:disruptor:4.0.0'

Expand All @@ -287,8 +284,11 @@ dependencyManagement {
dependency 'org.yakworks:spring-icu4j:0.5.2'
dependency 'org.apache.commons:commons-lang3:3.20.0'
dependency 'com.nimbusds:nimbus-jose-jwt:10.9'
dependency 'org.springframework:spring-core:6.2.18'
dependency 'org.springframework.security:spring-security-core:6.5.10'
dependency 'org.springframework:spring-core:7.0.8'
dependency 'org.springframework.security:spring-security-core:7.0.6'
dependency 'io.github.resilience4j:resilience4j-spring-boot4:2.4.0'
// New in Boot 4; the dependency-management plugin does not pick up its version from the Boot BOM.
dependency 'org.springframework.boot:spring-boot-starter-liquibase:4.0.7'
// Keep Netty on the 4.1 line for MockServer compatibility.
dependency 'io.netty:netty-buffer:4.1.135.Final'
dependency 'io.netty:netty-common:4.1.135.Final'
Expand All @@ -309,8 +309,8 @@ dependencyManagement {
dependency 'at.yawk.lz4:lz4-java:1.11.0'
dependency 'org.thymeleaf:thymeleaf:3.1.5.RELEASE'
dependency 'org.thymeleaf:thymeleaf-spring6:3.1.5.RELEASE'
dependency 'org.apache.tomcat.embed:tomcat-embed-core:10.1.55'
dependency 'org.apache.tomcat.embed:tomcat-embed-el:10.1.55'
dependency 'org.apache.tomcat.embed:tomcat-embed-websocket:10.1.55'
dependency 'org.apache.tomcat.embed:tomcat-embed-core:11.0.22'
dependency 'org.apache.tomcat.embed:tomcat-embed-el:11.0.22'
dependency 'org.apache.tomcat.embed:tomcat-embed-websocket:11.0.22'
}
}
1 change: 1 addition & 0 deletions custom/acme/loan/job/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ dependencies {
implementation(project(':fineract-core'))
implementation(project(':fineract-loan'))
implementation(project(':fineract-provider'))
implementation('org.springframework.boot:spring-boot-starter-batch')
implementation('org.springframework.batch:spring-batch-integration')
implementation('org.springframework.boot:spring-boot-starter-data-jpa')
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
package com.acme.fineract.loan.job;

import lombok.RequiredArgsConstructor;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.job.Job;
import org.springframework.batch.core.job.builder.JobBuilder;
import org.springframework.batch.core.launch.support.RunIdIncrementer;
import org.springframework.batch.core.job.parameters.RunIdIncrementer;
import org.springframework.batch.core.repository.JobRepository;
import org.springframework.batch.core.step.Step;
import org.springframework.batch.core.step.builder.StepBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
package com.acme.fineract.loan.job;

import lombok.extern.slf4j.Slf4j;
import org.springframework.batch.core.StepContribution;
import org.springframework.batch.core.scope.context.ChunkContext;
import org.springframework.batch.core.step.StepContribution;
import org.springframework.batch.core.step.tasklet.Tasklet;
import org.springframework.batch.repeat.RepeatStatus;
import org.springframework.batch.infrastructure.repeat.RepeatStatus;
import org.springframework.stereotype.Component;

@Slf4j
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -17,18 +16,19 @@
* specific language governing permissions and limitations
* under the License.
*/
package com.acme.fineract.loan.job;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.springframework.batch.repeat.RepeatStatus.FINISHED;
import static org.springframework.batch.infrastructure.repeat.RepeatStatus.FINISHED;

import com.acme.fineract.loan.job.AcmeNoopJobTasklet;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.springframework.batch.core.StepContribution;
import org.springframework.batch.core.scope.context.ChunkContext;
import org.springframework.batch.repeat.RepeatStatus;
import org.springframework.batch.core.step.StepContribution;
import org.springframework.batch.infrastructure.repeat.RepeatStatus;

@ExtendWith(MockitoExtension.class)
public class AcmeNoopJobTaskletTest {
Expand Down
9 changes: 9 additions & 0 deletions fineract-accounting/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,12 @@ if (!(project.hasProperty('env') && project.getProperty('env') == 'dev')) {
}
}
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
}

dependencies {
annotationProcessor "org.projectlombok:lombok-mapstruct-binding:0.2.0"

runtimeOnly "jakarta.xml.bind:jakarta.xml.bind-api:4.0.5"
}
6 changes: 3 additions & 3 deletions fineract-accounting/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies {
)

implementation(
'org.springframework.boot:spring-boot-starter-web',
'org.springframework.boot:spring-boot-starter-webmvc',
'org.springframework.boot:spring-boot-starter-security',
'org.springframework.boot:spring-boot-starter-batch',
'org.springframework.batch:spring-batch-integration',
Expand All @@ -53,7 +53,7 @@ dependencies {
'org.springdoc:springdoc-openapi-starter-webmvc-ui',
'org.mapstruct:mapstruct',

'io.github.resilience4j:resilience4j-spring-boot3',
'io.github.resilience4j:resilience4j-spring-boot4',
)
compileOnly 'com.github.spotbugs:spotbugs-annotations'
compileOnly 'org.projectlombok:lombok'
Expand All @@ -76,5 +76,5 @@ dependencies {
exclude group: 'javax.activation'
exclude group: 'org.skyscreamer'
}
testImplementation ('org.mockito:mockito-inline')
testImplementation ('org.mockito:mockito-core')
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import java.util.List;
import org.apache.fineract.accounting.financialactivityaccount.exception.FinancialActivityAccountNotFoundException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
Expand All @@ -33,7 +32,6 @@ public class FinancialActivityAccountRepositoryWrapper {

private final FinancialActivityAccountRepository repository;

@Autowired
public FinancialActivityAccountRepositoryWrapper(final FinancialActivityAccountRepository repository) {
this.repository = repository;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/

package org.apache.fineract.accounting.glaccount.domain;

import jakarta.persistence.Column;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.NativeQuery;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface TrialBalanceRepository extends JpaRepository<TrialBalance, Long>, JpaSpecificationExecutor<TrialBalance> {

@Query(value = "select * from m_trial_balance where office_id=:officeId and account_id=:accountId and closing_balance is null order by created_date, entry_date", nativeQuery = true)
@NativeQuery("select * from m_trial_balance where office_id=:officeId and account_id=:accountId and closing_balance is null order by created_date, entry_date")
List<TrialBalance> findNewByOfficeAndAccount(@Param("officeId") Long officeId, @Param("accountId") Long accountId);

@Query("SELECT MAX(tb.transactionDate) FROM TrialBalance tb")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,13 @@

import java.util.List;
import org.apache.fineract.accounting.trialbalance.exception.TrialBalanceNotFoundException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TrialBalanceRepositoryWrapper {

private final TrialBalanceRepository repository;

@Autowired
public TrialBalanceRepositoryWrapper(final TrialBalanceRepository repository) {
this.repository = repository;
}
Expand Down
Loading