Skip to content

Commit

Permalink
Fixed a lot of up-to-date Gradle checks to speed up integration test …
Browse files Browse the repository at this point in the history
…running
  • Loading branch information
galovics committed Apr 9, 2022
1 parent ab80cc0 commit ce6a1fc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 23 deletions.
12 changes: 0 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -289,18 +289,6 @@ allprojects {
strictCheck true
}

task licenseFormatBuildScripts (type:nl.javadude.gradle.plugins.license.License) {
source = fileTree(dir: "$rootDir/", includes: [
'**/*.bat',
'**/*.sh',
'**/*.sql'
], excludes: [
'**/gradlew*'
])
}

licenseFormat.dependsOn licenseFormatBuildScripts

licenseReport {
outputDir = "$projectDir/licenses"
}
Expand Down
16 changes: 5 additions & 11 deletions fineract-client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ openApiValidate {
recommend = true
}

task buildJavaSdk(type: org.openapitools.generator.gradle.plugin.tasks.GenerateTask){
task buildJavaSdk(type: org.openapitools.generator.gradle.plugin.tasks.GenerateTask) {
generatorName = 'java'
verbose = false
validateSpec = false
Expand All @@ -63,12 +63,6 @@ task buildJavaSdk(type: org.openapitools.generator.gradle.plugin.tasks.GenerateT
dependsOn = [
':fineract-provider:resolve'
]
finalizedBy = [licenseFormat]
// uncomment below block to automatically copy the custom files in generated SDK
/*copy {
from file('src/main/java')
into file("$buildDir/generated/java/src/main/java")
}*/
}

task buildTypescriptAngularSdk(type: org.openapitools.generator.gradle.plugin.tasks.GenerateTask){
Expand All @@ -90,9 +84,12 @@ task buildTypescriptAngularSdk(type: org.openapitools.generator.gradle.plugin.ta
dependsOn = [
':fineract-provider:resolve'
]
finalizedBy = [licenseFormat]
}

licenseFormatMain.dependsOn buildJavaSdk
licenseFormatMain.dependsOn buildTypescriptAngularSdk
compileJava.dependsOn licenseFormatMain

// TODO: @vidakovic we could provide even more client libs in different languages (Go, Ruby, Swift etc.)
compileJava.dependsOn buildJavaSdk, spotlessJavaApply, buildTypescriptAngularSdk, spotlessMiscApply

Expand Down Expand Up @@ -120,7 +117,4 @@ test {
useJUnitPlatform()
}

// Gradle 7.x asks for explicit dependencies between tasks
licenseFormatBuildScripts.dependsOn spotlessGroovyGradle, spotlessJava, spotlessMisc, compileJava, processResources, compileTestJava, rat, test

sourceSets.main.java.srcDir new File(buildDir, "generated/java/src/main/java")
1 change: 1 addition & 0 deletions fineract-provider/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ resolve {
classpath = sourceSets.main.runtimeClasspath
outputDir = file("${buildDir}/generated/swagger-ui")
openApiFile = file("config/swagger/fineract-input.yaml")
sortOutput = true
}

resolve.dependsOn prepareInputYaml
Expand Down
2 changes: 2 additions & 0 deletions integration-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,5 @@ test {
dependsOn cargoStartLocal
finalizedBy cargoStopLocal
}

compileTestJava.dependsOn ':fineract-client:processResources'

0 comments on commit ce6a1fc

Please sign in to comment.