Skip to content

Commit

Permalink
Merge pull request #343 from kevin-lee/update-maven-central
Browse files Browse the repository at this point in the history
Update: Maven Central info
  • Loading branch information
kevin-lee committed Jul 12, 2023
2 parents eef734b + c51b8df commit b9cb62e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions build.sbt
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 b9cb62e

Please sign in to comment.