Skip to content

Commit

Permalink
Publish scio-bom (#5423)
Browse files Browse the repository at this point in the history
  • Loading branch information
RustedBones authored Jul 9, 2024
1 parent 1da492c commit 0e3b37f
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ jobs:

- name: Make target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
run: mkdir -p integration/target scio-tensorflow/target site/target scio-cassandra/cassandra3/target scio-jmh/target scio-elasticsearch/es8/target scio-jdbc/target scio-macros/target scio-grpc/target scio-elasticsearch/common/target scio-test/target scio-avro/target scio-elasticsearch/es7/target scio-redis/target scio-extra/target scio-test/parquet/target scio-test/core/target scio-google-cloud-platform/target scio-smb/target scio-test/google-cloud-platform/target scio-neo4j/target scio-parquet/target scio-core/target scio-repl/target project/target
run: mkdir -p scio-bom/target scio-tensorflow/target site/target scio-cassandra/cassandra3/target scio-elasticsearch/es8/target scio-jdbc/target scio-macros/target scio-grpc/target scio-elasticsearch/common/target scio-test/target scio-avro/target scio-elasticsearch/es7/target scio-redis/target scio-extra/target scio-test/parquet/target scio-test/core/target scio-google-cloud-platform/target scio-smb/target scio-test/google-cloud-platform/target scio-neo4j/target scio-parquet/target scio-core/target scio-repl/target project/target

- name: Compress target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
run: tar cf targets.tar integration/target scio-tensorflow/target site/target scio-cassandra/cassandra3/target scio-jmh/target scio-elasticsearch/es8/target scio-jdbc/target scio-macros/target scio-grpc/target scio-elasticsearch/common/target scio-test/target scio-avro/target scio-elasticsearch/es7/target scio-redis/target scio-extra/target scio-test/parquet/target scio-test/core/target scio-google-cloud-platform/target scio-smb/target scio-test/google-cloud-platform/target scio-neo4j/target scio-parquet/target scio-core/target scio-repl/target project/target
run: tar cf targets.tar scio-bom/target scio-tensorflow/target site/target scio-cassandra/cassandra3/target scio-elasticsearch/es8/target scio-jdbc/target scio-macros/target scio-grpc/target scio-elasticsearch/common/target scio-test/target scio-avro/target scio-elasticsearch/es7/target scio-redis/target scio-extra/target scio-test/parquet/target scio-test/core/target scio-google-cloud-platform/target scio-smb/target scio-test/google-cloud-platform/target scio-neo4j/target scio-parquet/target scio-core/target scio-repl/target project/target

- name: Upload target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
Expand Down Expand Up @@ -292,7 +292,7 @@ jobs:
- name: Submit Dependencies
uses: scalacenter/sbt-dependency-submission@v2
with:
modules-ignore: scio_2.13 scio_2.12 scio-examples_2.13 scio-examples_2.12
modules-ignore: scio_2.13 scio_2.12 scio-examples_2.13 scio-examples_2.12 integration_2.13 integration_2.12 scio-jmh_2.13 scio-jmh_2.12
configs-ignore: test scala-tool scala-doc-tool test-internal

validate-steward:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ metals.sbt
.bigquery/
.scio_repl
*.jfr
scio-bom/
46 changes: 41 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ lazy val scio = project
.aggregate(
`integration`,
`scio-avro`,
`scio-bom`,
`scio-cassandra3`,
`scio-core`,
`scio-elasticsearch-common`,
Expand All @@ -649,6 +650,43 @@ lazy val scio = project
`scio-test`
)

lazy val `scio-bom` = project
.in(file("scio-bom"))
.enablePlugins(BillOfMaterialsPlugin)
.disablePlugins(TypelevelSettingsPlugin)
.settings(
// Just one BOM including all cross Scala versions
crossVersion := CrossVersion.disabled,
// Create BOM in the first run
crossScalaVersions := Seq(scalaDefault),
bomIncludeProjects := Seq(
`scio-avro`,
`scio-cassandra3`,
`scio-core`,
`scio-elasticsearch-common`,
`scio-elasticsearch7`,
`scio-elasticsearch8`,
`scio-extra`,
`scio-google-cloud-platform`,
`scio-grpc`,
`scio-jdbc`,
`scio-macros`,
`scio-neo4j`,
`scio-parquet`,
`scio-redis`,
`scio-repl`,
`scio-smb`,
`scio-tensorflow`,
`scio-test-core`,
`scio-test-google-cloud-platform`,
`scio-test-parquet`,
`scio-test`
),
// only releases after 0.14.6
tlMimaPreviousVersions := tlMimaPreviousVersions.value
.filter(v => VersionNumber(v).numbers.last >= 6)
)

lazy val `scio-core` = project
.in(file("scio-core"))
.enablePlugins(BuildInfoPlugin)
Expand Down Expand Up @@ -1509,6 +1547,7 @@ lazy val `scio-repl` = project
lazy val `scio-jmh` = project
.in(file("scio-jmh"))
.enablePlugins(JmhPlugin)
.enablePlugins(NoPublishPlugin)
.dependsOn(
`scio-core`,
`scio-avro`
Expand All @@ -1525,9 +1564,7 @@ lazy val `scio-jmh` = project
// test
"org.hamcrest" % "hamcrest" % hamcrestVersion % Test,
"org.slf4j" % "slf4j-nop" % slf4jVersion % Test
),
publish / skip := true,
mimaPreviousArtifacts := Set.empty
)
)

lazy val `scio-smb` = project
Expand Down Expand Up @@ -1618,6 +1655,7 @@ lazy val `scio-redis` = project

lazy val integration = project
.in(file("integration"))
.enablePlugins(NoPublishPlugin)
.dependsOn(
`scio-core` % "compile;test->test",
`scio-avro` % "test->test",
Expand All @@ -1633,7 +1671,6 @@ lazy val integration = project
.settings(jUnitSettings)
.settings(macroSettings)
.settings(
publish / skip := true,
// disable compile / test when unauthorized
compile / skip := skipUnauthorizedGcpGithubWorkflow.value,
test / skip := true,
Expand All @@ -1649,7 +1686,6 @@ lazy val integration = project
},
undeclaredCompileDependenciesTest := undeclaredCompileDependenciesTestSkipped.value,
unusedCompileDependenciesTest := unusedCompileDependenciesTestSkipped.value,
mimaPreviousArtifacts := Set.empty,
libraryDependencies ++= Seq(
// compile
"com.google.api-client" % "google-api-client" % gcpBom.key.value,
Expand Down
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ addSbtPlugin("com.github.sbt" % "sbt-avro" % "3.4.4")
addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0")
addSbtPlugin("com.here.platform" % "sbt-bom" % "1.0.12")
addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % "0.10.7")
addSbtPlugin("com.lightbend.sbt" % "sbt-bill-of-materials" % "1.0.2")
addSbtPlugin("com.lightbend.sbt" % "sbt-java-formatter" % "0.8.0")
addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.7")
addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.2")
Expand Down

0 comments on commit 0e3b37f

Please sign in to comment.