NativeScript / NativeScript/nativescript-cli

plugin gradle fail

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

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

bug os: android plugins
主要言語
JavaScript
スター
1.1k
フォーク
204
平均マージ
1日 9時間
マージ済み PR(30日)
8

説明

If you have a plugin build.gradle like this:

def computeAndroidXVersion() {
    if(project.hasProperty("androidxVersion")) {
        return androidxVersion
    }
    else {
        return "1.0.0"
    }
}

dependencies {
	def androidxVersion = computeAndroidXVersion()

	compile "androidx.appcompat:appcompat:$androidxVersion"
	compile "com.google.android.material:material:1.1.0-alpha07"
}

it will fail to build because the method definition is not added the tempPlugin gradle file. So you end up with an error like this:

	* Where:
Build file '/Volumes/data/dev/nativescript/nativescript-material-components/demo-vue/platforms/tempPlugin/nativescript_material_button/build.gradle' line: 104

* What went wrong:
A problem occurred evaluating root project ‘nativescript_material_button’.
Could not find method computeAndroidXVersion() for arguments [] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

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

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

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

plugin build.gradle の例で発生する失敗を再現し、生成された platforms/tempPlugin/nativescript_material_button/build.gradle ファイルを調査します。プラグインの Gradle コンテンツがどのように組み立てられているかを追跡し、その後、メソッド定義が dependencies ブロック内でも引き続き利用可能であること、および例が正常にビルドできることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
build-system, cli, mobile-dev
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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