From 9c6bc8f9c05cdfe90d5acaf77524d237a6635412 Mon Sep 17 00:00:00 2001 From: BaekGeunYoung Date: Tue, 13 Dec 2022 18:38:46 +0900 Subject: [PATCH] common settings --- build.sbt | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/build.sbt b/build.sbt index e1430799..b7a54460 100644 --- a/build.sbt +++ b/build.sbt @@ -13,19 +13,19 @@ ThisBuild / resolvers ++= Resolver.sonatypeOssRepos("snapshots") ThisBuild / versionScheme := Some("early-semver") -ThisBuild / resolvers += "GitHub Package Registry (iamport/zio-grpc)" at "https://maven.pkg.github.com/iamport/zio-grpc" - -ThisBuild / credentials ++= Seq( - Credentials( - "GitHub Package Registry", - "maven.pkg.github.com", - scala.sys.env("GITHUB_ACTOR"), - scala.sys.env("GITHUB_TOKEN") - ) -) - -ThisBuild / publishTo := Some( - "GitHub Package Registry (iamport/zio-grpc)" at "https://maven.pkg.github.com/iamport/zio-grpc" +val commonPublishSettings = Seq( + credentials ++= Seq( + Credentials( + "GitHub Package Registry", + "maven.pkg.github.com", + scala.sys.env("GITHUB_ACTOR"), + scala.sys.env("GITHUB_TOKEN") + ) + ), + publishTo := Some( + "GitHub Package Registry (iamport/zio-grpc)" at "https://maven.pkg.github.com/iamport/zio-grpc" + ), + resolvers += "GitHub Package Registry (iamport/zio-grpc)" at "https://maven.pkg.github.com/iamport/zio-grpc" ) publish / skip := true @@ -63,6 +63,7 @@ lazy val core = projectMatrix "dev.zio" %%% "zio-test-sbt" % Version.zio % "test" ) ) + .settings(commonPublishSettings) .jvmPlatform( ScalaVersions, Seq( @@ -98,6 +99,7 @@ lazy val codeGen = projectMatrix "com.thesamet.scalapb" %% "compilerplugin" % scalapb.compiler.Version.scalapbVersion ) ) + .settings(commonPublishSettings) .jvmPlatform(scalaVersions = ScalaVersions) lazy val codeGenJVM212 = codeGen.jvm(Scala212) @@ -113,6 +115,7 @@ lazy val protocGenZio = protocGenProject("protoc-gen-zio", codeGenJVM212) (assembly / assemblyMergeStrategy).value.apply(x) } ) + .settings(commonPublishSettings) lazy val e2eProtos = projectMatrix