Skip to content

Commit

Permalink
Do not use crossProject with java modules
Browse files Browse the repository at this point in the history
  • Loading branch information
iRevive committed Aug 3, 2022
1 parent 35e926b commit f24f9da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ jobs:

- name: Make target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
run: mkdir -p testkit/metrics/jvm/target testkit/common/jvm/target target java/common/.jvm/target core/common/.jvm/target .js/target site/target core/metrics/.jvm/target java/metrics/.jvm/target core/all/.js/target core/metrics/.js/target core/all/.jvm/target .jvm/target .native/target core/common/.js/target java/all/.jvm/target testkit/all/jvm/target project/target
run: mkdir -p testkit/metrics/jvm/target java/metrics/target testkit/common/jvm/target target core/common/.jvm/target .js/target site/target core/metrics/.jvm/target core/all/.js/target java/all/target java/common/target core/metrics/.js/target core/all/.jvm/target .jvm/target .native/target core/common/.js/target testkit/all/jvm/target project/target

- name: Compress target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
run: tar cf targets.tar testkit/metrics/jvm/target testkit/common/jvm/target target java/common/.jvm/target core/common/.jvm/target .js/target site/target core/metrics/.jvm/target java/metrics/.jvm/target core/all/.js/target core/metrics/.js/target core/all/.jvm/target .jvm/target .native/target core/common/.js/target java/all/.jvm/target testkit/all/jvm/target project/target
run: tar cf targets.tar testkit/metrics/jvm/target java/metrics/target testkit/common/jvm/target target core/common/.jvm/target .js/target site/target core/metrics/.jvm/target core/all/.js/target java/all/target java/common/target core/metrics/.js/target core/all/.jvm/target .jvm/target .native/target core/common/.js/target testkit/all/jvm/target project/target

- name: Upload target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
Expand Down
15 changes: 6 additions & 9 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -113,21 +113,19 @@ lazy val testkit = crossProject(JVMPlatform)
name := "otel4s-testkit"
)

lazy val `java-common` = crossProject(JVMPlatform)
.crossType(CrossType.Pure)
lazy val `java-common` = project
.in(file("java/common"))
.dependsOn(`core-common`, `testkit-common`)
.dependsOn(`core-common`.jvm, `testkit-common`.jvm)
.settings(
name := "otel4s-java-common",
libraryDependencies ++= Seq(
"io.opentelemetry" % "opentelemetry-api" % OpenTelemetryVersion
)
)

lazy val `java-metrics` = crossProject(JVMPlatform)
.crossType(CrossType.Pure)
lazy val `java-metrics` = project
.in(file("java/metrics"))
.dependsOn(`java-common`, `core-metrics`, `testkit-metrics`)
.dependsOn(`java-common`, `core-metrics`.jvm, `testkit-metrics`.jvm)
.settings(
name := "otel4s-java-metrics",
libraryDependencies ++= Seq(
Expand All @@ -139,10 +137,9 @@ lazy val `java-metrics` = crossProject(JVMPlatform)
)
)

lazy val java = crossProject(JVMPlatform)
.crossType(CrossType.Pure)
lazy val java = project
.in(file("java/all"))
.dependsOn(core, `java-metrics`)
.dependsOn(core.jvm, `java-metrics`)
.settings(
name := "otel4s-java"
)
Expand Down

0 comments on commit f24f9da

Please sign in to comment.