diff --git a/.github/workflows/release2.yaml b/.github/workflows/release2.yaml
new file mode 100644
index 00000000..c0ff6020
--- /dev/null
+++ b/.github/workflows/release2.yaml
@@ -0,0 +1,44 @@
+#
+# Copyright 2022 ABSA Group Limited
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: Release2
+
+on:
+ workflow_dispatch:
+
+defaults:
+ run:
+ shell: bash
+
+jobs:
+ publish:
+ runs-on: ubuntu-22.04
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ - uses: actions/setup-java@v4.2.1
+ with:
+ distribution: temurin
+ java-version: 8
+ cache: sbt
+ - name: Build and release to Sonatype and Maven Central
+ run: sbt ci-release
+ env:
+ PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
+ PGP_SECRET: ${{ secrets.PGP_SECRET }}
+ SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
+ SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
diff --git a/build.sbt b/build.sbt
index 92cb7aa9..d8d1eb22 100644
--- a/build.sbt
+++ b/build.sbt
@@ -52,9 +52,11 @@ lazy val cobrix = (project in file("."))
.disablePlugins(sbtassembly.AssemblyPlugin)
.settings(
name := "cobrix",
+ crossScalaVersions := List(scala211, scala212, scala213),
// No need to publish the aggregation [empty] artifact
publishArtifact := false,
+ publish / skip := true,
publish := {},
publishLocal := {}
)
@@ -65,13 +67,13 @@ lazy val cobolParser = (project in file("cobol-parser"))
.enablePlugins(AutomateHeaderPlugin)
.settings(
name := "cobol-parser",
+ crossScalaVersions := List(scala211, scala212, scala213),
libraryDependencies ++= CobolParserDependencies :+ getScalaDependency(scalaVersion.value),
shadedDependencies ++= CobolParserShadedDependencies,
shadingRules ++= Seq (
ShadingRule.moveUnder("org.antlr.v4.runtime", "za.co.absa.cobrix.cobol.parser.shaded")
),
validNamespaces ++= Set("za"),
- releasePublishArtifactsAction := PgpKeys.publishSigned.value,
assemblySettings,
jacocoReportSettings := commonJacocoReportSettings.withTitle("cobrix:cobol-parser Jacoco Report"),
jacocoExcludes := commonJacocoExcludes
@@ -83,9 +85,11 @@ lazy val cobolConverters = (project in file("cobol-converters"))
.enablePlugins(AutomateHeaderPlugin)
.settings(
name := "cobol-converters",
+ crossScalaVersions := List(scala211, scala212, scala213),
libraryDependencies ++= CobolConvertersDependencies :+ getScalaDependency(scalaVersion.value),
// No need to publish this artifact since it has test only at the moment
publishArtifact := false,
+ publish / skip := true,
publish := {},
publishLocal := {}
)
@@ -93,6 +97,7 @@ lazy val cobolConverters = (project in file("cobol-converters"))
lazy val sparkCobol = (project in file("spark-cobol"))
.settings(
name := "spark-cobol",
+ crossScalaVersions := List(scala211, scala212, scala213),
printSparkVersion := {
val log = streams.value.log
log.info(s"Building with Spark ${sparkVersion(scalaVersion.value)}, Scala ${scalaVersion.value}")
@@ -109,10 +114,8 @@ lazy val sparkCobol = (project in file("spark-cobol"))
}
},
libraryDependencies ++= SparkCobolDependencies(scalaVersion.value) :+ getScalaDependency(scalaVersion.value),
- dependencyOverrides ++= SparkCobolDependenciesOverride,
Test / fork := true, // Spark tests fail randomly otherwise
populateBuildInfoTemplate,
- releasePublishArtifactsAction := PgpKeys.publishSigned.value,
assemblySettings
).dependsOn(cobolParser)
.settings(
@@ -125,10 +128,6 @@ lazy val sparkCobol = (project in file("spark-cobol"))
ThisBuild / coverageExcludedPackages := ".*examples.*;.*replication.*"
ThisBuild / coverageExcludedFiles := ".*Example.*;Test.*"
-// release settings
-releaseCrossBuild := true
-addCommandAlias("releaseNow", ";set releaseVersionBump := sbtrelease.Version.Bump.Bugfix; release with-defaults")
-
lazy val assemblySettings = Seq(
// This merge strategy retains service entries for all services in manifest.
// It allows custom Spark data sources to be used together, e.g. 'spark-xml' and 'spark-cobol'.
diff --git a/pom.xml b/pom.xml
index d7edc415..df880966 100644
--- a/pom.xml
+++ b/pom.xml
@@ -102,7 +102,6 @@
2.4.2
1.8.1
1.3.0
- 0.12
1.6
@@ -111,7 +110,6 @@
3.5.6
3.2.19
2.4.16
- 15.0
2.13.1
4.11.0
3.7.2
@@ -250,11 +248,6 @@
${mockito.version}
test
-
- com.google.guava
- guava
- ${guava.version}
-
@@ -267,10 +260,6 @@
org.apache.maven.plugins
maven-compiler-plugin
${maven.compiler.version}
-
- ${maven.compiler.source}
- ${maven.compiler.target}
-
diff --git a/project/Dependencies.scala b/project/Dependencies.scala
index 17a8920d..d3c5f1f2 100644
--- a/project/Dependencies.scala
+++ b/project/Dependencies.scala
@@ -17,7 +17,6 @@
import sbt._
object Dependencies {
- private val guavaVersion = "15.0"
private val scodecCoreVersion = "1.11.4"
private val antlrValue = "4.8"
private val slf4jVersion = "1.7.25"
@@ -62,13 +61,6 @@ object Dependencies {
"org.mockito" % "mockito-core" % mockitoVersion % Test
)
- val SparkCobolDependenciesOverride: Seq[ModuleID] = Seq(
- // Needs to be added as a separate dependency since Spark uses an newer
- // version of Guava which has removed 'com.google.common.base.Stopwatch.elapsedMillis',
- // however, the version of Hadoop imported by Spark relies on that method.
- "com.google.guava" % "guava" % guavaVersion,
- )
-
val CobolParserDependencies: Seq[ModuleID] = Seq(
// compile
"org.antlr" % "antlr4-runtime" % antlrValue,
diff --git a/project/build.properties b/project/build.properties
index cc68b53f..5e6884d3 100644
--- a/project/build.properties
+++ b/project/build.properties
@@ -1 +1 @@
-sbt.version=1.10.11
+sbt.version=1.11.6
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 78309754..ccb2ae10 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -1,9 +1,9 @@
-addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1")
-addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")
-addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.0")
-addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.2.0")
-addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0")
-addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.5")
+addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.11.1")
+addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.9.2")
+addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.0")
+addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.2.0")
+addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0")
+addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.5")
addDependencyTreePlugin
diff --git a/publish.sbt b/publish.sbt
index 6e378ae7..6cf7069a 100644
--- a/publish.sbt
+++ b/publish.sbt
@@ -44,15 +44,4 @@ ThisBuild / description := "COBOL Reading and Import Extensions for Apache Spark
ThisBuild / startYear := Some(2018)
ThisBuild / licenses += "Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0.txt")
-ThisBuild / pomIncludeRepository := { _ => false }
-ThisBuild / publishTo := {
- val nexus = "https://oss.sonatype.org/"
- if (isSnapshot.value) {
- Some("snapshots" at s"${nexus}content/repositories/snapshots")
- } else {
- Some("releases" at s"${nexus}service/local/staging/deploy/maven2")
- }
-}
-ThisBuild / publishMavenStyle := true
-
ThisBuild / versionScheme := Some("semver-spec")
diff --git a/spark-cobol/pom.xml b/spark-cobol/pom.xml
index f66493bc..77d56732 100644
--- a/spark-cobol/pom.xml
+++ b/spark-cobol/pom.xml
@@ -42,15 +42,6 @@
provided
-
-
-
- com.google.guava
- guava
-
-
za.co.absa.cobrix
diff --git a/version.sbt b/version.sbt
deleted file mode 100644
index 3c2886a0..00000000
--- a/version.sbt
+++ /dev/null
@@ -1 +0,0 @@
-ThisBuild / version := "2.8.5-SNAPSHOT"