diff --git a/.scalafmt.conf b/.scalafmt.conf index 285a6cd..cafa679 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = 3.9.7 +version = 3.9.8 runner.dialect = scala3 maxColumn = 120 diff --git a/build.sbt b/build.sbt index 082a6cf..b9828ad 100644 --- a/build.sbt +++ b/build.sbt @@ -45,7 +45,7 @@ lazy val lib = project "org.yaml" % "snakeyaml" % "2.4", CrossVersion.partialVersion(scalaVersion.value) match { case Some((3, _)) => - "org.specs2" %% "specs2-core" % "5.6.3" % "test" + "org.specs2" %% "specs2-core" % "5.6.4" % "test" case Some((2, scalaMajor)) if scalaMajor >= 11 => "org.specs2" %% "specs2-core" % "4.21.0" % "test" case _ => @@ -59,29 +59,45 @@ lazy val lib = project Compile / unmanagedResources / includeFilter := "regexes.yaml", Test / unmanagedResourceDirectories += (ThisBuild / baseDirectory).value / "core", Test / unmanagedResources / includeFilter := "*.yaml", + Test / publishArtifact := false, + publishMavenStyle := true, + publishTo := { + val centralSnapshots = "https://central.sonatype.com/repository/maven-snapshots/" + if (isSnapshot.value) Some("central-snapshots" at centralSnapshots) + else localStaging.value + } + ) - // Publishing - publishMavenStyle := true, - publishTo := sonatypePublishToBundle.value, - Test / publishArtifact := false, - releaseCrossBuild := true, - releaseTagComment := s"Release ${(ThisBuild / version).value}", - releaseCommitMessage := s"Set version to ${(ThisBuild / version).value}", - releaseProcess := Seq[ReleaseStep]( - checkSnapshotDependencies, - inquireVersions, - runClean, - runTest, - setReleaseVersion, - commitReleaseVersion, - tagRelease, - releaseStepCommandAndRemaining("+publishSigned"), - releaseStepCommand("sonatypeBundleRelease"), - setNextVersion, - commitNextVersion, - pushChanges - ), - pomExtra := (https://github.com/ua-parser/uap-scala +lazy val benchmark = project + .in(file("modules/benchmark")) + .settings(commonSettings *) + .dependsOn(lib) + .enablePlugins(JmhPlugin) + .settings( + name := "uap-scala-benchmark", + Jmh / run / mainClass := Some("org.uaparser.scala.benchmark.Main"), + publish / skip := true + ) + +// Publishing settings +releaseCrossBuild := true +releaseTagComment := s"Release ${(ThisBuild / version).value}" +releaseCommitMessage := s"Set version to ${(ThisBuild / version).value}" +releaseProcess := Seq[ReleaseStep]( + checkSnapshotDependencies, + inquireVersions, + runClean, + runTest, + setReleaseVersion, + commitReleaseVersion, + tagRelease, + releaseStepCommandAndRemaining("+publishSigned"), + releaseStepCommand("sonaRelease"), + setNextVersion, + commitNextVersion, + pushChanges +) +ThisBuild / pomExtra := (https://github.com/ua-parser/uap-scala WTFPL @@ -115,18 +131,6 @@ lazy val lib = project https://twitter.com/phuc89 ) - ) - -lazy val benchmark = project - .in(file("modules/benchmark")) - .settings(commonSettings *) - .dependsOn(lib) - .enablePlugins(JmhPlugin) - .settings( - name := "uap-scala-benchmark", - Jmh / run / mainClass := Some("org.uaparser.scala.benchmark.Main"), - publish / skip := true - ) // do not cross build or publish the aggregating root crossScalaVersions := Nil diff --git a/core b/core index 7388149..6a0ecc9 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 7388149c18ae0b614fc6e49758a2dd331a5b9559 +Subproject commit 6a0ecc9b044965220951e51e9f0e634539ef4063 diff --git a/modules/lib/src/test/scala/org/uaparser/scala/ParserSpecBase.scala b/modules/lib/src/test/scala/org/uaparser/scala/ParserSpecBase.scala index 11acba0..64a1b70 100644 --- a/modules/lib/src/test/scala/org/uaparser/scala/ParserSpecBase.scala +++ b/modules/lib/src/test/scala/org/uaparser/scala/ParserSpecBase.scala @@ -12,7 +12,7 @@ trait ParserSpecBase extends Specification { def createFromStream(stream: InputStream): UserAgentStringParser "Parser should" >> { - val yaml = { + def yaml() = { val maxFileSizeBytes = 5 * 1024 * 1024 // 5 MB val loaderOptions = new LoaderOptions() loaderOptions.setCodePointLimit(maxFileSizeBytes) @@ -21,7 +21,7 @@ trait ParserSpecBase extends Specification { def readCasesConfig(resource: String): List[Map[String, String]] = { val stream = this.getClass.getResourceAsStream(resource) - val cases = YamlUtil.loadYamlAsMap(stream, yaml) + val cases = YamlUtil.loadYamlAsMap(stream, yaml()) cases.getOrElse("test_cases", List()).filterNot(_.contains("js_ua")).map { config => config.filterNot { case (_, value) => value eq null } diff --git a/project/build.properties b/project/build.properties index 6520f69..c02c575 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.11.0 +sbt.version=1.11.3 diff --git a/project/plugins.sbt b/project/plugins.sbt index b304e93..46a7509 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -2,6 +2,5 @@ addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.14.3") addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1") addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.4") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.4") -addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.12.2") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.5") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.7") diff --git a/version.sbt b/version.sbt index 56ec8ab..f4b544f 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -ThisBuild / version := "0.19.1-SNAPSHOT" +ThisBuild / version := "0.20.1-SNAPSHOT" pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy