NativeScript / NativeScript/android
Gradle clean task executes not needed steps
未关闭
还没有人认领这个 Issue。
- 主要语言
- C++
- 星标
- 563
- 派生
- 144
- 平均合并
- 10 小时 46 分钟
- 30 天内合并 PR
- 14
描述
Environment
- CLI: 5.3.2
- Cross-platform modules:
- Android Runtime: 5.3.1
- iOS Runtime (if applicable):
- Plugin(s):
Describe the bug
Gradle clean...
+ setting applicationId
+ applying user-defined configuration from /Users/myUser/Work/nativescript-cli/scratch/buildProject/app/App_Resources/Android/app.gradle
+ using support library version 28.0.0
+ adding nativescript runtime package dependency: nativescript-optimized-with-inspector
+ adding aar plugin dependency: /Users/myUser/Work/nativescript-cli/scratch/buildProject/node_modules/tns-core-modules-widgets/platforms/android/widgets-release.aar
Gradle build...
+ setting applicationId
+ applying user-defined configuration from /Users/myUser/Work/nativescript-cli/scratch/buildProject/app/App_Resources/Android/app.gradle
+ using support library version 28.0.0
+ adding nativescript runtime package dependency: nativescript-optimized-with-inspector
+ adding aar plugin dependency: /Users/myUser/Work/nativescript-cli/scratch/buildProject/node_modules/tns-core-modules-widgets/platforms/android/widgets-release.aar
As you can see from the above log, the output from Gradle clean... and Gradle build... is the same. Most probably we don't need to execute build task's logic when cleaning the project.
To Reproduce
tns build android --bundle --clean
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先重现 tns build android --bundle --clean,并比较 clean 阶段和 build 阶段记录的步骤。跟踪 clean-task 的入口点,确定为什么在清理过程中会运行 build-task 逻辑;完成的标准是 clean 不再执行不必要的 build 步骤,同时正常的 build 输出保持不变。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- android
- 领域
- build-system, mobile-dev
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100