FINERACT-2437: Decrease the number of compilation warnings
This commit is contained in:
+50
-44
@@ -166,7 +166,7 @@ allprojects {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
configurations.configureEach {
|
||||
resolutionStrategy {
|
||||
dependencySubstitution {
|
||||
// Substitution is to resolve CVE-2025-12183
|
||||
@@ -392,7 +392,7 @@ configure(project.fineractJavaProjects) {
|
||||
}
|
||||
|
||||
// Add performance optimizations
|
||||
configurations.all {
|
||||
configurations.configureEach {
|
||||
resolutionStrategy {
|
||||
cacheChangingModulesFor 0, 'seconds'
|
||||
cacheDynamicVersionsFor 0, 'seconds'
|
||||
@@ -440,40 +440,40 @@ configure(project.fineractJavaProjects) {
|
||||
configurations {
|
||||
api.setCanBeResolved(true)
|
||||
}
|
||||
tasks.withType(Copy) {
|
||||
tasks.withType(Copy).configureEach {
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
}
|
||||
tasks.withType(JavaCompile) {
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
options.compilerArgs += [
|
||||
"-Xlint:cast",
|
||||
"-Xlint:auxiliaryclass",
|
||||
"-Xlint:dep-ann",
|
||||
"-Xlint:divzero",
|
||||
"-Xlint:empty",
|
||||
"-Xlint:exports",
|
||||
"-Xlint:fallthrough",
|
||||
"-Xlint:finally",
|
||||
"-Xlint:module",
|
||||
"-Xlint:opens",
|
||||
"-Xlint:options",
|
||||
"-Xlint:overloads",
|
||||
"-Xlint:overrides",
|
||||
"-Xlint:path",
|
||||
"-Xlint:processing",
|
||||
"-Xlint:removal",
|
||||
"-Xlint:requires-automatic",
|
||||
"-Xlint:requires-transitive-automatic",
|
||||
"-Xlint:try",
|
||||
"-Xlint:varargs",
|
||||
"-Xlint:preview",
|
||||
"-Xlint:static",
|
||||
// -Werror needs to be disabled because EclipseLink's static weaving doesn't generate warning-free code
|
||||
// and during an IntelliJ recompilation, it fails
|
||||
//"-Werror",
|
||||
"-Xmaxwarns",
|
||||
"1500",
|
||||
"-Xmaxerrs",
|
||||
"1500"
|
||||
"-Xlint:cast",
|
||||
"-Xlint:auxiliaryclass",
|
||||
"-Xlint:dep-ann",
|
||||
"-Xlint:divzero",
|
||||
"-Xlint:empty",
|
||||
"-Xlint:exports",
|
||||
"-Xlint:fallthrough",
|
||||
"-Xlint:finally",
|
||||
"-Xlint:module",
|
||||
"-Xlint:opens",
|
||||
"-Xlint:options",
|
||||
"-Xlint:overloads",
|
||||
"-Xlint:overrides",
|
||||
"-Xlint:path",
|
||||
"-Xlint:processing",
|
||||
"-Xlint:removal",
|
||||
"-Xlint:requires-automatic",
|
||||
"-Xlint:requires-transitive-automatic",
|
||||
"-Xlint:try",
|
||||
"-Xlint:varargs",
|
||||
"-Xlint:preview",
|
||||
"-Xlint:static",
|
||||
// -Werror needs to be disabled because EclipseLink's static weaving doesn't generate warning-free code
|
||||
// and during an IntelliJ recompilation, it fails
|
||||
//"-Werror",
|
||||
"-Xmaxwarns",
|
||||
"1500",
|
||||
"-Xmaxerrs",
|
||||
"1500"
|
||||
]
|
||||
// TODO FINERACT-959 (gradually) enable -Xlint:all (see "javac -help -X")
|
||||
|
||||
@@ -759,11 +759,13 @@ configure(project.fineractJavaProjects) {
|
||||
]
|
||||
}
|
||||
|
||||
tasks.withType(Javadoc) {
|
||||
options.addStringOption('Xdoclint:none', '-quiet')
|
||||
options.encoding = 'UTF-8'
|
||||
// Ignore any errors during javadoc generation
|
||||
failOnError = false
|
||||
tasks.withType(Javadoc).tap {
|
||||
configureEach {
|
||||
options.addStringOption('Xdoclint:none', '-quiet')
|
||||
options.encoding = 'UTF-8'
|
||||
// Ignore any errors during javadoc generation
|
||||
failOnError = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -899,17 +901,21 @@ cyclonedxBom {
|
||||
includeLicenseText = true
|
||||
}
|
||||
|
||||
task printSourceSetInformation() {
|
||||
doLast{
|
||||
tasks.register('printSourceSetInformation') {
|
||||
doLast {
|
||||
sourceSets.each { srcSet ->
|
||||
println "["+srcSet.name+"]"
|
||||
print "-->Source directories: "+srcSet.allJava.srcDirs+"\n"
|
||||
print "-->Output directories: "+srcSet.output.classesDirs.files+"\n"
|
||||
println "[" + srcSet.name + "]"
|
||||
print "-->Source directories: " + srcSet.allJava.srcDirs + "\n"
|
||||
print "-->Output directories: " + srcSet.output.classesDirs.files + "\n"
|
||||
print "-->Compile classpath:\n"
|
||||
srcSet.compileClasspath.files.each {
|
||||
print " "+it.path+"\n"
|
||||
print " " + it.path + "\n"
|
||||
}
|
||||
println ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(Checkstyle).configureEach {
|
||||
exclude("**/*.avsc")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user