-
Notifications
You must be signed in to change notification settings - Fork 35
/
gradlew_all_versions
executable file
·52 lines (40 loc) · 1.33 KB
/
gradlew_all_versions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env bash
set -euo pipefail
# Run like you would `./gradlew arguments`
# but now like `./gradlew_all_versions arguments`.
DRY_RUN=${DRY_RUN:-false}
SCALA2_12VERSION="2.12.16"
SCALA2_13VERSION="2.13.8"
SparkVersionsForBothScalaVersions=("3.3.0" "3.2.1" "3.2.0")
SparkVersionsForScala2_12=("3.1.3" "3.1.2" "3.1.1" "3.1.0" "3.0.3" "3.0.2" "3.0.1" "3.0.0")
echo Running for "$(expr ${#SparkVersionsForBothScalaVersions[@]} \* 2 + ${#SparkVersionsForScala2_12[@]}) versions of the library."
echo "Cleaning the project first."
if [ "$DRY_RUN" = false ]; then
./gradlew clean
fi
ARGS=("$@")
execute() {
echo "running ./gradlew -Pspark=$SPARK -Pscala=$SCALA -PskipScalaTuplesInKotlin=$SKIP_SCALA_TUPLES -PenforceCleanJCP=true ${ARGS[*]}"
if [ "$DRY_RUN" = false ]; then
./gradlew -Pspark="$SPARK" -Pscala="$SCALA" -PskipScalaTuplesInKotlin="$SKIP_SCALA_TUPLES" "${ARGS[@]}"
fi
}
SCALA="$SCALA2_12VERSION"
SKIP_SCALA_TUPLES=false
for spark in "${SparkVersionsForScala2_12[@]}"; do
SPARK="$spark"
execute
SKIP_SCALA_TUPLES=true
done
execute_for_both_scala_versions() {
for spark in "${SparkVersionsForBothScalaVersions[@]}"; do
SPARK="$spark"
execute
SKIP_SCALA_TUPLES=true
done
}
SCALA="$SCALA2_12VERSION"
execute_for_both_scala_versions
SCALA="$SCALA2_13VERSION"
SKIP_SCALA_TUPLES=false
execute_for_both_scala_versions