didi/DoKit · error · RuntimeException
未找到dokit-plugin module。。。
Error message
未找到dokit-plugin module。。。
What it means
Inside checkUploadConfig4Maven (Android/build.gradle), after collecting all project module names, the task throws '未找到dokit-plugin module。。。' if no module named 'dokit-plugin' is present in the build. The upload pipeline requires the dokit-plugin Gradle plugin project to be part of the composite build.
Source
Thrown at Android/build.gradle:162
}
//相关模块检查
def modules = new ArrayList<String>()
rootProject.allprojects.forEach {
modules.add(it.name)
}
// if (!modules.contains("dokit-rpc")) {
// throw new RuntimeException("未找到dokit-rpc module。。。")
// }
//
// if (!modules.contains("dokit-rpc-mc")) {
// throw new RuntimeException("未找到dokit-rpc-mc module。。。")
// }
if (!modules.contains("dokit-plugin")) {
throw new RuntimeException("未找到dokit-plugin module。。。")
}
}
}
task checkUploadConfig4Local() {
doLast {
//配置检查
if (rootProject.ext.publish_config["archives_type"] != 0) {
throw new RuntimeException("执行当前打包上传任务必须修改config.gradle配置中的archives_type = 0。")
}
//仓库检查
def repositories = new ArrayList<String>()
rootProject.repositories.forEach {
if (it instanceof MavenArtifactRepository) {
repositories.add((it as MavenArtifactRepository).url.toString())
}
}View on GitHub (pinned to 626827cddb)
Solutions
- Check Android/settings.gradle includes ':dokit-plugin' and the directory Android/dokit-plugin exists with a valid build.gradle
- Restore the full checkout (git status / git submodule update if applicable)
- If you intentionally removed dokit-plugin, you cannot use the guarded upload tasks — remove or adjust the check task too
Example fix
// before (settings.gradle) include ':dokit', ':dokit-test' // after (settings.gradle) include ':dokit', ':dokit-test', ':dokit-plugin'
Defensive patterns
Strategy: validation
Validate before calling
def names = rootProject.allprojects.collect { it.name }
assert names.contains("dokit-plugin") : "settings.gradle must include ':dokit-plugin'" Prevention
- Keep settings.gradle complete; verify module inclusion after checkouts or refactors
- Run `./gradlew projects` to confirm dokit-plugin is in the build before uploading
When it happens
Trigger: Running the Maven upload when settings.gradle does not include ':dokit-plugin' (module excluded, renamed, or the repository checked out partially); running the upload from a subproject scope that did not evaluate all modules.
Common situations: Partial checkout or trimmed clone of DoraemonKit missing the plugin module; module renamed during local experimentation; settings.gradle modified to speed up builds by excluding modules.
Related errors
- 执行当前打包上传任务必须修改config.gradle配置中的archives_type = 2。
- 执行当前打包上传任务必须修改config.gradle配置中的archives_type = 0。
- 执行当前打包上传任务必须修改config.gradle配置中的archives_type = 1。
AI-assisted analysis of didi/DoKit@626827cddb (2026-08-14).
Data as JSON: /api/errors/4e34e311a8147dd1.
Report an issue: GitHub.