You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We hope our dependencies in project are uniformly managed. so we read a json file with all of the dependencies that we need. And we defined the following code in the gradle plugin
private fun forceAllDependenciesVersions(p: Project, list: List<RemoteDependenciesModel>) { p.configurations.all { c -> if (!c.name.contains("lintChecks")) { c.resolutionStrategy { rs -> list.forEach { remote -> rs.force("${remote.key}:${remote.value}") } } } } }
We hope our dependencies in project are uniformly managed. so we read a json file with all of the dependencies that we need. And we defined the following code in the gradle plugin
private fun forceAllDependenciesVersions(p: Project, list: List<RemoteDependenciesModel>) { p.configurations.all { c -> if (!c.name.contains("lintChecks")) { c.resolutionStrategy { rs -> list.forEach { remote -> rs.force("${remote.key}:${remote.value}") } } } } }
Json file example
[ { "dependencies": "", "key": "cn.soul.android.app:cpnt-square", "name": "cpnt-square", "value": "3.90.10" }, { "key": "cn.soul.android.lib:mate-lint-rules", "name": "mate-lint-rules", "value": "1.0.3" } ]
Expected Behavior
we need to insure that all dependencies‘ version are equal with json file .
Current Behavior
we encountered a bug that we build for serveral times. then one of the dependencies' version is wrong, and we need to restart mac to solve the issue
Steps to Reproduce (for bugs)
provide a dependencies source list. and make a foreach loop to invoke force api, then there is a certain probability of triggering the bug
Your Environment
Gradle 6.5
AGP 4.1.0
The text was updated successfully, but these errors were encountered: