Skip to content

Include dependency metadata in build-info for Android#828

Merged
nitinp19 merged 3 commits intojfrog:masterfrom
nitinp19:RTECO-253
Sep 16, 2025
Merged

Include dependency metadata in build-info for Android#828
nitinp19 merged 3 commits intojfrog:masterfrom
nitinp19:RTECO-253

Conversation

@nitinp19
Copy link
Copy Markdown
Contributor

@nitinp19 nitinp19 commented Aug 29, 2025

Problem-
A user is experiencing an issue where the dependencies of their Android project are not being captured in the build-info.json file when using the JFrog CLI following command.

1- jf gradle "assembleDebug" --build-name=android-gradle --build-number=1
2- jf rt u "app/build/outputs/apk/debug/app-debug.apk" "demo-gradle-dev/android-sample-app/app-debug.apk" --build-name=android-gradle --build-number=1
3- Jf rt bp android-gradle 1

While this isn't preventing the build from completing, it creates a feeling that the project isn't being built properly.

"assembleDebug" is a gradle build task which lets you build the apk for the staging environment. This task does not enable the module-extractor task which helps to collect the dependencies.

Solution-
by adding artifactoryPublish in the command with assembleDebug. this will register the artifactoryTask in the gradle project which internally register the extract-module task for the project that collects the dependencies for the modules.
jf gradle "assembleDebug" atrifactoryPublish --build-name=android-gradle --build-number=1

Also, I have changed the hasModules() this function just not only check for the publication but also do check for the
modules present or not for the module now. It helps us to collect the dependencies for the modules that do no have any publication configured just like the android project.

@nitinp19 nitinp19 added the safe to test Approve running integration tests on a pull request label Aug 29, 2025
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Aug 29, 2025
@nitinp19 nitinp19 requested a review from bhanurp August 29, 2025 11:19
void apply(Project project) {
if ("buildSrc".equals(project.name)) {
log.debug("Artifactory Plugin disabled for ${project.path}")
log.info("Artifactory Plugin disabled for ${project.path}")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why did we changed log level here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

When we are enabling the debug log level. It becomes too hard to filter the actual log from the gradle task logs.

@nitinp19 nitinp19 merged commit 1a3b05e into jfrog:master Sep 16, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants