NativeScript / NativeScript/nativescript-cli
CLI does not handle deleted files from App_Resources/Android/src
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 1.1k
- 派生
- 204
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 8
描述
If a user adds some Java/Kotlin files in the App_Resources/Android/src folder and runs a build, the files are copied into the platforms/android/app/src folder.
If the user, however, deletes some file in App_Resources/Android/src and triggers a second build, this does not change the state of the platforms/android/app/src directory.
Issue seems to be due to this logic: https://github.com/NativeScript/nativescript-cli/blob/master/lib/services/android-project-service.ts#L294
The whole implementation of the prepareAppResources method could probably be improved with setting an additional value provided to srcDir in the build.gradle
sourceSets {
main {
java {
srcDir 'src/src'
}
}
}
As for the libs folder, it's probably a good idea to attach it as an implementation filetree(<libs_path>) in the dependencies block in the build.gradle
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 lib/services/android-project-service.ts 中的 prepareAppResources 开始,检查相关的 build.gradle sourceSets 和 dependencies 处理逻辑。通过执行构建、删除 App_Resources/Android/src 下的一个文件,然后再次构建来复现该问题;当生成的 platforms/android/app/src 状态同时反映删除和添加时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- android, java, javascript, kotlin
- 领域
- build-system, cli, mobile
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100