Skip to content

Commit

Permalink
PS-2084: Speed up Fineract build
Browse files Browse the repository at this point in the history
  • Loading branch information
kjozsa committed Nov 30, 2024
1 parent f63df47 commit 253b275
Show file tree
Hide file tree
Showing 26 changed files with 1,070 additions and 1,856 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-mariadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ jobs:
done
- name: Initialise databases
run: |
./gradlew --no-daemon -q createDB -PdbName=fineract_tenants
./gradlew --no-daemon -q createDB -PdbName=fineract_default
mysql -h 127.0.0.1 -P 3306 -u root -pmysql -e "CREATE DATABASE IF NOT EXISTS fineract_tenants CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
mysql -h 127.0.0.1 -P 3306 -u root -pmysql -e "CREATE DATABASE IF NOT EXISTS fineract_default CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
- name: Start LocalStack
env:
AWS_ENDPOINT_URL: http://localhost:4566
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ jobs:
done
- name: Initialise databases
run: |
./gradlew --no-daemon -q createMySQLDB -PdbName=fineract_tenants
./gradlew --no-daemon -q createMySQLDB -PdbName=fineract_default
mysql -h 127.0.0.1 -P 3306 -u root -pmysql -e "CREATE DATABASE IF NOT EXISTS fineract_tenants CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
mysql -h 127.0.0.1 -P 3306 -u root -pmysql -e "CREATE DATABASE IF NOT EXISTS fineract_default CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
- name: Start LocalStack
env:
AWS_ENDPOINT_URL: http://localhost:4566
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-postgresql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ jobs:
done
- name: Initialise databases
run: |
./gradlew --no-daemon -q createPGDB -PdbName=fineract_tenants
./gradlew --no-daemon -q createPGDB -PdbName=fineract_default
PGPASSWORD=postgres psql -h 127.0.0.1 -U root -d postgres -c "CREATE DATABASE fineract_tenants WITH OWNER = root ENCODING = 'UTF8' CONNECTION LIMIT = -1;"
PGPASSWORD=postgres psql -h 127.0.0.1 -U root -d postgres -c "CREATE DATABASE fineract_default WITH OWNER = root ENCODING = 'UTF8' CONNECTION LIMIT = -1;"
- name: Start LocalStack
env:
AWS_ENDPOINT_URL: http://localhost:4566
Expand Down
45 changes: 28 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/**
* 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
Expand Down Expand Up @@ -87,28 +87,32 @@ buildscript {
}

plugins {
id 'me.qoomon.git-versioning' version '6.4.4'
id 'eclipse'
id 'idea'
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.10.0' 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.5' apply false
id 'net.ltgt.errorprone' version '4.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.26' apply false
id 'com.google.cloud.tools.jib' version '3.4.4' 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 '4.1.0' apply false
id 'org.asciidoctor.jvm.convert' version '3.3.2' apply false
id 'org.asciidoctor.jvm.epub' version '3.3.2' apply false
id 'org.asciidoctor.jvm.pdf' version '3.3.2' apply false
id 'com.google.cloud.tools.jib' version '3.4.4' apply false
id 'org.sonarqube' version '4.4.1.3373'
id 'com.github.andygoossens.modernizer' version '1.10.0' apply false
// TODO: upgrade to 6.0.4
id 'com.github.spotbugs' version '6.0.26' apply false
id 'org.asciidoctor.kindlegen.base' version '3.2.0' 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 '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 Expand Up @@ -321,7 +325,6 @@ configure(project.fineractJavaProjects) {

apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'checkstyle'
apply plugin: 'jacoco'
apply plugin: 'net.ltgt.errorprone'
Expand Down Expand Up @@ -374,7 +377,7 @@ configure(project.fineractJavaProjects) {
"-Xlint:overloads",
"-Xlint:overrides",
"-Xlint:path",
"-Xlint:processing",
"-Xlint:-processing",
"-Xlint:removal",
"-Xlint:requires-automatic",
"-Xlint:requires-transitive-automatic",
Expand Down Expand Up @@ -682,8 +685,9 @@ configure(project.fineractCustomProjects) {
exclude(module: "slf4j-api")
}

compileOnly('org.projectlombok:lombok')
annotationProcessor('org.projectlombok:lombok')
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'

annotationProcessor('org.mapstruct:mapstruct-processor')
annotationProcessor('org.springframework.boot:spring-boot-autoconfigure-processor')
annotationProcessor('org.springframework.boot:spring-boot-configuration-processor')
Expand Down Expand Up @@ -802,3 +806,10 @@ task printSourceSetInformation() {
}
}
}

if ('sonarqube' in gradle.startParameter.taskNames) {
apply plugin: 'org.sonarqube'
tasks.named('sonarqube') {
dependsOn build
}
}
Loading

0 comments on commit 253b275

Please sign in to comment.