Skip to content

Commit

Permalink
move docs to separate module (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
novakov-alexey authored Dec 1, 2024
1 parent a20b7fe commit 24d9b73
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ jobs:
java-version: ${{ matrix.java }}
cache: sbt
- name: Compile Docs
run: JAVA_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED" sbt "++ ${{ matrix.scala }} mdoc"
run: JAVA_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED" sbt "++ ${{ matrix.scala }} docs/mdoc"
- name: Run tests
run: JAVA_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED" sbt -DflinkVersion=${{ matrix.flink }} "++ ${{ matrix.scala }} test"
27 changes: 20 additions & 7 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Global / onChangedBuildSource := ReloadOnSourceChanges
Global / excludeLintKeys := Set(git.useGitDescribe)

lazy val rootScalaVersion = "3.3.4"
lazy val crossVersions = Seq("2.13.15", rootScalaVersion)
lazy val flinkVersion = System.getProperty("flinkVersion", "1.18.1")

lazy val root = (project in file("."))
Expand All @@ -18,10 +19,10 @@ lazy val `scala-api` = (project in file("modules/scala-api"))
.settings(
name := "flink-scala-api",
scalaVersion := rootScalaVersion,
crossScalaVersions := Seq("2.13.15", rootScalaVersion),
crossScalaVersions := crossVersions,
libraryDependencies ++= Seq(
"org.apache.flink" % "flink-streaming-java" % flinkVersion,
"org.apache.flink" % "flink-java" % flinkVersion,
"org.apache.flink" % "flink-streaming-java" % flinkVersion % Provided,
"org.apache.flink" % "flink-java" % flinkVersion % Provided,
"org.apache.flink" % "flink-test-utils" % flinkVersion % Test,
("org.apache.flink" % "flink-streaming-java" % flinkVersion % Test).classifier("tests"),
"org.typelevel" %% "cats-core" % "2.12.0" % Test,
Expand All @@ -32,12 +33,12 @@ lazy val `scala-api` = (project in file("modules/scala-api"))
if (scalaBinaryVersion.value.startsWith("2")) {
Seq(
"com.softwaremill.magnolia1_2" %% "magnolia" % "1.1.10",
"org.scala-lang" % "scala-reflect" % scalaVersion.value
"org.scala-lang" % "scala-reflect" % scalaVersion.value % Provided
)
} else {
Seq(
"com.softwaremill.magnolia1_3" %% "magnolia" % "1.3.8",
"org.scala-lang" %% "scala3-compiler" % scalaVersion.value
"org.scala-lang" %% "scala3-compiler" % scalaVersion.value % Provided
)
}
},
Expand Down Expand Up @@ -111,9 +112,21 @@ lazy val `scala-api` = (project in file("modules/scala-api"))
commitNextVersion,
pushChanges
)
else Seq.empty[ReleaseStep]),
mdocIn := new File("README.md")
else Seq.empty[ReleaseStep])
)

lazy val docs = project // new documentation project
.in(file("modules/docs")) // important: it must not be docs/
.settings(
scalaVersion := rootScalaVersion,
crossScalaVersions := crossVersions,
mdocIn := new File("README.md"),
publish / skip := true,
libraryDependencies ++= Seq(
"org.apache.flink" % "flink-streaming-java" % flinkVersion
)
)
.dependsOn(`scala-api`)
.enablePlugins(MdocPlugin)

val flinkMajorAndMinorVersion =
Expand Down

0 comments on commit 24d9b73

Please sign in to comment.