From ee1691aec62e879654820b18bfdccab30600ccac Mon Sep 17 00:00:00 2001 From: Tuan Pham Date: Sun, 13 Oct 2024 19:56:06 +1100 Subject: [PATCH 01/18] Enable generation of src and doc jar on publish --- build.sbt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.sbt b/build.sbt index 34f6ac3..e357a08 100644 --- a/build.sbt +++ b/build.sbt @@ -39,6 +39,8 @@ lazy val core = (project in file("core")) .settings( commonSettings, name := "core", + Compile / packageSrc / publishArtifact := true, + Compile / packageDoc / publishArtifact := true ) lazy val benchmarks = (project in file("benchmarks")) From 1f0988205cf0fbaae87b8d954731bee7196279af Mon Sep 17 00:00:00 2001 From: Tuan Pham Date: Sun, 13 Oct 2024 21:47:06 +1100 Subject: [PATCH 02/18] simple release workflow --- .github/workflows/ci.yml | 4 ++-- .github/workflows/release.yml | 25 +++++++++++++++++++++++++ README.md | 2 +- build.sbt | 2 +- 4 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ada425..2563353 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,6 @@ jobs: with: jvm: zulu:8 - name: Test - run: sbt -Dspark.testVersion=${{ matrix.spark }} +test + run: sbt -Dspark.version=${{ matrix.spark }} +test - name: Benchmark - run: sbt -Dspark.testVersion=${{ matrix.spark }} +benchmarks/Jmh/run + run: sbt -Dspark.version=${{ matrix.spark }} +benchmarks/Jmh/run diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..51f611c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,25 @@ +name: Release +on: + push: + tags: ["*"] +jobs: + publish: + strategy: + fail-fast: false + matrix: + spark: [ "3.1.3", "3.2.4", "3.3.4", "3.4.3", "3.5.1" ] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: coursier/cache-action@v6 + with: + extraKey: ${{ matrix.spark }} + - uses: coursier/setup-action@v1 + with: + jvm: zulu:8 + - run: sbt ci-release -Dspark.version=${{ matrix.spark }} + env: + PGP_PASSPHRASE: ${{secrets.PGP_PASSPHRASE}} + PGP_SECRET: ${{secrets.PGP_SECRET}} + SONATYPE_PASSWORD: ${{secrets.SONATYPE_PASSWORD}} + SONATYPE_USERNAME: ${{secrets.SONATYPE_USERNAME}} diff --git a/README.md b/README.md index 543ba23..da14f91 100644 --- a/README.md +++ b/README.md @@ -325,7 +325,7 @@ There is a two step process for publishing. Generate Scala 2.11 JAR files: -* Run `sbt -Dspark.testVersion=2.4.8` +* Run `sbt -Dspark.version=2.4.8` * Run `> ; + publishSigned; sonatypeBundleRelease` to create the JAR files and release them to Maven. Generate Scala 2.12 & Scala 2.13 JAR files: diff --git a/build.sbt b/build.sbt index e357a08..23cbc5a 100644 --- a/build.sbt +++ b/build.sbt @@ -11,7 +11,7 @@ val versionRegex = """^(.*)\.(.*)\.(.*)$""".r val scala2_13 = "2.13.14" val scala2_12 = "2.12.20" -val sparkVersion = System.getProperty("spark.testVersion", "3.5.1") +val sparkVersion = System.getProperty("spark.version", "3.5.1") crossScalaVersions := { sparkVersion match { case versionRegex("3", m, _) if m.toInt >= 2 => Seq(scala2_12, scala2_13) From 4b4cfb343f8044a30ad134cc8c366d3d5a07244a Mon Sep 17 00:00:00 2001 From: Tuan Pham Date: Tue, 15 Oct 2024 23:04:21 +1100 Subject: [PATCH 03/18] run CI with single spark version --- .github/workflows/release.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 51f611c..c53d5c1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,10 +4,6 @@ on: tags: ["*"] jobs: publish: - strategy: - fail-fast: false - matrix: - spark: [ "3.1.3", "3.2.4", "3.3.4", "3.4.3", "3.5.1" ] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -17,7 +13,7 @@ jobs: - uses: coursier/setup-action@v1 with: jvm: zulu:8 - - run: sbt ci-release -Dspark.version=${{ matrix.spark }} + - run: sbt ci-release -Dspark.version=3.5.3 env: PGP_PASSPHRASE: ${{secrets.PGP_PASSPHRASE}} PGP_SECRET: ${{secrets.PGP_SECRET}} From ffc68e985108cba55616ff0df85f756a7b1a355d Mon Sep 17 00:00:00 2001 From: Tuan Pham Date: Tue, 15 Oct 2024 23:14:53 +1100 Subject: [PATCH 04/18] Test with spark 3.5.3 --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 3 --- build.sbt | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2563353..f082940 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: false matrix: - spark: ["3.1.3","3.2.4", "3.3.4", "3.4.3", "3.5.1"] + spark: ["3.1.3","3.2.4", "3.3.4", "3.4.3", "3.5.3"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c53d5c1..9596338 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,9 +7,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: coursier/cache-action@v6 - with: - extraKey: ${{ matrix.spark }} - uses: coursier/setup-action@v1 with: jvm: zulu:8 diff --git a/build.sbt b/build.sbt index 23cbc5a..5f3e5cc 100644 --- a/build.sbt +++ b/build.sbt @@ -11,7 +11,7 @@ val versionRegex = """^(.*)\.(.*)\.(.*)$""".r val scala2_13 = "2.13.14" val scala2_12 = "2.12.20" -val sparkVersion = System.getProperty("spark.version", "3.5.1") +val sparkVersion = System.getProperty("spark.version", "3.5.3") crossScalaVersions := { sparkVersion match { case versionRegex("3", m, _) if m.toInt >= 2 => Seq(scala2_12, scala2_13) From e7174249615aa09bcce24419f11554c533b998a6 Mon Sep 17 00:00:00 2001 From: Tuan Pham Date: Sun, 3 Nov 2024 17:07:28 +1100 Subject: [PATCH 05/18] Release setting for newer sonaType account --- build.sbt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 5f3e5cc..e6729bb 100644 --- a/build.sbt +++ b/build.sbt @@ -120,4 +120,7 @@ publishMavenStyle := true publishTo := sonatypePublishToBundle.value -Global / useGpgPinentry := true \ No newline at end of file +Global / useGpgPinentry := true + +ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org" +sonatypeRepository := "https://s01.oss.sonatype.org/service/local" \ No newline at end of file From 8f669624fbc66dfa2630ce9531cb680bccb4bfad Mon Sep 17 00:00:00 2001 From: Tuan Pham Date: Sun, 3 Nov 2024 17:23:15 +1100 Subject: [PATCH 06/18] Remove manual sbt-release setting --- build.sbt | 8 -------- 1 file changed, 8 deletions(-) diff --git a/build.sbt b/build.sbt index e6729bb..2fe3e9b 100644 --- a/build.sbt +++ b/build.sbt @@ -4,8 +4,6 @@ Compile / scalafmtOnCompile := true organization := "com.github.mrpowers" name := "spark-fast-tests" -version := "1.10.1" - val versionRegex = """^(.*)\.(.*)\.(.*)$""".r val scala2_13 = "2.13.14" @@ -105,8 +103,6 @@ lazy val docs = (project in file("docs")) Laika / sourceDirectories := Seq((ThisBuild / baseDirectory).value / "docs") ) -credentials += Credentials(Path.userHome / ".sbt" / "sonatype_credentials") - licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT")) homepage := Some(url("https://github.com/mrpowers-io/spark-fast-tests")) developers ++= List( @@ -116,10 +112,6 @@ scmInfo := Some(ScmInfo(url("https://github.com/mrpowers-io/spark-fast-tests"), updateOptions := updateOptions.value.withLatestSnapshots(false) -publishMavenStyle := true - -publishTo := sonatypePublishToBundle.value - Global / useGpgPinentry := true ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org" From b0b1bc7ba44e2ac7761703b391181d84b6f0d6d9 Mon Sep 17 00:00:00 2001 From: Tuan Pham Date: Sun, 3 Nov 2024 17:38:15 +1100 Subject: [PATCH 07/18] Temp change organization to test publish --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 2fe3e9b..5bf0744 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ enablePlugins(GitVersioning) Compile / scalafmtOnCompile := true -organization := "com.github.mrpowers" +organization := "io.github.zeotuan" name := "spark-fast-tests" val versionRegex = """^(.*)\.(.*)\.(.*)$""".r From cbf576154bbdaec4b061fc500261fd83479e71f2 Mon Sep 17 00:00:00 2001 From: Tuan Pham Date: Sun, 3 Nov 2024 17:52:34 +1100 Subject: [PATCH 08/18] use Sonatype Central host --- build.sbt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 5bf0744..d99f6ed 100644 --- a/build.sbt +++ b/build.sbt @@ -114,5 +114,6 @@ updateOptions := updateOptions.value.withLatestSnapshots(false) Global / useGpgPinentry := true -ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org" +import xerial.sbt.Sonatype.sonatypeCentralHost +ThisBuild / sonatypeCredentialHost := sonatypeCentralHost sonatypeRepository := "https://s01.oss.sonatype.org/service/local" \ No newline at end of file From e655a375ed6ebe4aa003faa86c21a8c1d95a4676 Mon Sep 17 00:00:00 2001 From: Tuan Pham Date: Sun, 3 Nov 2024 18:10:51 +1100 Subject: [PATCH 09/18] Upgrade sbt-ci-release --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index a8847c0..a918db6 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -6,7 +6,7 @@ resolvers += Resolver.typesafeRepo("releases") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") -addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.6.1") +addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.9.0") addSbtPlugin("org.typelevel" % "laika-sbt" % "1.2.0") From a03b3d093ec2720873bf02afb0d01e2c43216df6 Mon Sep 17 00:00:00 2001 From: Tuan Pham Date: Sun, 3 Nov 2024 18:25:39 +1100 Subject: [PATCH 10/18] Remove explicit repository --- build.sbt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index d99f6ed..12ab4f5 100644 --- a/build.sbt +++ b/build.sbt @@ -115,5 +115,4 @@ updateOptions := updateOptions.value.withLatestSnapshots(false) Global / useGpgPinentry := true import xerial.sbt.Sonatype.sonatypeCentralHost -ThisBuild / sonatypeCredentialHost := sonatypeCentralHost -sonatypeRepository := "https://s01.oss.sonatype.org/service/local" \ No newline at end of file +ThisBuild / sonatypeCredentialHost := sonatypeCentralHost \ No newline at end of file From e6b9e2b77346d6b6a8f4ae9b8d4823f8686a0179 Mon Sep 17 00:00:00 2001 From: Tuan Pham Date: Sun, 3 Nov 2024 18:50:25 +1100 Subject: [PATCH 11/18] Put publishing setting on top --- build.sbt | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/build.sbt b/build.sbt index 12ab4f5..1007cc2 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,21 @@ +inThisBuild( + List( + organization := "io.github.zeotuan", + homepage := Some(url("https://github.com/mrpowers-io/spark-fast-tests")), + licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT")), + developers ++= List( + Developer( + "MrPowers", + "Matthew Powers", + "@MrPowers", + url("https://github.com/MrPowers")) + ) + ) +) + enablePlugins(GitVersioning) Compile / scalafmtOnCompile := true -organization := "io.github.zeotuan" name := "spark-fast-tests" val versionRegex = """^(.*)\.(.*)\.(.*)$""".r @@ -103,11 +117,6 @@ lazy val docs = (project in file("docs")) Laika / sourceDirectories := Seq((ThisBuild / baseDirectory).value / "docs") ) -licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT")) -homepage := Some(url("https://github.com/mrpowers-io/spark-fast-tests")) -developers ++= List( - Developer("MrPowers", "Matthew Powers", "@MrPowers", url("https://github.com/MrPowers")) -) scmInfo := Some(ScmInfo(url("https://github.com/mrpowers-io/spark-fast-tests"), "git@github.com:MrPowers/spark-fast-tests.git")) updateOptions := updateOptions.value.withLatestSnapshots(false) From 12363b4ee46c4d53da26830670779f0f12abf60c Mon Sep 17 00:00:00 2001 From: Tuan Pham Date: Sun, 3 Nov 2024 21:52:24 +1100 Subject: [PATCH 12/18] remove pgp setting --- build.sbt | 2 -- 1 file changed, 2 deletions(-) diff --git a/build.sbt b/build.sbt index 1007cc2..0b3ed9f 100644 --- a/build.sbt +++ b/build.sbt @@ -121,7 +121,5 @@ scmInfo := Some(ScmInfo(url("https://github.com/mrpowers-io/spark-fast-tests"), updateOptions := updateOptions.value.withLatestSnapshots(false) -Global / useGpgPinentry := true - import xerial.sbt.Sonatype.sonatypeCentralHost ThisBuild / sonatypeCredentialHost := sonatypeCentralHost \ No newline at end of file From 68c0f86ff691fe8de59c43e10fed31685ac0ff11 Mon Sep 17 00:00:00 2001 From: Tuan Pham Date: Sun, 3 Nov 2024 22:31:50 +1100 Subject: [PATCH 13/18] avoid publish docs and benchmark --- build.sbt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.sbt b/build.sbt index 0b3ed9f..c7073c0 100644 --- a/build.sbt +++ b/build.sbt @@ -63,6 +63,7 @@ lazy val benchmarks = (project in file("benchmarks")) "org.openjdk.jmh" % "jmh-generator-annprocess" % "1.37" //required for jmh IDEA plugin. Make sure this version matches sbt-jmh version! ), name := "benchmarks", + publish / skip := true ).enablePlugins(JmhPlugin) lazy val docs = (project in file("docs")) @@ -114,6 +115,7 @@ lazy val docs = (project in file("docs")) import laika.config.SyntaxHighlighting Seq(Markdown.GitHubFlavor, SyntaxHighlighting) }, + publish / skip := true, Laika / sourceDirectories := Seq((ThisBuild / baseDirectory).value / "docs") ) From a7eb315d78c3e32be2c05f2f5d7fd93b68baaca0 Mon Sep 17 00:00:00 2001 From: zeotuan <48720253+zeotuan@users.noreply.github.com> Date: Mon, 4 Nov 2024 09:18:27 +1100 Subject: [PATCH 14/18] workaround sbt-sonatype timeout issue (#17) --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9596338..fbf697f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ jobs: - uses: coursier/setup-action@v1 with: jvm: zulu:8 - - run: sbt ci-release -Dspark.version=3.5.3 + - run: sbt -Dsun.net.client.defaultReadTimeout=60000 -Dspark.version=3.5.3 ci-release env: PGP_PASSPHRASE: ${{secrets.PGP_PASSPHRASE}} PGP_SECRET: ${{secrets.PGP_SECRET}} From ad1eb6860b62e57792454e53fc76e95fc3f94860 Mon Sep 17 00:00:00 2001 From: zeotuan <48720253+zeotuan@users.noreply.github.com> Date: Mon, 4 Nov 2024 21:15:56 +1100 Subject: [PATCH 15/18] Increase sonaType defaultConnectionTimeout (#18) --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fbf697f..d11b469 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ jobs: - uses: coursier/setup-action@v1 with: jvm: zulu:8 - - run: sbt -Dsun.net.client.defaultReadTimeout=60000 -Dspark.version=3.5.3 ci-release + - run: sbt -Dsun.net.client.defaultReadTimeout=60000 -Dsun.net.client.defaultConnectTimeout=60000 -Dspark.version=3.5.3 ci-release env: PGP_PASSPHRASE: ${{secrets.PGP_PASSPHRASE}} PGP_SECRET: ${{secrets.PGP_SECRET}} From d1a6501c1a2f96930b8e47905f9753bc1d09ee48 Mon Sep 17 00:00:00 2001 From: zeotuan <48720253+zeotuan@users.noreply.github.com> Date: Mon, 4 Nov 2024 21:24:51 +1100 Subject: [PATCH 16/18] verbose release command --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d11b469..833e135 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ jobs: - uses: coursier/setup-action@v1 with: jvm: zulu:8 - - run: sbt -Dsun.net.client.defaultReadTimeout=60000 -Dsun.net.client.defaultConnectTimeout=60000 -Dspark.version=3.5.3 ci-release + - run: sbt -Dsun.net.client.defaultReadTimeout=60000 -Dsun.net.client.defaultConnectTimeout=60000 -Dspark.version=3.5.3 -v ci-release env: PGP_PASSPHRASE: ${{secrets.PGP_PASSPHRASE}} PGP_SECRET: ${{secrets.PGP_SECRET}} From ad7aee3551aa1668cd7812080c9cf1cda01fa43d Mon Sep 17 00:00:00 2001 From: zeotuan <48720253+zeotuan@users.noreply.github.com> Date: Mon, 4 Nov 2024 22:07:48 +1100 Subject: [PATCH 17/18] Remove test org --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index c7073c0..2d0e60a 100644 --- a/build.sbt +++ b/build.sbt @@ -1,6 +1,6 @@ inThisBuild( List( - organization := "io.github.zeotuan", + organization := "com.github.mrpowers", homepage := Some(url("https://github.com/mrpowers-io/spark-fast-tests")), licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT")), developers ++= List( @@ -124,4 +124,4 @@ scmInfo := Some(ScmInfo(url("https://github.com/mrpowers-io/spark-fast-tests"), updateOptions := updateOptions.value.withLatestSnapshots(false) import xerial.sbt.Sonatype.sonatypeCentralHost -ThisBuild / sonatypeCredentialHost := sonatypeCentralHost \ No newline at end of file +ThisBuild / sonatypeCredentialHost := sonatypeCentralHost From 36a801403e057a4ca960ef2023650ed81ca3f695 Mon Sep 17 00:00:00 2001 From: zeotuan <48720253+zeotuan@users.noreply.github.com> Date: Fri, 8 Nov 2024 21:32:30 +1100 Subject: [PATCH 18/18] Remove sonatypeCentral config (#19) --- .github/workflows/release.yml | 8 +++---- build.sbt | 39 ++++++++++++++--------------------- 2 files changed, 20 insertions(+), 27 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 833e135..b10f4ce 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,7 +1,7 @@ name: Release on: push: - tags: ["*"] + tags: [ "*" ] jobs: publish: runs-on: ubuntu-latest @@ -13,6 +13,6 @@ jobs: - run: sbt -Dsun.net.client.defaultReadTimeout=60000 -Dsun.net.client.defaultConnectTimeout=60000 -Dspark.version=3.5.3 -v ci-release env: PGP_PASSPHRASE: ${{secrets.PGP_PASSPHRASE}} - PGP_SECRET: ${{secrets.PGP_SECRET}} - SONATYPE_PASSWORD: ${{secrets.SONATYPE_PASSWORD}} - SONATYPE_USERNAME: ${{secrets.SONATYPE_USERNAME}} + PGP_SECRET: ${{secrets.PGP_LONG_ID}} + SONATYPE_PASSWORD: ${{secrets.MAVEN_PASSWORD}} + SONATYPE_USERNAME: ${{secrets.MAVEN_USERNAME}} diff --git a/build.sbt b/build.sbt index 2d0e60a..d088c5a 100644 --- a/build.sbt +++ b/build.sbt @@ -1,14 +1,10 @@ inThisBuild( List( organization := "com.github.mrpowers", - homepage := Some(url("https://github.com/mrpowers-io/spark-fast-tests")), - licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT")), + homepage := Some(url("https://github.com/mrpowers-io/spark-fast-tests")), + licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT")), developers ++= List( - Developer( - "MrPowers", - "Matthew Powers", - "@MrPowers", - url("https://github.com/MrPowers")) + Developer("MrPowers", "Matthew Powers", "@MrPowers", url("https://github.com/MrPowers")) ) ) ) @@ -16,7 +12,7 @@ inThisBuild( enablePlugins(GitVersioning) Compile / scalafmtOnCompile := true -name := "spark-fast-tests" +name := "spark-fast-tests" val versionRegex = """^(.*)\.(.*)\.(.*)$""".r @@ -37,20 +33,20 @@ Test / fork := true lazy val commonSettings = Seq( javaOptions ++= { - Seq("-Xms512M", "-Xmx2048M", "-Duser.timezone=GMT") ++ (if (System.getProperty("java.version").startsWith("1.8.0")) - Seq("-XX:+CMSClassUnloadingEnabled") - else Seq.empty) + Seq("-Xms512M", "-Xmx2048M", "-Duser.timezone=GMT") ++ (if (System.getProperty("java.version").startsWith("1.8.0")) + Seq("-XX:+CMSClassUnloadingEnabled") + else Seq.empty) }, libraryDependencies ++= Seq( "org.apache.spark" %% "spark-sql" % sparkVersion % "provided", "org.scalatest" %% "scalatest" % "3.2.18" % "test" - ), + ) ) lazy val core = (project in file("core")) .settings( commonSettings, - name := "core", + name := "core", Compile / packageSrc / publishArtifact := true, Compile / packageDoc / publishArtifact := true ) @@ -60,11 +56,12 @@ lazy val benchmarks = (project in file("benchmarks")) .settings(commonSettings) .settings( libraryDependencies ++= Seq( - "org.openjdk.jmh" % "jmh-generator-annprocess" % "1.37" //required for jmh IDEA plugin. Make sure this version matches sbt-jmh version! + "org.openjdk.jmh" % "jmh-generator-annprocess" % "1.37" // required for jmh IDEA plugin. Make sure this version matches sbt-jmh version! ), - name := "benchmarks", + name := "benchmarks", publish / skip := true - ).enablePlugins(JmhPlugin) + ) + .enablePlugins(JmhPlugin) lazy val docs = (project in file("docs")) .dependsOn(core) @@ -73,9 +70,8 @@ lazy val docs = (project in file("docs")) name := "docs", laikaTheme := { import laika.ast.Path.Root - import laika.ast.{Image, ExternalTarget} - import laika.helium.config.* import laika.helium.Helium + import laika.helium.config.* Helium.defaults.site .landingPage( @@ -111,17 +107,14 @@ lazy val docs = (project in file("docs")) }, laikaIncludeAPI := true, laikaExtensions ++= { - import laika.format.Markdown import laika.config.SyntaxHighlighting + import laika.format.Markdown Seq(Markdown.GitHubFlavor, SyntaxHighlighting) }, - publish / skip := true, + publish / skip := true, Laika / sourceDirectories := Seq((ThisBuild / baseDirectory).value / "docs") ) scmInfo := Some(ScmInfo(url("https://github.com/mrpowers-io/spark-fast-tests"), "git@github.com:MrPowers/spark-fast-tests.git")) updateOptions := updateOptions.value.withLatestSnapshots(false) - -import xerial.sbt.Sonatype.sonatypeCentralHost -ThisBuild / sonatypeCredentialHost := sonatypeCentralHost