-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
build-logic/core/library/src/main/kotlin/LibSinglePlugin.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import org.gradle.kotlin.dsl.apply | ||
|
||
/** | ||
* . | ||
* | ||
* @author 985892345 | ||
* @date 2024/2/15 16:37 | ||
*/ | ||
class LibSinglePlugin : BasePlugin() { | ||
override fun PluginScope.configure() { | ||
apply(plugin = "base.library") | ||
if (project.gradle.startParameter.taskNames.any { it.contains(":lib_single:assembleDebug") }) { | ||
// 在 AS 使用锤子对 lib_single 模块单独进行构建时, | ||
// 会因为 AndroidManifest 文件没有设置 single_module_app_name 会构建失败, | ||
// 所以这里就设置一个默认的名字 | ||
// 单模块的名字在另一个地方设置的 | ||
androidLib { | ||
defaultConfig { | ||
manifestPlaceholders["single_module_app_name"] = project.name | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters