sentry-java
sentry-java copied to clipboard
Gradle pom.xml incorrect metadata redirection
Integration
sentry-android
Build System
Gradle
AGP Version
Any
Proguard
Disabled
Version
Every
Steps to Reproduce
- Open for example current newest version: https://repo1.maven.org/maven2/io/sentry/sentry-android/6.4.1/sentry-android-6.4.1.pom
- Find it contains this line: do_not_remove: published-with-gradle-metadata
- Open directory: https://repo1.maven.org/maven2/io/sentry/sentry-android/6.4.1/
- Find there is no .module file. According to gradle documentation this is incorrect: https://docs.gradle.org/current/userguide/publishing_gradle_module_metadata.html
Above is description of an cause.
The more important symptoms and in fact issues are while using artifactory: https://jfrog.com/artifactory/ which will throw 403, stopping the gradle build with failure.
Expected Result
Either:
- pom.xml shouldn't contain line: do_not_remove: published-with-gradle-metadata
- .module file should be published
Actual Result
pom.xml contains line do_not_remove: published-with-gradle-metadata and there is no published .module file (Gradle Module Metadata)
@darekdeo thanks for raising this. We'll look into it and report back here once we know more.
There's a draft PR that should address this issue: https://github.com/getsentry/craft/pull/412
https://discuss.gradle.org/t/how-to-disable-using-gradle-module-metadata-then-to-use-pom-xml-to-resolve-dependencies/42995/2 a guy from gradle says
And for the future, it is almost always a bad idea to ignore the metadata or to not publish it.
FYI: For sentry-compose
the gradle module metadata file generation has been disabled, see https://github.com/getsentry/sentry-java/pull/2430 for more details.
If we want to support .module
files, this needs to be re-checked again.
We still have to finalize the open craft PR https://github.com/getsentry/craft/pull/412 to have this resolved. Maybe @buenaflor will take care of it when he's back again.
Need to check if that works automatically after https://github.com/getsentry/craft/pull/412 is merged
@romtsn can you release a patch and see if it works? https://github.com/getsentry/craft/pull/412 is merged
Currently .module files are only supported automatically through kmp
configuration so for non-kmp targets it needs a bit of extra work. See: https://github.com/getsentry/craft/blob/3a136a5dbd40e9b2e7fe7ae7799cfbf71784108e/src/targets/maven.ts#L466
Noting that sentry-android
7.3.0
still does not have Gradle module metadata.
https://repo.maven.apache.org/maven2/io/sentry/sentry-android/7.3.0/
hey, just an update here: 7.10.0
should have the gradle module metadata published. thanks for bearing with us!
https://repo.maven.apache.org/maven2/io/sentry/sentry-android-core/7.10.0/sentry-android-core-7.10.0.module