1- import org . latestbit . sbt . gcs . GcsPublishFilePolicy
1+ lazy val ScalaVersions = Seq ( " 3.6.2 " , " 2.12.20 " )
22
33ThisBuild / organization := " org.latestbit"
44
@@ -15,22 +15,22 @@ ThisBuild / scalacOptions ++= Seq(
1515 " -Xlint" ,
1616 " -deprecation" ,
1717 " -feature" ,
18- " -language:_" ,
1918 " -unchecked"
2019)
2120
22- lazy val sbtGcsPlaygroundToPublish = project
23- .in( file( " playground-publish" ) )
21+ lazy val testGoogleArtifactRegistry = " europe-north1-maven.pkg.dev/latestbit/latestbit-artifacts-snapshots"
22+
23+ lazy val sbtGcsPlaygroundToPublish = ( projectMatrix in file( " playground-publish" ) )
2424 .settings(
2525 name := " sbt-gcs-plugin-playground-publish" ,
2626 version := " 0.0.7" ,
2727 crossScalaVersions := Nil ,
2828 publishTo := Some ( " Custom Releases" at " gs://private-artifacts" ),
2929 logLevel := Level .Debug
3030 )
31+ .jvmPlatform( scalaVersions = ScalaVersions )
3132
32- lazy val sbtGcsPlaygroundToResolve = project
33- .in( file( " playground-resolve" ) )
33+ lazy val sbtGcsPlaygroundToResolve = ( projectMatrix in file( " playground-resolve" ) )
3434 .settings(
3535 name := " sbt-gcs-plugin-playground-resolve" ,
3636 crossScalaVersions := Nil ,
@@ -40,37 +40,76 @@ lazy val sbtGcsPlaygroundToResolve = project
4040 ),
4141 logLevel := Level .Debug
4242 )
43+ .jvmPlatform( scalaVersions = ScalaVersions )
4344
44- lazy val sbtGcsArtifactRepositoryPlaygroundToPublish = project
45- .in( file( " playground-publish-artifact-repository" ) )
46- .settings(
47- name := " sbt-gcs-plugin-playground-artifact-publish" ,
48- version := " 0.0.25-SNAPSHOT" ,
49- crossScalaVersions := Nil ,
50- publishTo := Some (
51- " Custom Releases" at " artifactregistry://europe-north1-maven.pkg.dev/latestbit/latestbit-artifacts-snapshots"
52- ),
53- logLevel := Level .Debug
54- )
45+ lazy val sbtGcsArtifactRepositoryPlaygroundToPublish =
46+ ( projectMatrix in file( " playground-publish-artifact-repository" ) )
47+ .settings(
48+ name := " sbt-gcs-plugin-playground-artifact-publish" ,
49+ version := " 0.0.25-SNAPSHOT" ,
50+ crossScalaVersions := Nil ,
51+ publishTo := Some (
52+ " Custom Releases" at s " artifactregistry:// ${testGoogleArtifactRegistry}"
53+ ),
54+ logLevel := Level .Debug
55+ )
56+ .jvmPlatform( scalaVersions = ScalaVersions )
57+
58+ lazy val sbtGcsArtifactRepositoryPlaygroundToResolve =
59+ ( projectMatrix in file( " playground-resolve-artifact-repository" ) )
60+ .settings(
61+ name := " sbt-gcs-plugin-playground-artifact-resolve" ,
62+ crossScalaVersions := Nil ,
63+ resolvers += " Custom Releases" at s " artifactregistry:// ${testGoogleArtifactRegistry}" ,
64+ libraryDependencies ++= Seq (
65+ " org.latestbit" %% " sbt-gcs-plugin-playground-artifact-publish" % " 0.0.25-SNAPSHOT"
66+ ),
67+ logLevel := Level .Debug
68+ )
69+ .jvmPlatform( scalaVersions = ScalaVersions )
5570
56- lazy val sbtGcsArtifactRepositoryPlaygroundToResolve = project
57- .in( file( " playground-resolve-artifact-repository " ) )
71+ lazy val plugin = ( projectMatrix in file( " sbt-gcs-plugin " ) )
72+ .enablePlugins( GitVersioning , SbtPlugin )
5873 .settings(
59- name := " sbt-gcs-plugin-playground-artifact-resolve" ,
60- crossScalaVersions := Nil ,
61- resolvers += " Custom Releases" at " artifactregistry://europe-north1-maven.pkg.dev/latestbit/latestbit-artifacts-snapshots" ,
62- libraryDependencies ++= Seq (
63- " org.latestbit" %% " sbt-gcs-plugin-playground-artifact-publish" % " 0.0.25-SNAPSHOT"
74+ name := " sbt-gcs-plugin" ,
75+ description := " A SBT plugin for Google Cloud Storage (GCS) and Google Artifact Registry" ,
76+ organization := " org.latestbit" ,
77+ homepage := Some ( url( " http://latestbit.com" ) ),
78+ licenses += ( " Apache-2.0" , url( " https://www.apache.org/licenses/LICENSE-2.0.html" ) ),
79+ scmInfo := Some (
80+ ScmInfo (
81+ url(" https://github.com/abdolence/sbt-gcs-resolver" ),
82+ " scm:git@github.com:abdolence/sbt-gcs-resolver.git"
83+ )
6484 ),
65- logLevel := Level .Debug
85+ developers := List (
86+ Developer (
87+ id = " abdolence" ,
88+ name = " Abdulla Abdurakhmanov" ,
89+ email = " me@abdolence.dev" ,
90+ url = url(" http://abdolence.dev" )
91+ )
92+ ),
93+ publishTo := {
94+ val centralSnapshots = " https://central.sonatype.com/repository/maven-snapshots/"
95+ if version.value.endsWith(" -SNAPSHOT" ) then Some (" central-snapshots" at centralSnapshots)
96+ else localStaging.value
97+ },
98+ sbtPlugin := true ,
99+ publishMavenStyle := true ,
100+ credentials += Credentials (Path .userHome / " .sbt" / " sonatype_central_credentials" ),
101+ scalaVersion := " 2.12.20" ,
102+ libraryDependencies ++= Seq (
103+ " org.scala-lang" % " scala-library" % scalaVersion.value,
104+ " org.scala-lang" % " scala-reflect" % scalaVersion.value,
105+ " org.scala-lang" % " scala-compiler" % scalaVersion.value,
106+ " org.apache.ivy" % " ivy" % " 2.4.0" ,
107+ " com.google.cloud" % " google-cloud-storage" % " 2.62.0"
108+ )
66109 )
110+ .jvmPlatform( scalaVersions = ScalaVersions )
67111
68- lazy val plugin = project
69- .in( file( " sbt-gcs-plugin" ) )
70- .enablePlugins( GitVersioning )
71-
72- lazy val sbtGcsRoot = project
73- .in( file( " ." ) )
112+ lazy val sbtGcsRoot = ( projectMatrix in file( " ." ) )
74113 .settings(
75114 name := " sbt-gcs-plugin-root" ,
76115 crossScalaVersions := Nil ,
@@ -79,6 +118,4 @@ lazy val sbtGcsRoot = project
79118 publishArtifact := false ,
80119 logLevel := Level .Debug
81120 )
82- .aggregate( sbtGcsPlaygroundToPublish )
83-
84- Global / gcsPublishFilePolicy := GcsPublishFilePolicy .InheritedFromBucket
121+ .jvmPlatform( scalaVersions = ScalaVersions )
0 commit comments