Skip to content

Commit 3bdbdbd

Browse files
Fixed: The CD is failing because the new gradle version gives an error for the lib:generateMetadataFileForReleasePublication task.
* The issue occurred because `generateMetadataFileForReleasePublication` uses the output of the `androidSourcesJar` task, but no dependency was declared on this task. This can lead to incorrect results being produced due to the tasks executing in the wrong order. To fix this, we added an explicit dependency on the `GenerateModuleMetadata` tasks, ensuring that all `GenerateModuleMetadata` tasks run after the `androidSourcesJar` task.
1 parent 374f293 commit 3bdbdbd

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

lib/publish.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ afterEvaluate {
7171
}
7272
}
7373
}
74+
75+
// Set dependency for the metadata file generation task
76+
tasks.withType(GenerateModuleMetadata).tap {
77+
configureEach {
78+
dependsOn tasks.named("androidSourcesJar")
79+
}
80+
}
7481
}
7582

7683
signing {

0 commit comments

Comments
 (0)