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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KMP project fails to build when using Androidx Sqlite KMP #766

Open
sproctor opened this issue Sep 25, 2024 · 2 comments
Open

KMP project fails to build when using Androidx Sqlite KMP #766

sproctor opened this issue Sep 25, 2024 · 2 comments

Comments

@sproctor
Copy link

Gradle Version

8.10

AGP Version

8.5.2

Code Minifier/Optimizer

Proguard

Version

4.11.0

Sentry SDK Version

7.13.0

Steps to Reproduce

Include "androidx.sqlite:sqlite:2.5.0-alpha08" in dependencies.

Expected Result

Sentry should ignore the implementation on non-Android targets, or provide a JVM version of the Sentry sqlite dependency.

Actual Result

Execution failed for task ':desktopApp:run'.
> Could not resolve all files for configuration ':desktopApp:runtimeClasspath'.
   > Could not resolve io.sentry:sentry-android-sqlite:7.13.0.
     Required by:
         project :desktopApp > project :offline:database > androidx.room:room-runtime:2.7.0-alpha08 > androidx.room:room-runtime-jvm:2.7.0-alpha08 > androidx.sqlite:sqlite:2.5.0-alpha08
      > No matching variant of io.sentry:sentry-android-sqlite:7.13.0 was found. The consumer was configured to find a library for use during runtime, compatible with Java 17, packaged as a jar, preferably optimized for standard JVMs, and its dependencies declared externally, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm', attribute 'ui' with value 'awt' but:
          - Variant 'releaseVariantReleaseApiPublication' declares a library, and its dependencies declared externally:
              - Incompatible because this component declares a component for use during compile-time, with the library elements 'aar' and the consumer needed a component for use during runtime, packaged as a jar
              - Other compatible attributes:
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
                  - Doesn't say anything about its target Java version (required compatibility with Java 17)
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'jvm')
                  - Doesn't say anything about ui (required 'awt')
          - Variant 'releaseVariantReleaseRuntimePublication' declares a library for use during runtime, and its dependencies declared externally:
              - Incompatible because this component declares a component, with the library elements 'aar' and the consumer needed a component, packaged as a jar
              - Other compatible attributes:
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
                  - Doesn't say anything about its target Java version (required compatibility with Java 17)
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'jvm')
                  - Doesn't say anything about ui (required 'awt')

* Try:
> No matching variant errors are explained in more detail at https://docs.gradle.org/8.10/userguide/variant_model.html#sub:variant-no-match.
> Review the variant matching algorithm at https://docs.gradle.org/8.10/userguide/variant_attributes.html#sec:abm_algorithm.
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.10/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 46s
63 actionable tasks: 43 executed, 20 up-to-date
@buenaflor
Copy link
Contributor

thx for the report, I'll have a look

@buenaflor buenaflor moved this from Needs Discussion to Needs Investigation in Mobile & Cross Platform SDK Sep 27, 2024
@romtsn
Copy link
Member

romtsn commented Oct 2, 2024

@sproctor thanks for reporting this! At the moment we don't support room-kmp, so the workaround for you would be to disable the auto-installation feature as follows:

sentry {
  autoInstallation.enabled.set(false)
}

We'll look into fixing this on our side, so we don't pull in our sqlite integration when there's a multiplatform room dependency.

@romtsn romtsn moved this from Needs Investigation to Backlog in Mobile & Cross Platform SDK Oct 2, 2024
@kahest kahest removed the bug Something isn't working label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: Backlog
Development

No branches or pull requests

4 participants