Skip to content

Commit

Permalink
feat: publish to github
Browse files Browse the repository at this point in the history
  • Loading branch information
valdo404 committed Feb 26, 2021
1 parent d025487 commit 8573af0
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 11 deletions.
17 changes: 16 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name := "scala-openrtb"

version in ThisBuild := "1.4.0"


scalaVersion in ThisBuild := "2.13.1"
crossScalaVersions in ThisBuild := Seq("2.12.10", "2.13.1")
organization in ThisBuild := "com.powerspace.openrtb"
Expand All @@ -14,7 +15,6 @@ scalacOptions in ThisBuild := Seq(
"-deprecation",
"-encoding",
"utf8",
"-opt:l:default,l:inline,l:method",
"-unchecked",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
Expand All @@ -26,6 +26,12 @@ scalacOptions in ThisBuild := Seq(

publishArtifact in root := false

val resolutionSettings = Seq(
githubTokenSource := TokenSource.Or(TokenSource.Environment("GITHUB_TOKEN"), TokenSource.GitConfig("github.token")),
githubOwner := "valdo404",
githubRepository := "scala-openrtb"
)

val testSettings = Seq(
libraryDependencies ++= Seq(
"org.scalactic" %% "scalactic" % "3.0.8" % "test",
Expand All @@ -36,28 +42,34 @@ val testSettings = Seq(
// OpenRTB Scala model
lazy val openRtbModel = Project(id = "openrtb-model", base = file("openrtb-model"))
.settings(testSettings: _*)
.settings(resolutionSettings: _*)

// OpenRTB JSON Serialization & Deserialization
lazy val openRtbJson = Project(id = "openrtb-json", base = file("openrtb-json"))
.dependsOn(openRtbModel)
.settings(resolutionSettings: _*)

// BidSwitch Scala model
lazy val bidswitchModel = Project(id = "bidswitch-model", base = file("bidswitch-model"))
.dependsOn(openRtbModel % "compile->compile;test->test")
.settings(resolutionSettings: _*)

// BidSwitch JSON Serialization & Deserialization
lazy val bidswitchJson = Project(id = "bidswitch-json", base = file("bidswitch-json"))
.dependsOn(bidswitchModel % "compile->compile;test->test", openRtbJson % "compile->compile;test->test")
.settings(testSettings: _*)
.settings(resolutionSettings: _*)

// Akka Http marshallers and unmarshallers
lazy val akkaHttpMarshaller = Project(id = "akka-http-marshallers", base = file("akka-http-marshallers"))
.dependsOn(openRtbJson)
.settings(resolutionSettings: _*)

// scala-openrtb examples
lazy val examples = Project(id = "examples", base = file("examples"))
.dependsOn(openRtbJson % "compile->compile;test->test")
.settings(skip in publish := true)
.settings(resolutionSettings: _*)

lazy val benchmarks = Project(id = "benchmarks", base = file("benchmarks"))
.enablePlugins(JmhPlugin)
Expand All @@ -66,6 +78,7 @@ lazy val benchmarks = Project(id = "benchmarks", base = file("benchmarks"))
examples
)
.settings(skip in publish := true)
.settings(resolutionSettings: _*)

lazy val root = (project in file("."))
.aggregate(
Expand All @@ -77,3 +90,5 @@ lazy val root = (project in file("."))
examples,
benchmarks
)
.settings(resolutionSettings: _*)

2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version = 1.4.7
sbt.version = 1.4.7
1 change: 1 addition & 0 deletions project/release.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.2")
14 changes: 5 additions & 9 deletions publish.sbt
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import sbt.url

sonatypeProfileName in ThisBuild := "com.powerspace"

publishMavenStyle in ThisBuild := true
publishConfiguration in ThisBuild := publishConfiguration.value.withOverwrite(true)

licenses in ThisBuild := Seq("APL2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt"))

homepage in ThisBuild := Some(url("https://github.com/Powerspace/scala-openrtb"))
homepage in ThisBuild := Some(url("https://github.com/valdo404/scala-openrtb"))

scmInfo in ThisBuild := Some(
ScmInfo(
url("https://github.com/Powerspace/scala-openrtb"),
"scm:git@github.com:Powerspace/scala-openrtb.git"
url("https://github.com/valdo404/scala-openrtb"),
"scm:git@github.com:valdo404/scala-openrtb.git"
)
)

Expand All @@ -38,8 +37,5 @@ developers in ThisBuild := List(
url = url("https://github.com/Garnek20"))
)

pomIncludeRepository in ThisBuild := { _ =>
false
}
publishTo in ThisBuild := sonatypePublishToBundle.value
pomIncludeRepository in ThisBuild:= { _ => false }
publishMavenStyle in ThisBuild := true

0 comments on commit 8573af0

Please sign in to comment.