nastra commented on code in PR #10601:
URL: https://github.com/apache/iceberg/pull/10601#discussion_r1662557426
##########
spark/build.gradle:
##########
@@ -18,16 +18,19 @@
*/
// add enabled Spark version modules to the build
-def sparkVersions = (System.getProperty("sparkVersions") != null ?
System.getProperty("sparkVersions") :
System.getProperty("defaultSparkVersions")).split(",")
+List<String> sparkVersions = System.getProperty("sparkVersions",
System.getProperty("defaultSparkVersions")).split(",").findAll { !it.empty }
+List<String> knownSparkVersions =
System.getProperty("knownSparkVersions").split(",")
-if (sparkVersions.contains("3.3")) {
- apply from: file("$projectDir/v3.3/build.gradle")
+for (ver in sparkVersions) {
+ apply from: file("$projectDir/v${ver}/build.gradle")
}
-if (sparkVersions.contains("3.4")) {
- apply from: file("$projectDir/v3.4/build.gradle")
-}
-
-if (sparkVersions.contains("3.5")) {
- apply from: file("$projectDir/v3.5/build.gradle")
+tasks.named("clean", Delete) {
+ for (ver in knownSparkVersions) {
+ delete("$projectDir/v${ver}/spark/build")
Review Comment:
one could argue that `clean` should only be running against the Spark
version(s) that are currently being passed to Gradle rather than calling clean
against all known Spark modules
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]