Skip to content

Commit 40eb547

Browse files
committed
FINERACT-1470: Fineract release plugin
1 parent b185937 commit 40eb547

160 files changed

Lines changed: 4954 additions & 638 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-docker-postgresql.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
with:
1717
java-version: '17'
1818
distribution: 'zulu'
19+
cache: gradle
1920
- name: Build the image
2021
run: ./gradlew :fineract-provider:clean :fineract-provider:jibDockerBuild -x test
2122
- name: Start the stack

.github/workflows/build-docker.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
with:
1717
java-version: '17'
1818
distribution: 'zulu'
19+
cache: gradle
1920
- name: Build the image
2021
run: ./gradlew :fineract-provider:clean :fineract-provider:jibDockerBuild -x test
2122
- name: Start the stack

.github/workflows/build-postgresql.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ jobs:
4545
with:
4646
java-version: '17'
4747
distribution: 'zulu'
48+
cache: gradle
4849
- name: Validate Gradle wrapper
4950
uses: gradle/wrapper-validation-action@859c33240bd026ce8d5f711f5adcc65c2f8eafc1
5051
- name: Verify PostgreSQL connection

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
with:
4545
java-version: '17'
4646
distribution: 'zulu'
47+
cache: gradle
4748
- name: Validate Gradle wrapper
4849
uses: gradle/wrapper-validation-action@859c33240bd026ce8d5f711f5adcc65c2f8eafc1
4950
- name: Verify MariaDB connection

.github/workflows/sonarqube.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
with:
3535
java-version: '17'
3636
distribution: 'zulu'
37+
cache: gradle
3738
- name: Validate Gradle wrapper
3839
uses: gradle/wrapper-validation-action@859c33240bd026ce8d5f711f5adcc65c2f8eafc1
3940
- name: Sonarqube

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,7 @@ bin/
2121
fineract-provider/out/
2222
fineract-provider/config/swagger/config.json
2323
fineract-provider/config/swagger/fineract-input.yaml
24-
licenses
24+
licenses
25+
**/.asciidoctor/images/*
26+
**/.asciidoctor/diagram/*
27+
**/images/diag-*.svg

