Skip to content

Commit

Permalink
add developer run mode
Browse files Browse the repository at this point in the history
  • Loading branch information
kjozsa committed Jan 6, 2025
1 parent 7c8e982 commit 1cb28d2
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions fineract-provider/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -382,3 +382,36 @@ processResources.dependsOn compileJava
javadoc {
dependsOn resolve
}

task devRun(type: org.springframework.boot.gradle.tasks.run.BootRun) {
description = 'Runs the application quickly for development by skipping quality checks'
group = 'Application'

// Configure the build to skip quality checks
gradle.taskGraph.whenReady { graph ->
if (graph.hasTask(devRun)) {
tasks.matching { task ->
task.name in ['checkstyle', 'checkstyleMain', 'checkstyleTest',
'spotlessCheck', 'spotlessApply',
'spotbugsMain', 'spotbugsTest',
'javadoc', 'javadocJar',
'modernizer']
}.configureEach {
enabled = false
}
// Also disable error prone compilation flags
tasks.withType(JavaCompile).configureEach {
options.errorprone.enabled = false
}
}
}

// Inherit all bootRun settings
classpath = bootRun.classpath
mainClass = bootRun.mainClass
jvmArgs = bootRun.jvmArgs

doFirst {
println "Running in development mode - quality checks are disabled"
}
}

0 comments on commit 1cb28d2

Please sign in to comment.