Workaround running clean build not working (should fix jenkins not building)
@@ -579,6 +579,31 @@ task allJar(type: Jar, dependsOn: [classes, apiClasses, additionsClasses, defens
MergeJars.getGeneratedClosures(versionProperties).each { closure -> from("$buildDir/generated", closure) }
}
+clean {
+ //TODO: Try to come up with a slightly better solution to this that deletes more,
+ // for example make it calculate the current hash and only leave that or only do
+ // this if clean build is being ran. We also ideally would have it remove some of
+ // the data from our generated folder, but for now this will do given jenkins runs
+ // a clean build because we need to make sure it doesn't fail
+ def filteredDelete = new HashSet<>()
+ for (def toDelete : getDelete()) {
+ for (def f : file(toDelete).listFiles()) {
+ if (f.getName() != "fg_cache") {
+ if (f.getName() == "generated") {
+ for (def generated : file(f).listFiles()) {
+ if (generated.getName() != "data" && generated.getName() != "META-INF") {
+ filteredDelete.add(generated)
+ }
+ }
+ } else {
+ filteredDelete.add(f)
+ }
+ }
+ }
+ }
+ setDelete(filteredDelete)
+}
+
tasks.withType(JavaCompile).configureEach({
it.options.encoding = 'UTF-8'
})
