diff --git a/.gitignore b/.gitignore index 2d145b83d98..83f3c8d9031 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ .metals project/boot target +**/src/*/managed .ensime .ensime_lucene .ensime_cache diff --git a/build.sbt b/build.sbt index 339d905c5de..db3e0ccb5e6 100644 --- a/build.sbt +++ b/build.sbt @@ -85,6 +85,9 @@ lazy val testingDependencies = Seq( ) ) +lazy val sharedSourceManaged = + Compile / sourceManaged := baseDirectory.value.getParentFile / "src" / "main" / "managed" + lazy val root = tlCrossRootProject .aggregate( kernel, @@ -109,6 +112,7 @@ lazy val kernel = crossProject(JSPlatform, JVMPlatform, NativePlatform) .in(file("kernel")) .settings(moduleName := "cats-kernel", name := "Cats kernel") .settings(testingDependencies) + .settings(sharedSourceManaged) .settings(Compile / sourceGenerators += (Compile / sourceManaged).map(KernelBoiler.gen).taskValue) .jsSettings(commonJsSettings) .jvmSettings(commonJvmSettings, cats1BincompatSettings) @@ -139,6 +143,7 @@ lazy val algebra = crossProject(JSPlatform, JVMPlatform, NativePlatform) .in(file("algebra-core")) .dependsOn(kernel) .settings(moduleName := "algebra", name := "Cats algebra") + .settings(sharedSourceManaged) .settings(Compile / sourceGenerators += (Compile / sourceManaged).map(AlgebraBoilerplate.gen).taskValue) .jsSettings(commonJsSettings) .jvmSettings(commonJvmSettings) @@ -167,6 +172,7 @@ lazy val core = crossProject(JSPlatform, JVMPlatform, NativePlatform) .dependsOn(kernel) .settings(moduleName := "cats-core", name := "Cats core") .settings(macroSettings) + .settings(sharedSourceManaged) .settings(Compile / sourceGenerators += (Compile / sourceManaged).map(Boilerplate.gen).taskValue) .settings( libraryDependencies += "org.scalacheck" %%% "scalacheck" % scalaCheckVersion % Test,