diff --git a/Toolkit.js.scala b/Toolkit.js.scala index 8606c56..0e92f73 100644 --- a/Toolkit.js.scala +++ b/Toolkit.js.scala @@ -1,5 +1,5 @@ -//> using scala "2.13", "3" -//> using publish.name "toolkit" -//> using lib "com.softwaremill.sttp.client4::core::4.0.0-M1" -//> using lib "com.softwaremill.sttp.client4::upickle::4.0.0-M1" -//> using lib "com.lihaoyi::upickle::3.1.0" +//> using scala 2.13, 3 +//> using publish.name toolkit +//> using dep com.softwaremill.sttp.client4::core::4.0.0-M1 +//> using dep com.softwaremill.sttp.client4::upickle::4.0.0-M1 +//> using dep com.lihaoyi::upickle::3.1.0 diff --git a/Toolkit.scala b/Toolkit.scala index 967f4cc..f675ad2 100644 --- a/Toolkit.scala +++ b/Toolkit.scala @@ -1,6 +1,6 @@ -//> using scala "2.13", "3" -//> using publish.name "toolkit" -//> using lib "com.softwaremill.sttp.client4::core::4.0.0-M1" -//> using lib "com.softwaremill.sttp.client4::upickle::4.0.0-M1" -//> using lib "com.lihaoyi::upickle::3.1.0" -//> using lib "com.lihaoyi::os-lib::0.9.1" +//> using scala 2.13, 3 +//> using publish.name toolkit +//> using dep com.softwaremill.sttp.client4::core::4.0.0-M1 +//> using dep com.softwaremill.sttp.client4::upickle::4.0.0-M1 +//> using dep com.lihaoyi::upickle::3.1.0 +//> using dep com.lihaoyi::os-lib::0.9.1 diff --git a/ToolkitTest.scala b/ToolkitTest.scala index 6b7faf4..ec4bd16 100644 --- a/ToolkitTest.scala +++ b/ToolkitTest.scala @@ -1,3 +1,3 @@ -//> using scala "2.13", "3" -//> using publish.name "toolkit-test" -//> using lib "org.scalameta::munit::1.0.0-M7" +//> using scala 2.13, 3 +//> using publish.name toolkit-test +//> using dep org.scalameta::munit::1.0.0-M7 diff --git a/checks/Changelog.scala b/checks/Changelog.scala index a635599..4ab1441 100755 --- a/checks/Changelog.scala +++ b/checks/Changelog.scala @@ -23,7 +23,7 @@ private def publish(flag: Option[String]) = val moduleDep = s"${Config.organization}::$dep::${Config.developmentVersion}" os.write.append(copy, s"\n//> using dep ${moduleDep}") copy.toString - os.proc("scala-cli", "--power", "publish", "local", "--cross", flag.map(f => s"--$f").toList, "--organization", Config.organization, "--version", Config.developmentVersion.toString, file).call() + os.proc("scala-cli", "--power", "publish", "local", "--cross", flag.map(f => s"--$f").toList, "--organization", Config.organization, "--project-version", Config.developmentVersion.toString, file).call() @main def main(args: String*) = diff --git a/checks/test/ChangelogTest.scala b/checks/test/ChangelogTest.scala index 82524b0..b3f8dd3 100644 --- a/checks/test/ChangelogTest.scala +++ b/checks/test/ChangelogTest.scala @@ -245,10 +245,10 @@ object ChangelogTest: // scala-cli config file write os.temp(s""" |//> using scala 2.13, 3 - |//> using publish.name "$id" - |${deps.map(d => s"//> using lib $d").mkString("\n")} - |//> using publish.version "$version" - |//> using publish.organization "com.example" + |//> using publish.name $id + |${deps.map(d => s"//> using dep $d").mkString("\n")} + |//> using publish.version $version + |//> using publish.organization com.example | """.stripMargin, suffix = ".scala") private def publish(id: String, version: String, deps: List[String], skip: List[String] = Nil) = diff --git a/examples/DirGetTotalSize.sc b/examples/DirGetTotalSize.sc index 424f583..1a36f17 100644 --- a/examples/DirGetTotalSize.sc +++ b/examples/DirGetTotalSize.sc @@ -1,4 +1,4 @@ -//> using toolkit "latest" +//> using toolkit latest val totalSize = os.walk.stream.attrs(os.pwd) .collect { case (path, attrs) if attrs.isFile => attrs.size } diff --git a/examples/FileReadText.sc b/examples/FileReadText.sc index 2c27125..6289d0d 100644 --- a/examples/FileReadText.sc +++ b/examples/FileReadText.sc @@ -1,4 +1,4 @@ -//> using toolkit "latest" +//> using toolkit latest val text = os.read(os.pwd / "resources" / "File.txt") println(text) diff --git a/examples/JsonReading.sc b/examples/JsonReading.sc index 7fc2af2..e84e091 100644 --- a/examples/JsonReading.sc +++ b/examples/JsonReading.sc @@ -1,4 +1,4 @@ -//> using toolkit "latest" +//> using toolkit latest import upickle.default._ diff --git a/examples/JsonWriting.sc b/examples/JsonWriting.sc index cc68654..f9b6dec 100644 --- a/examples/JsonWriting.sc +++ b/examples/JsonWriting.sc @@ -1,4 +1,4 @@ -//> using toolkit "latest" +//> using toolkit latest import upickle.default._ diff --git a/examples/RequestGet.sc b/examples/RequestGet.sc index 48ca90f..264ed73 100644 --- a/examples/RequestGet.sc +++ b/examples/RequestGet.sc @@ -1,4 +1,4 @@ -//> using toolkit "latest" +//> using toolkit latest import sttp.client4.quick.* diff --git a/examples/RequestPost.sc b/examples/RequestPost.sc index f34c1a1..5163c2e 100644 --- a/examples/RequestPost.sc +++ b/examples/RequestPost.sc @@ -1,4 +1,4 @@ -//> using toolkit "latest" +//> using toolkit latest import sttp.client4.quick.* diff --git a/examples/SimpleTest.test.scala b/examples/SimpleTest.test.scala index 911c677..362e06a 100644 --- a/examples/SimpleTest.test.scala +++ b/examples/SimpleTest.test.scala @@ -1,5 +1,5 @@ -//> using toolkit "latest" -//> using dep "org.scala-lang::toolkit-test:latest.stable" +//> using toolkit latest +//> using dep org.scala-lang::toolkit-test:latest.stable // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TODO: remove when scala-cli supports toolkit-test class MathSuite extends munit.FunSuite { diff --git a/publish-conf.scala b/publish-conf.scala index 955504e..f1a525a 100644 --- a/publish-conf.scala +++ b/publish-conf.scala @@ -1,9 +1,9 @@ -//> using publish.organization "org.scala-lang" -//> using publish.computeVersion "git:tag" -//> using publish.url "https://github.com/scala/toolkit" -//> using publish.vcs "github:scala/toolkit" -//> using publish.license "Apache-2.0" -//> using publish.repository "central" +//> using publish.organization org.scala-lang +//> using publish.computeVersion git:tag +//> using publish.url https://github.com/scala/toolkit +//> using publish.vcs github:scala/toolkit +//> using publish.license Apache-2.0 +//> using publish.repository central //> using publish.developer "szymon-rd|Simon R|https://github.com/szymon-rd" //> using publish.developer "adpi2|Adrien Piquerez|https://github.com/adpi2" -//> using repository "sonatype:public" +//> using repository sonatype:public