Skip to content

Commit

Permalink
Update: Maven Central info
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-lee committed Jul 12, 2023
1 parent eef734b commit c51b8df
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ ThisBuild / scmInfo :=
s"https://github.com/${props.GitHubUsername}/${props.RepoName}.git",
).some
ThisBuild / licenses := List("MIT" -> url("http://opensource.org/licenses/MIT"))

ThisBuild / resolvers += "sonatype-snapshots" at s"https://${props.SonatypeCredentialHost}/content/repositories/snapshots"

ThisBuild / useAggressiveScalacOptions := true

ThisBuild / scalafixConfig := (
Expand All @@ -42,6 +45,7 @@ lazy val maven2sbt = (project in file("."))
docusaurBuildDir := docusaurDir.value / "build",
/* } Website */
)
.settings(mavenCentralPublishSettings)
.settings(noPublish)
.aggregate(core, cli)

Expand Down Expand Up @@ -119,6 +123,9 @@ lazy val props =
val RepoName = "maven2sbt"
val ExecutableScriptName = RepoName

val SonatypeCredentialHost = "s01.oss.sonatype.org"
val SonatypeRepository = s"https://$SonatypeCredentialHost/service/local"

val Scala2Version = "2.13.10"
val DottyVersion = "3.2.2"
val CrossScalaVersions = List("2.12.17", Scala2Version, DottyVersion).distinct
Expand Down Expand Up @@ -206,6 +213,13 @@ def scalacOptionsPostProcess(scalaVersion: String, options: Seq[String]): Seq[St
"-Xsource:3" +: options.filterNot(_ == "UTF-8")
}

lazy val mavenCentralPublishSettings: SettingsDefinition = List(
/* Publish to Maven Central { */
sonatypeCredentialHost := props.SonatypeCredentialHost,
sonatypeRepository := props.SonatypeRepository,
/* } Publish to Maven Central */
)

def module(projectName: String): Project = {
val prefixedName = prefixedProjectName(projectName)
Project(projectName, file(s"modules/$prefixedName"))
Expand Down

0 comments on commit c51b8df

Please sign in to comment.