README.md

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -457,59 +457,6 @@ Upgrades sometimes require package name changes. Changed code should ideally ha
457457
Our `ClasspathHellDuplicatesCheckRuleTest` detects classes that appear in more than 1 JAR. If a version bump in [`build.gradle`](https://github.com/search?q=repo%3Aapache%2Ffineract+filename%3Abuild.gradle&type=Code&ref=advsearch&l=&l=) causes changes in transitives dependencies, then you may have to add related `exclude` to our [`dependencies.gradle`](https://github.com/apache/fineract/search?q=dependencies.gradle). Running `./gradlew dependencies` helps to understand what is required.
458458

459459

460-
Releasing
461-
---------
462-
463-
[How to Release Apache Fineract](https://cwiki.apache.org/confluence/x/DRwIB) documents the process how we make the source code that is available here in this Git repository into a binary release tar.gz available on http://fineract.apache.org.
464-
465-
Before you use Gradle to create a release you need to make sure that you provide the proper GPG parameters. You have to options:
466-
467-
1. Provide the parameters via ~/.gradle/gradle.properties in your home folder:
468-
```
469-
signing.gnupg.keyName=7890ABCD
470-
signing.gnupg.passphrase=secret
471-
```
472-
473-
IMPORTANT: Do not set your GPG secrets in one of the project gradle.properties and double check that you are not accidentally committing them to Git.
474-
475-
The release command would look then look like this:
476-
```
477-
./gradlew -Pfineract.release clean build
478-
```
479-
480-
2. Another way to provide these parameters are via project parameters on the command line. A release command would then look like this:
481-
```
482-
./gradlew -Pfineract.release -Psigning.gnupg.keyName=7890ABCD -Psigning.gnupg.passphrase=secret clean build
483-
```
484-
485-
NOTE: Let's assume your GPG key ID would be "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCD" then you have to use the last 8 characters (i. e. "7890ABCD") for the signing plugin property "signing.gnupg.keyName".
486-
487-
Above tasks will create the following files in folder build/distributions:
488-
489-
- binary distribution file: apache-fineract-1.6.0-binary.tar.gz
490-
- ASCII armored signature for binary distribution: apache-fineract-1.6.0-binary.tar.gz.asc
491-
- SHA512 checksum for binary distribution: apache-fineract-1.6.0-binary.tar.gz.sha512
492-
- source distribution file: apache-fineract-1.6.0-src.tar.gz
493-
- ASCII armored signature for source distribution: apache-fineract-1.6.0-src.tar.gz.asc
494-
- SHA512 checksum for source distribution: apache-fineract-1.6.0-src.tar.gz.sha512
495-
496-
The signatures are automatically verified by the build script. It will throw an exception if the verification fails.
497-
498-
Additionally, you can verify the validity of the release distribution files e. g. with:
499-
```
500-
gpg --verify build/distributions/apache-fineract-1.6.0-binary.tar.gz.asc
501-
```
502-
503-
The output should look somewhat like this:
504-
```
505-
gpg: assuming signed data in 'build/distributions/apache-fineract-1.6.0-binary.tgz'
506-
gpg: Signature made Mi 26 Aug 2020 17:17:45 CEST
507-
gpg: using RSA key ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCD
508-
gpg: Good signature from "Aleksandar Vidakovic (Apache Fineract Release Manager) <aleks@apache.org>" [ultimate]
509-
```
510-
511-
NOTE: All commands shown above are assuming that the current working directory is the project root folder.
512-
513460
More Information
514461
============
515462
More details of the project can be found at <https://cwiki.apache.org/confluence/display/FINERACT>.

build.gradle

Lines changed: 9 additions & 158 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,9 @@ buildscript {
5656
}
5757

5858
plugins {
59-
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
6059
id "org.barfuin.gradle.taskinfo" version "1.4.0"
6160
id 'com.adarshr.test-logger' version '3.2.0'
62-
id 'com.diffplug.spotless' version '6.5.0' apply false
61+
id 'com.diffplug.spotless' version '6.5.1' apply false
6362
id 'org.nosphere.apache.rat' version '0.7.1' apply false
6463
id 'com.github.hierynomus.license' version '0.16.1' apply false
6564
id 'com.github.jk1.dependency-license-report' version '2.1' apply false
@@ -68,7 +67,7 @@ plugins {
6867
id 'org.springframework.boot' version '2.6.7' apply false
6968
id 'net.ltgt.errorprone' version '2.0.2' apply false
7069
id 'io.swagger.core.v3.swagger-gradle-plugin' version '2.2.0' apply false
71-
id 'com.gorylenko.gradle-git-properties' version '2.4.0' apply false
70+
id 'com.gorylenko.gradle-git-properties' version '2.4.1' apply false
7271
id 'org.asciidoctor.jvm.convert' version '3.3.2' apply false
7372
id 'org.asciidoctor.jvm.pdf' version '3.3.2' apply false
7473
id 'org.asciidoctor.jvm.epub' version '3.3.2' apply false
@@ -83,6 +82,8 @@ plugins {
8382
id 'se.thinkcode.cucumber-runner' version '0.0.10' apply false
8483
}
8584

85+
apply from: "${rootDir}/buildSrc/src/main/groovy/org.apache.fineract.release.gradle"
86+
8687
description = '''\
8788
Run as:
8889
gradle clean bootRun'''
@@ -91,6 +92,8 @@ ext['groovy.version'] = '3.0.10'
9192
ext['swaggerFile'] = "$rootDir/fineract-provider/build/classes/java/main/static/fineract.yaml".toString()
9293

9394
allprojects {
95+
apply from: "${rootDir}/buildSrc/src/main/groovy/org.apache.fineract.dependencies.gradle"
96+
9497
group = 'org.apache.fineract'
9598

9699
jgitver {
@@ -103,166 +106,13 @@ allprojects {
103106
mavenCentral()
104107
}
105108

106-
apply plugin: 'io.spring.dependency-management'
107109
apply plugin: 'com.adarshr.test-logger'
108110
apply plugin: 'com.diffplug.spotless'
109111
apply plugin: 'com.github.hierynomus.license'
110112
apply plugin: 'org.nosphere.apache.rat'
111113
apply plugin: 'project-report'
112114
apply plugin: 'com.github.jk1.dependency-license-report'
113115

114-
// Configuration for the dependency management plugin
115-
// https://github.com/spring-gradle-plugins/dependency-management-plugin
116-
dependencyManagement {
117-
imports {
118-
mavenBom 'org.springframework:spring-framework-bom:5.3.19'
119-
mavenBom 'org.springframework.boot:spring-boot-dependencies:2.6.7'
120-
mavenBom 'org.jetbrains.kotlin:kotlin-bom:1.6.21'
121-
mavenBom 'org.junit:junit-bom:5.8.2'
122-
mavenBom 'com.fasterxml.jackson:jackson-bom:2.13.2.1'
123-
mavenBom 'io.cucumber:cucumber-bom:7.3.2'
124-
mavenBom 'io.netty:netty-bom:4.1.76.Final'
125-
mavenBom 'org.mockito:mockito-bom:4.5.1'
126-
mavenBom 'io.github.swagger2markup:swagger2markup-bom:1.3.4'
127-
}
128-
129-
dependencies {
130-
// We use fixed versions, instead of inheriting them from the Spring BOM, to be able to be on more recent ones.
131-
// We do not use :+ to get the latest available version available on Maven Central, as that could suddenly break things.
132-
// We use the Renovate Bot to automatically propose Pull Requests (PRs) when upgrades for all of these versions are available.
133-
134-
dependency 'org.slf4j:slf4j-api:1.7.36'
135-
dependency 'org.slf4j:slf4j-simple:1.7.36'
136-
dependency 'org.slf4j:jcl-over-slf4j:1.7.36'
137-
dependency 'org.slf4j:jul-to-slf4j:1.7.36'
138-
dependency 'org.slf4j:log4j-over-slf4j:1.7.36'
139-
dependency 'ch.qos.logback:logback-core:1.2.11'
140-
dependency 'ch.qos.logback:logback-classic:1.2.11'
141-
142-
dependency 'org.eclipse.persistence:org.eclipse.persistence.jpa:2.7.10'
143-
dependency 'com.google.guava:guava:31.1-jre'
144-
dependency 'com.google.code.gson:gson:2.9.0'
145-
dependency 'com.google.truth:truth:1.1.3'
146-
dependency 'com.google.truth.extensions:truth-java8-extension:1.1.3'
147-
dependency 'com.google.googlejavaformat:google-java-format:1.15.0'
148-
dependency ('org.apache.commons:commons-email:1.5') {
149-
exclude 'com.sun.mail:javax.mail'
150-
exclude 'javax.activation:activation'
151-
}
152-
dependency 'commons-io:commons-io:2.11.0'
153-
dependency 'com.github.librepdf:openpdf:1.3.27'
154-
dependency ('org.mnode.ical4j:ical4j:3.2.2') {
155-
exclude 'com.sun.mail:javax.mail'
156-
}
157-
dependency 'org.quartz-scheduler:quartz:2.3.2'
158-
dependency 'com.amazonaws:aws-java-sdk-s3:1.12.205'
159-
dependency 'org.ehcache:ehcache:3.10.0'
160-
dependency 'com.github.spullara.mustache.java:compiler:0.9.10'
161-
dependency 'com.jayway.jsonpath:json-path:2.7.0'
162-
dependency 'org.apache.tika:tika-core:2.3.0'
163-
dependency 'org.apache.httpcomponents:httpclient:4.5.13'
164-
dependency 'jakarta.management.j2ee:jakarta.management.j2ee-api:1.1.4'
165-
dependency 'jakarta.jms:jakarta.jms-api:2.0.3'
166-
dependency 'org.glassfish.jaxb:jaxb-runtime:2.3.6' // Swagger needs exactly this version
167-
dependency 'org.apache.bval:org.apache.bval.bundle:2.0.5'
168-
dependency 'joda-time:joda-time:2.10.14'
169-
170-
dependency 'io.github.classgraph:classgraph:4.8.146'
171-
dependency 'org.awaitility:awaitility:4.2.0'
172-
dependency 'com.github.spotbugs:spotbugs-annotations:4.6.0'
173-
dependency 'javax.cache:cache-api:1.1.1'
174-
dependency 'org.mock-server:mockserver-junit-jupiter:5.13.2'
175-
dependency 'org.webjars:webjars-locator-core:0.50'
176-
dependency 'com.icegreen:greenmail-junit5:1.6.8'
177-
dependency 'com.intuit.karate:karate-junit5:1.2.0.RC6'
178-
179-
// fineract client dependencies
180-
dependency "com.squareup.retrofit2:retrofit:$retrofitVersion"
181-
dependency "com.squareup.retrofit2:retrofit-mock:$retrofitVersion"
182-
dependency "com.squareup.retrofit2:adapter-java8:$retrofitVersion"
183-
dependency "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"
184-
dependency "com.squareup.retrofit2:adapter-rxjava3:$retrofitVersion"
185-
dependency "com.squareup.retrofit2:adapter-guava:$retrofitVersion"
186-
dependency "com.squareup.retrofit2:converter-wire:$retrofitVersion"
187-
dependency "com.squareup.retrofit2:converter-jackson:$retrofitVersion"
188-
dependency "com.squareup.retrofit2:converter-simplexml:$retrofitVersion"
189-
dependency "com.squareup.retrofit2:converter-jaxb:$retrofitVersion"
190-
dependency "com.squareup.retrofit2:converter-java8:$retrofitVersion"
191-
dependency "com.squareup.retrofit2:converter-scalars:$retrofitVersion"
192-
dependency "com.squareup.retrofit2:converter-gson:$retrofitVersion"
193-
dependency "com.squareup.retrofit2:converter-protobuf:$retrofitVersion"
194-
dependency "org.apache.oltu.oauth2:org.apache.oltu.oauth2.common:$oltuVersion"
195-
dependency "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltuVersion"
196-
dependency "org.apache.oltu.oauth2:org.apache.oltu.oauth2.httpclient4:$oltuVersion"
197-
dependency "com.squareup.okhttp3:okhttp:$okhttpVersion"
198-
dependency "com.squareup.okhttp3:okcurl:$okhttpVersion"
199-
dependency "com.squareup.okhttp3:logging-interceptor:$okhttpVersion"
200-
dependency "com.squareup.okhttp3:okhttp-apache:$okhttpVersion"
201-
dependency "com.squareup.okhttp3:okhttp-android-support:$okhttpVersion"
202-
dependency "com.squareup.okhttp3:okhttp-urlconnection:$okhttpVersion"
203-
dependency "com.squareup.okhttp3:okhttp-sse:$okhttpVersion"
204-
dependency "io.gsonfire:gson-fire:1.8.5"
205-
dependency "com.google.code.findbugs:jsr305:3.0.2"
206-
dependency "commons-codec:commons-codec:1.15"
207-
dependency "org.bouncycastle:bcpkix-jdk15to18:1.70"
208-
dependency "org.bouncycastle:bcprov-jdk15to18:1.70"
209-
dependency "org.projectlombok:lombok:1.18.24"
210-
211-
dependency 'org.springdoc:springdoc-openapi-ui:1.6.8'
212-
dependency 'org.springdoc:springdoc-openapi-webmvc-core:1.6.8'
213-
dependency 'org.springdoc:springdoc-openapi-common:1.6.8'
214-
dependency 'org.springdoc:springdoc-openapi-security:1.6.8'
215-
dependency 'org.springdoc:springdoc-openapi-javadoc:1.6.8'
216-
217-
dependency ('org.apache.activemq:activemq-broker:5.17.0') {
218-
exclude 'javax.annotation:javax.annotation-api'
219-
}
220-
221-
dependency 'io.swagger:swagger-annotations:1.6.6'
222-
dependency 'io.swagger.core.v3:swagger-annotations:2.2.0'
223-
dependency ('io.swagger.core.v3:swagger-jaxrs2:2.2.0') {
224-
exclude 'jakarta.activation:jakarta.activation-api'
225-
}
226-
dependency ('io.swagger.core.v3:swagger-core:2.2.0') {
227-
exclude 'jakarta.activation:jakarta.activation-api'
228-
}
229-
230-
dependency "jakarta.annotation:jakarta.annotation-api:1.3.5"
231-
dependency 'jakarta.activation:jakarta.activation-api:1.2.2'
232-
dependency ('com.sun.mail:jakarta.mail:1.6.7') {
233-
exclude 'com.sun.activation:jakarta.activation'
234-
}
235-
dependency ('jakarta.xml.bind:jakarta.xml.bind-api:2.3.3') {
236-
exclude 'jakarta.activation:jakarta.activation-api'
237-
}
238-
239-
dependency ('org.liquibase:liquibase-core:4.9.1') {
240-
exclude 'javax.xml.bind:jaxb-api'
241-
}
242-
243-
dependency ('org.dom4j:dom4j:2.1.3') {
244-
exclude 'relaxngDatatype:relaxngDatatype' // already in com.sun.xml.bind:jaxb-osgi:2.3.0.1
245-
// FINERACT-940 && FINERACT-966 https://github.com/spotbugs/spotbugs/issues/1128
246-
exclude 'xpp3:xpp3'
247-
exclude 'pull-parser:pull-parser'
248-
}
249-
250-
dependency 'org.owasp.esapi:esapi:2.3.0.0'
251-
252-
dependencySet(group: 'org.apache.poi', version: '5.2.2') {
253-
entry 'poi'
254-
entry 'poi-ooxml'
255-
entry 'poi-ooxml-schemas'
256-
}
257-
258-
dependencySet(group: 'io.rest-assured', version: '4.5.1') {
259-
entry 'rest-assured'
260-
entry 'json-path'
261-
entry 'xml-path'
262-
}
263-
}
264-
}
265-
266116
// Configuration for the sonarqube plugin is now in GitHub Actions
267117

268118
// Configuration for the spotless plugin
@@ -415,6 +265,7 @@ configure(project.fineractJavaProjects) {
415265
apply plugin: 'com.github.andygoossens.modernizer'
416266
apply plugin: 'se.thinkcode.cucumber-runner'
417267

268+
418269
/* define the valid syntax level for source files */
419270
sourceCompatibility = JavaVersion.VERSION_17
420271
/* define binary compatibility version */
@@ -528,8 +379,8 @@ configure(project.fineractJavaProjects) {
528379
// Configuration for the Checkstyle plugin
529380
// https://docs.gradle.org/current/userguide/checkstyle_plugin.html
530381
dependencies {
531-
checkstyle 'com.puppycrawl.tools:checkstyle:10.1'
532-
checkstyle 'com.github.sevntu-checkstyle:sevntu-checks:1.41.0'
382+
checkstyle 'com.puppycrawl.tools:checkstyle:10.2'
383+
checkstyle 'com.github.sevntu-checkstyle:sevntu-checks:1.42.0'
533384
}
534385

535386
// Configuration for JaCoCo code coverage task

buildSrc/build.gradle

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/**
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
plugins {
20+
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
21+
id 'groovy'
22+
id 'java-gradle-plugin'
23+
id 'groovy-gradle-plugin'
24+
}
25+
26+
apply from: "${projectDir}/src/main/groovy/org.apache.fineract.dependencies.gradle"
27+
28+
description = 'Fineract Gradle Plugin'
29+
30+
repositories {
31+
gradlePluginPortal()
32+
mavenCentral()
33+
}
34+
35+
dependencies {
36+
implementation 'com.sun.mail:jakarta.mail'
37+
implementation 'org.freemarker:freemarker'
38+
implementation 'org.tmatesoft.svnkit:svnkit'
39+
implementation 'org.bouncycastle:bcprov-jdk15on'
40+
implementation 'org.bouncycastle:bcpg-jdk15on'
41+
implementation 'org.eclipse.jgit:org.eclipse.jgit'
42+
implementation 'org.eclipse.jgit:org.eclipse.jgit.ssh.apache'
43+
implementation 'com.vdurmont:semver4j'
44+
implementation 'org.beryx:text-io'
45+
implementation 'commons-io:commons-io'
46+
implementation 'com.squareup.okhttp3:okhttp'
47+
implementation 'com.squareup.okhttp3:logging-interceptor'
48+
implementation 'com.squareup.retrofit2:retrofit'
49+
implementation 'com.squareup.retrofit2:converter-jackson'
50+
implementation 'com.fasterxml.jackson.core:jackson-databind'
51+
}

0 commit comments

Comments
 (0)