NativeScript / NativeScript/nativescript-cli

CLI does not handle deleted files from App_Resources/Android/src

オープン
#5,083 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

bug build debug os: android prepare run unit testing
主要言語
JavaScript
スター
1.1k
フォーク
204
平均マージ
1日 9時間
マージ済み PR(30日)
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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. 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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。