Skip to content

Commit f5663a6

Browse files
upgrade to sbt 1.6.1 (#110)
1 parent fb7a5f4 commit f5663a6

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ jobs:
1616
~/.ivy2/cache
1717
~/.sbt
1818
key: ${{ runner.os }}-sbt
19-
- uses: olafurpg/setup-scala@v10
19+
- uses: olafurpg/setup-scala@v13
20+
with:
21+
java-version: [email protected]
2022
- uses: olafurpg/setup-gpg@v3
2123
- run: ./make.sh
2224
- run: ./publish.sh

common/src/main/scala/it/agilelab/darwin/common/JavaVersion.scala

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,13 @@ object JavaVersion {
1616
def parseJavaVersion(propertyValue: String): Int = {
1717
val splits = propertyValue.split("\\.")
1818
if (propertyValue.startsWith("1.")) {
19-
splits(1).toInt
19+
splits(1).takeWhile(isDigit).toInt
2020
} else {
21-
splits(0).toInt
21+
splits(0).takeWhile(isDigit).toInt
2222
}
2323
}
24+
private val digits = ('0' to '9').toSet
25+
private def isDigit(c: Char): Boolean = {
26+
digits.contains(c)
27+
}
2428
}

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version = 1.5.5
1+
sbt.version = 1.6.1

0 commit comments

Comments
 (0)