From b6d44202524357d52d4b137f08879157d744d0ba Mon Sep 17 00:00:00 2001 From: "Yubing Dong (Tom)" Date: Thu, 22 Jul 2021 00:12:00 -0700 Subject: [PATCH] Update sbt & plugins --- build.sbt | 35 +---------------------------------- project/build.properties | 2 +- project/plugins.sbt | 6 +++--- publish.sbt | 37 +++++++++++++++++++++++++++++++++++++ 4 files changed, 42 insertions(+), 38 deletions(-) create mode 100644 publish.sbt diff --git a/build.sbt b/build.sbt index d12afa1..6916f5b 100644 --- a/build.sbt +++ b/build.sbt @@ -1,49 +1,16 @@ name := "latex2unicode" -organization := "com.github.tomtung" - version := "0.2.7" scalaVersion := "2.12.14" crossScalaVersions := Seq("2.11.12", "2.12.14") -licenses := Seq("Apache 2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")) - -homepage := Some(url("https://github.com/tomtung/latex2unicode")) - -pomIncludeRepository := { _ => false } - libraryDependencies ++= Seq( "com.lihaoyi" %% "fastparse" % "1.0.0", "org.scalatest" %% "scalatest" % "3.2.9" % "test" ) -publishMavenStyle := true - -publishArtifact in Test := false - -publishTo := { - val nexus = "https://oss.sonatype.org/" - if (version.value.trim.endsWith("SNAPSHOT")) - Some("snapshots" at nexus + "content/repositories/snapshots") - else - Some("releases" at nexus + "service/local/staging/deploy/maven2") -} - -pomExtra := ( - - git@github.com:tomtung/latex2unicode.git - scm:git:git@github.com:tomtung/latex2unicode.git - - - - tomtung - Tom Dong - http://tomtung.com - - ) - -packageOptions in (Compile, packageBin) += Package.ManifestAttributes( +Compile / packageBin / packageOptions += Package.ManifestAttributes( "Automatic-Module-Name" -> "com.github.tomtung.latex2unicode" ) diff --git a/project/build.properties b/project/build.properties index 5f32afe..10fd9ee 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.13 \ No newline at end of file +sbt.version=1.5.5 diff --git a/project/plugins.sbt b/project/plugins.sbt index 6eb0401..ef20803 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,5 @@ -addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.6.0") +addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.3") -addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1") +addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.7") -addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0") +addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1") diff --git a/publish.sbt b/publish.sbt new file mode 100644 index 0000000..93b2822 --- /dev/null +++ b/publish.sbt @@ -0,0 +1,37 @@ +ThisBuild / versionScheme := Some("early-semver") + +ThisBuild / organization := "com.github.tomtung" + +ThisBuild / scmInfo := Some( + ScmInfo( + url("https://github.com/tomtung/latex2unicode"), + "scm:git@github.com:tomtung/latex2unicode.git" + ) +) + +ThisBuild / developers := List( + Developer( + id = "tomtung", + name = "Tom Dong", + email = "tom.tung.dyb@gmail.com", + url = url("https://github.com/tomtung/") + ) +) + +ThisBuild / description := "Convert LaTeX markup to Unicode." + +ThisBuild / licenses := List("Apache 2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")) + +ThisBuild / homepage := Some(url("https://github.com/tomtung/latex2unicode")) + +ThisBuild / pomIncludeRepository := { _ => false } + +ThisBuild / Test / publishArtifact := false + +ThisBuild / publishTo := { + val nexus = "https://oss.sonatype.org/" + if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots") + else Some("releases" at nexus + "service/local/staging/deploy/maven2") +} + +ThisBuild / publishMavenStyle := true