Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert sourcesets config to produce same modules as before #2431

Merged
merged 1 commit into from Dec 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 2 additions & 11 deletions sentry-compose/build.gradle.kts
Expand Up @@ -21,7 +21,7 @@ kotlin {
android {
publishLibraryVariants("release")
}
jvm() {
jvm("desktop") {
compilations.all {
kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8.toString()
}
Expand All @@ -42,21 +42,12 @@ kotlin {
api(compose.ui)

implementation(Config.Libs.kotlinStdLib)
}
}

val jvmMain by getting {
dependencies {
api(projects.sentry)
implementation(Config.Libs.kotlinStdLib)
api(projects.sentryComposeHelper)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, I'm a bit surprised it's gonna work, because it contains only java files and we include it into kotlin-common-main. My idea was to just publish another artifact (-jvm.jar), but if this works, then it's good I guess :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just double checked the artifacts when publishing locally:

  • sentry-compose.jar is empty like before
  • sentry-compose-android.jar and sentry-compose-desktop.jar both contain the relevant class files, including the ones from sentry-helper

I'm still not happy with this solutions, as it feels like too many workarounds stacked on each other - but I would release it for now and check on how this can be improved in the next iteration.

}
}

val androidMain by getting {
dependsOn(jvmMain)

dependencies {
api(projects.sentry)
api(projects.sentryAndroidNavigation)

api(Config.Libs.composeNavigation)
Expand Down