Skip to content

Commit

Permalink
fineract-progressive-loan module turned to kts
Browse files Browse the repository at this point in the history
  • Loading branch information
kjozsa committed Oct 7, 2024
1 parent 997883c commit 7f1a520
Show file tree
Hide file tree
Showing 5 changed files with 144 additions and 177 deletions.
30 changes: 15 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -87,32 +87,32 @@ buildscript {
}

plugins {
id 'me.qoomon.git-versioning' version '6.4.4'
// id 'org.asciidoctor.jvm.gems' version '3.3.2' apply false
// id 'org.asciidoctor.jvm.revealjs' version '3.3.2' apply false
id "com.github.davidmc24.gradle.plugin.avro-base" version "1.9.1" apply false
id "org.barfuin.gradle.taskinfo" version "2.2.0"
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.andygoossens.modernizer' version '1.9.3' 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.0' apply false
id 'org.springframework.boot' version '3.3.3' apply false
id 'net.ltgt.errorprone' version '3.1.0' apply false
id 'io.swagger.core.v3.swagger-gradle-plugin' version '2.2.23' apply false
id 'com.github.spotbugs' version '6.0.22' apply false
id 'com.google.cloud.tools.jib' version '3.4.3' apply false
id 'com.gorylenko.gradle-git-properties' version '2.4.2' apply false
id "io.freefair.lombok" version "8.10.2"
id 'io.swagger.core.v3.swagger-gradle-plugin' version '2.2.23' apply false
id 'me.qoomon.git-versioning' version '6.4.4'
id 'net.ltgt.errorprone' version '3.1.0' apply false
id 'org.asciidoctor.jvm.convert' version '3.3.2' apply false
id 'org.asciidoctor.jvm.pdf' version '3.3.2' apply false
id 'org.asciidoctor.jvm.epub' version '3.3.2' apply false
// id 'org.asciidoctor.jvm.revealjs' version '3.3.2' apply false
// id 'org.asciidoctor.jvm.gems' version '3.3.2' apply false
id 'org.asciidoctor.jvm.pdf' version '3.3.2' apply false
id 'org.asciidoctor.kindlegen.base' version '3.2.0' apply false
id 'com.google.cloud.tools.jib' version '3.4.3' apply false
id 'org.nosphere.apache.rat' version '0.8.1' apply false
id 'org.openapi.generator' version '7.8.0' apply false
id 'org.sonarqube' version '4.4.1.3373' apply false
id 'com.github.andygoossens.modernizer' version '1.9.3' apply false
// TODO: upgrade to 6.0.4
id 'com.github.spotbugs' version '6.0.22' apply false
id 'org.springframework.boot' version '3.3.3' apply false
id 'org.zeroturnaround.gradle.jrebel' version '1.2.0' apply false
id 'se.thinkcode.cucumber-runner' version '0.0.11' apply false
id "com.github.davidmc24.gradle.plugin.avro-base" version "1.9.1" apply false
id 'org.openapi.generator' version '7.8.0' apply false
}

apply from: "${rootDir}/buildSrc/src/main/groovy/org.apache.fineract.release.gradle"
Expand Down
100 changes: 0 additions & 100 deletions fineract-progressive-loan/build.gradle

This file was deleted.

52 changes: 52 additions & 0 deletions fineract-progressive-loan/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
description = "Fineract Progressive Loan"

dependencies {
implementation(project(":fineract-accounting"))
implementation(project(":fineract-charge"))
implementation(project(":fineract-core"))
implementation(project(":fineract-loan"))
implementation(project(":fineract-avro-schemas"))

implementation("com.github.spotbugs:spotbugs-annotations")
implementation("com.google.code.gson:gson")
implementation("com.google.guava:guava")
implementation("com.jayway.jsonpath:json-path")
implementation("com.squareup.retrofit2:converter-gson")
implementation("io.github.resilience4j:resilience4j-spring-boot3")
implementation("io.swagger.core.v3:swagger-annotations-jakarta")
implementation("jakarta.ws.rs:jakarta.ws.rs-api")
implementation("org.apache.commons:commons-lang3")
implementation("org.glassfish.jersey.media:jersey-media-multipart")
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-web")

implementation("org.mapstruct:mapstruct")
annotationProcessor("org.mapstruct:mapstruct-processor")

implementation("org.springframework.boot:spring-boot-starter-data-jpa") {
exclude(group = "org.hibernate")
}
implementation("org.eclipse.persistence:org.eclipse.persistence.jpa") {
exclude(group = "org.eclipse.persistence", module = "jakarta.persistence")
}
testImplementation("org.springframework.boot:spring-boot-starter-test")
}
77 changes: 77 additions & 0 deletions fineract-progressive-loan/build.gradle.off
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
description = 'Fineract Progressive Loan'
apply plugin: 'java'

compileJava.doLast {
def mainSS = sourceSets.main
def source = mainSS.java.classesDirectory.get()
copy {
from file("src/main/resources/jpa/progressiveloan/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"
}
}

apply from: 'dependencies.gradle'

//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
//}


/* 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 {
// java {
// exclude '**/core/boot/tests/**'
// }
// }
// }
//}
62 changes: 0 additions & 62 deletions fineract-progressive-loan/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,65 +16,3 @@
* specific language governing permissions and limitations
* under the License.
*/

dependencies {
// Never use "compile" scope, but make all dependencies either 'implementation', 'runtimeOnly' or 'testCompile'.
// Note that we never use 'api', because Fineract at least currently is a simple monolithic application ("WAR"), not a library.
// We also (normally should have) no need to ever use 'compileOnly'.

// implementation dependencies are directly used (compiled against) in src/main (and src/test)
//
implementation(project(path: ':fineract-core'))
implementation(project(path: ':fineract-accounting'))
implementation(project(path: ':fineract-charge'))
implementation(project(path: ':fineract-loan'))
implementation('org.apache.avro:avro')
implementation(
project(path: ':fineract-avro-schemas')
)

implementation(
'org.springframework.boot:spring-boot-starter-web',
'org.springframework.boot:spring-boot-starter-security',
'jakarta.ws.rs:jakarta.ws.rs-api',
'org.glassfish.jersey.media:jersey-media-multipart',

'com.google.guava:guava',
'com.google.code.gson:gson',

'org.apache.commons:commons-lang3',

'com.jayway.jsonpath:json-path',

'com.github.spotbugs:spotbugs-annotations',
'io.swagger.core.v3:swagger-annotations-jakarta',

'com.squareup.retrofit2:converter-gson',

'org.springdoc:springdoc-openapi-starter-webmvc-ui',
'org.mapstruct:mapstruct',

'io.github.resilience4j:resilience4j-spring-boot3',
)
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
annotationProcessor 'org.mapstruct:mapstruct-processor'
implementation ('org.springframework.boot:spring-boot-starter-data-jpa') {
exclude group: 'org.hibernate'
}
implementation('org.eclipse.persistence:org.eclipse.persistence.jpa') {
exclude group: 'org.eclipse.persistence', module: 'jakarta.persistence'
}
// testCompile dependencies are ONLY used in src/test, not src/main.
// Do NOT repeat dependencies which are ALREADY in implementation or runtimeOnly!
//
testImplementation( 'io.github.classgraph:classgraph' )
testImplementation ('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'com.jayway.jsonpath', module: 'json-path'
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
exclude group: 'jakarta.activation'
exclude group: 'javax.activation'
exclude group: 'org.skyscreamer'
}
testImplementation ('org.mockito:mockito-inline')
}

0 comments on commit 7f1a520

Please sign in to comment.