From d59e6feaab9360717937cea69544dc790dfe8f23 Mon Sep 17 00:00:00 2001 From: fankesyooni Date: Tue, 26 Sep 2023 06:35:26 +0800 Subject: [PATCH] docs: update guide --- docs/guide-zh-CN.md | 12 +++++++----- docs/guide.md | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/docs/guide-zh-CN.md b/docs/guide-zh-CN.md index 3940b31..80710c6 100644 --- a/docs/guide-zh-CN.md +++ b/docs/guide-zh-CN.md @@ -194,13 +194,15 @@ sweetProperty { // 配置 "buildScript" } } - // 子项目配置 + // 其它项目与子项目配置 // 在方法参数中填入需要配置的项目完整名称来配置对应的项目 - // 如果你的项目为嵌套型子项目,例如 app → sub - // 此时你需要使用 ":" 来分隔多个子项目,例如 "app:sub" - // 你不需要再填写子项目前面的 ":",例如 ":app" + // 如果当前项目是子项目,你必须填写子项目前面的 ":",例如 ":app" + // 如果当前项目为嵌套型子项目,例如 app → sub + // 此时你需要使用 ":" 来分隔多个子项目,例如 ":app:sub" + // 注意:在 1.0.2 版本及以前是不需要添加 ":" 来标识子项目的,且添加后会报错 + // 这是一个错误做法,目前统一了 Gradle 的项目命名规范,请使用新的规范 // 根项目的名称不能直接用来配置子项目,请使用 "rootProject" - project("app") { + project(":app") { all { // 配置 "all" } diff --git a/docs/guide.md b/docs/guide.md index 167fdd6..9692b0e 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -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 app → sub + // 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" }