|
1 | 1 | import scala.sys.process.Process |
| 2 | +import scala.io.Source |
2 | 3 |
|
3 | 4 | import xerial.sbt.Sonatype._ |
4 | 5 | import Dependencies._ |
5 | 6 |
|
| 7 | +// Load Sonatype Central credentials |
| 8 | +credentials += { |
| 9 | + val credFile = Path.userHome / ".sbt" / "sonatype_central_credentials" |
| 10 | + if (credFile.exists) { |
| 11 | + val lines = Source.fromFile(credFile).getLines().toList |
| 12 | + val props = lines.map { line => |
| 13 | + val parts = line.split("=", 2) |
| 14 | + if (parts.length == 2) Some(parts(0).trim -> parts(1).trim) else None |
| 15 | + }.flatten.toMap |
| 16 | + |
| 17 | + Credentials( |
| 18 | + "Sonatype Nexus Repository Manager", |
| 19 | + props.getOrElse("host", "central.sonatype.com"), |
| 20 | + props.getOrElse("user", ""), |
| 21 | + props.getOrElse("password", "") |
| 22 | + ) |
| 23 | + } else { |
| 24 | + Credentials(Path.userHome / ".sbt" / "sonatype.credentials") |
| 25 | + } |
| 26 | +} |
| 27 | + |
6 | 28 | ThisBuild / organizationName := "zilliz" |
7 | 29 | ThisBuild / organizationHomepage := Some(url("https://zilliz.com/")) |
8 | 30 | // For cross-compiling (if applicable) |
@@ -54,7 +76,7 @@ lazy val root = (project in file(".")) |
54 | 76 | assembly / parallelExecution := true, |
55 | 77 | Test / parallelExecution := true, |
56 | 78 | Compile / compile / parallelExecution := true, |
57 | | - version := "0.1.14-SNAPSHOT", |
| 79 | + version := "0.2.1-SNAPSHOT", |
58 | 80 | organization := "com.zilliz", |
59 | 81 |
|
60 | 82 | // Fork JVM for run and tests to properly load native libraries |
|
0 commit comments