Skip to content

Commit 9be1ac0

Browse files
committed
[sbt] Skip adding scala3-repl on 3.7- Scala versions
1 parent 1e0e3c9 commit 9be1ac0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

project-builder/sbt/build.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ disabledScalacOption="$7"
1717
extraLibraryDeps="$8"
1818

1919
scriptDir="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
20+
source "$scriptDir/../versions.sh"
2021

2122
if [[ -z "$projectConfig" ]]; then
2223
projectConfig="{}"
@@ -49,7 +50,11 @@ sbtSettings=(
4950
${memorySettings[@]}
5051
$(echo $projectConfig | jq -r '.sbt.options? // [] | join(" ")' | sed "s/<SCALA_VERSION>/${scalaVersion}/g")
5152
)
52-
customCommands=$(echo "$projectConfig" | jq -r '.sbt?.commands // [] | join ("; ")' | sed "s/<SCALA_VERSION>/${scalaVersion}/g")
53+
customCommandsFilter='.sbt?.commands // []'
54+
if ! isBinVersionGreaterOrEqual "$scalaVersion" "3.8"; then
55+
customCommandsFilter='(.sbt?.commands // []) | map(select(test("libraryDependencies|scala3-repl") | not))'
56+
fi
57+
customCommands=$(echo "$projectConfig" | jq -r "$customCommandsFilter | join(\"; \")" | sed "s/<SCALA_VERSION>/${scalaVersion}/g")
5358
targetsString="${targets[@]}"
5459
logFile=build.log
5560
statusFile=../build-status.txt

0 commit comments

Comments
 (0)