From ad3e2356a047aa2d4e9cb512a98e1cefe378bb54 Mon Sep 17 00:00:00 2001 From: Milad Khajavi Date: Mon, 23 Jan 2023 15:00:31 +0330 Subject: [PATCH] Add Scaladoc Support (#354) * add scaladoc support. * update site workflow. * empty scaladoc. * remove depends on. * update scala version. * only scala212 and scala213 for docs module. * ignore forcing unsupported versions. * update scala version on ci. --- .github/workflows/ci.yml | 4 ++-- .github/workflows/site.yml | 8 +++++--- build.sbt | 6 +++--- project/BuildHelper.scala | 2 +- project/plugins.sbt | 4 +--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68e4020..9e8bba7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: fail-fast: false matrix: java: ['adopt@1.8', 'adopt@1.11'] - scala: ['2.11.12', '2.12.15', '2.13.8', '3.1.0'] + scala: ['2.11.12', '2.12.15', '2.13.8', '3.2.1'] steps: - name: Checkout current branch uses: actions/checkout@v3.0.1 @@ -46,7 +46,7 @@ jobs: - name: Cache scala dependencies uses: coursier/cache-action@v6 - name: Run tests - run: sbt ++${{ matrix.scala }}! test + run: sbt ++${{ matrix.scala }} test website: runs-on: ubuntu-20.04 diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml index cd9e602..a9e071b 100644 --- a/.github/workflows/site.yml +++ b/.github/workflows/site.yml @@ -27,12 +27,14 @@ jobs: distribution: temurin java-version: 17 check-latest: true - - name: Check that site workflow is up to date + - name: Check if the README file is up to date + run: sbt docs/checkReadme + - name: Check if the site workflow is up to date run: sbt docs/checkGithubWorkflow - name: Check artifacts build process run: sbt +publishLocal - name: Check website build process - run: sbt docs/buildWebsite + run: sbt docs/clean; sbt docs/buildWebsite publish-docs: name: Publish Docs runs-on: ubuntu-latest @@ -60,7 +62,7 @@ jobs: generate-readme: name: Generate README runs-on: ubuntu-latest - if: ${{ (github.event_name == 'push') || ((github.event_name == 'release') && (github.event_name == 'published')) }} + if: ${{ (github.event_name == 'push') || ((github.event_name == 'release') && (github.event.action == 'published')) }} steps: - name: Git Checkout uses: actions/checkout@v3.3.0 diff --git a/build.sbt b/build.sbt index 814f914..4d55ac0 100644 --- a/build.sbt +++ b/build.sbt @@ -75,7 +75,8 @@ lazy val interopReactiveStreams = project lazy val docs = project .in(file("zio-interop-reactivestreams-docs")) .settings( - moduleName := "zio-interop-reactivestreams-docs", + moduleName := "zio-interop-reactivestreams-docs", + crossScalaVersions := Seq(Scala212, Scala213), scalacOptions -= "-Yno-imports", scalacOptions -= "-Xfatal-warnings", libraryDependencies ++= Seq( @@ -84,8 +85,7 @@ lazy val docs = project projectName := "ZIO Interop Reactive Streams", mainModuleName := (interopReactiveStreams / moduleName).value, projectStage := ProjectStage.ProductionReady, - ScalaUnidoc / unidoc / unidocProjectFilter := inProjects(interopReactiveStreams), + ScalaUnidoc / unidoc / unidocProjectFilter := inProjects(), docsPublishBranch := "master" ) - .dependsOn(interopReactiveStreams) .enablePlugins(WebsitePlugin) diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index 8138191..dfe4df7 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -11,7 +11,7 @@ object BuildHelper { val Scala211 = "2.11.12" val Scala212 = "2.12.15" val Scala213 = "2.13.8" - val ScalaDotty = "3.1.0" + val ScalaDotty = "3.2.1" private val stdOptions = Seq( "-deprecation", diff --git a/project/plugins.sbt b/project/plugins.sbt index 7878b2f..1b8949d 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -6,6 +6,4 @@ addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") addSbtPlugin("org.portable-scala" % "sbt-crossproject" % "1.2.0") addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.9.0") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") -addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.3.2") - -resolvers += Resolver.sonatypeRepo("public") +addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.3.9")