Skip to content

Commit

Permalink
publish the plugin to maven store via sonatype (#49)
Browse files Browse the repository at this point in the history
* publish to sonatype

* update
  • Loading branch information
wing328 authored Mar 29, 2024
1 parent 4ae9bf0 commit dacd9a7
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 8 deletions.
9 changes: 3 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ lazy val `sbt-openapi-generator` = (project in file("."))
crossSbtVersions := List("0.13.17", "1.3.10"),
sbtPlugin := true,

publishMavenStyle := false,

bintrayRepository := "sbt-plugins",
bintrayOrganization := Option("openapitools"),
bintrayPackageLabels := Seq("sbt", "plugin", "oas", "openapi", "openapi-generator"),
bintrayVcsUrl := Some("[email protected]:OpenAPITools/sbt-openapi-generator.git"),
publishMavenStyle := true,

scriptedLaunchOpts := {
scriptedLaunchOpts.value ++ Seq("-Xmx1024M", "-server", "-Dplugin.version=" + version.value)
Expand All @@ -32,6 +27,8 @@ lazy val `sbt-openapi-generator` = (project in file("."))
Resolver.sonatypeRepo("snapshots")
),

version := "7.3.0",

homepage := Some(url("https://openapi-generator.tech")),

organization := "org.openapitools",
Expand Down
5 changes: 3 additions & 2 deletions project/plugin.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Manages publishing.
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.6")
//addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.6")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.10.0")

// Versions the build.
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1")
//addSbtPlugin("com.dwijnand" % "sbt-dynver" % "5.0.1")
36 changes: 36 additions & 0 deletions publish.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
ThisBuild / organization := "org.openapitools.sbt-openapi-generator"
ThisBuild / organizationName := "OpenAPITools"
ThisBuild / organizationHomepage := Some(url("http://openapitools.org"))

ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/openapitools/sbt-openapi-generator"),
"scm:[email protected]:openapitools/sbt-openapi-generator.git"
)
)
ThisBuild / developers := List(
Developer(
id = "openapitools",
name = "OpenAPI Tools",
email = "[email protected]",
url = url("http://openapitools.org")
)
)

ThisBuild / description := "openapi-generator sbt plugin."
ThisBuild / licenses := List(
"Apache 2" -> new URL("http://www.apache.org/licenses/LICENSE-2.0.txt")
)
ThisBuild / homepage := Some(url("https://github.com/openapitools/sbt-openapi-generator"))

// Remove all additional repository other than Maven Central from POM
ThisBuild / pomIncludeRepository := { _ => false }
ThisBuild / publishTo := {
// For accounts created after Feb 2021:
// val nexus = "https://s01.oss.sonatype.org/"
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")
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
ThisBuild / publishMavenStyle := true

0 comments on commit dacd9a7

Please sign in to comment.