docs: update guide

This commit is contained in:
2023-09-26 06:35:26 +08:00
parent f08d25912d
commit d59e6feaab
2 changed files with 14 additions and 10 deletions

View File

@@ -194,13 +194,15 @@ sweetProperty {
// 配置 "buildScript"
}
}
// 子项目配置
// 其它项目与子项目配置
// 在方法参数中填入需要配置的项目完整名称来配置对应的项目
// 如果你的项目为嵌套型子项目,例如 app → sub
// 此时你需要使用 ":" 来分隔多个子项目,例如 "app:sub"
// 你不需要再填写子项目前面的 ":",例如 ":app"
// 如果当前项目是子项目,你必须填写子项目前面的 ":",例如 ":app"
// 如果当前项目为嵌套型子项目,例如 appsub
// 此时你需要使用 ":" 来分隔多个子项目,例如 ":app:sub"
// 注意:在 1.0.2 版本及以前是不需要添加 ":" 来标识子项目的,且添加后会报错
// 这是一个错误做法,目前统一了 Gradle 的项目命名规范,请使用新的规范
// 根项目的名称不能直接用来配置子项目,请使用 "rootProject"
project("app") {
project(":app") {
all {
// 配置 "all"
}

View File

@@ -208,13 +208,15 @@ sweetProperty {
// Configure "buildScript"
}
}
// Sub-projects configuration
// Other projects and sub-projects configurations
// Fill in the full name of the project that needs to be configured in the method parameters to configure the corresponding project
// If your project is a nested sub-projects, such as app → sub
// At this point you need to use ":" to separate multiple sub-projects, such as "app:sub"
// You don't need to fill in the ":" in front of the sub-projects, such as ":app"
// If the current project is a sub-project, you must fill in the ":" in front of the sub-project, such as ":app"
// If the current project is a nested sub-project, such as appsub
// At this time you need to use ":" to separate multiple sub-projects, such as ":app:sub"
// Note: In version 1.0.2 and before, there is no need to add ":" to identify sub-projects, and an error will be thrown after adding it
// This is a wrong approach, Gradle's project naming convention is currently unified, please use the new convention
// The name of the root project cannot be used directly to configure sub-projects, please use "rootProject"
project("app") {
project(":app") {
all {
// Configure "all"
}