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

Gradle pom.xml incorrect metadata redirection #2233

Closed
darekdeo opened this issue Sep 5, 2022 · 9 comments · Fixed by getsentry/craft#535 or #3422
Closed

Gradle pom.xml incorrect metadata redirection #2233

darekdeo opened this issue Sep 5, 2022 · 9 comments · Fixed by getsentry/craft#535 or #3422

Comments

@darekdeo
Copy link

darekdeo commented Sep 5, 2022

Integration

sentry-android

Build System

Gradle

AGP Version

Any

Proguard

Disabled

Version

Every

Steps to Reproduce

  1. Open for example current newest version: https://repo1.maven.org/maven2/io/sentry/sentry-android/6.4.1/sentry-android-6.4.1.pom
  2. Find it contains this line: do_not_remove: published-with-gradle-metadata
  3. Open directory: https://repo1.maven.org/maven2/io/sentry/sentry-android/6.4.1/
  4. 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:

  1. pom.xml shouldn't contain line: do_not_remove: published-with-gradle-metadata
  2. .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)

@adinauer
Copy link
Member

adinauer commented Sep 6, 2022

@darekdeo thanks for raising this. We'll look into it and report back here once we know more.

@adinauer
Copy link
Member

There's a draft PR that should address this issue: getsentry/craft#412

@nienienienie
Copy link

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.

@markushi
Copy link
Member

markushi commented Dec 15, 2022

FYI: For sentry-compose the gradle module metadata file generation has been disabled, see #2430 for more details.
If we want to support .module files, this needs to be re-checked again.

@romtsn
Copy link
Member

romtsn commented Jan 25, 2023

We still have to finalize the open craft PR getsentry/craft#412 to have this resolved. Maybe @buenaflor will take care of it when he's back again.

@romtsn
Copy link
Member

romtsn commented Mar 8, 2023

Need to check if that works automatically after getsentry/craft#412 is merged

@marandaneto
Copy link
Contributor

@romtsn can you release a patch and see if it works? getsentry/craft#412 is merged

@buenaflor
Copy link
Contributor

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

@yogurtearl
Copy link

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment