通过源码本地调试远程依赖包

8 阅读1分钟

只需要在 setting.gradle 中引入本地的 module

// ------------------------------------------- 本地调试模块 -------------------------------------------
// 本地调试(组合构建方式)
includeBuild('本地目录') {
    dependencySubstitution {
        substitute module('project:moduleA') using project(':moduleA')
        substitute module('project:moduleB') using project(':moduleB')
    }
}

引入后可以直接调试本地代码,不用变更其他配置

image.png