redhat-developer / redhat-developer/vscode-java
Could not run build action using Gradle distribution: Could not get unknown property
オープン
まだ誰も着手していません。
Gradle
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 546
- 平均マージ
- 20時間 1分
- マージ済み PR(30日)
- 11
説明
If my build.gradle uses two external properties artifactory_user and artifactory_password, and I have them defined inside ~/.gradle/gradle.properties, VS Code does not look them up and fails:
buildscript {
repositories {
maven {
url 'https://artifactory.example.com'
credentials {
username = "${artifactory_user}"
password = "${artifactory_password}"
}
}
}
}
Error message:
Could not run build action using Gradle distribution 'https://artifactory.example.com/gradle-cache/gradle-4.5-bin.zip'.
Build file '/Users/someuser/someproj/build.gradle' line: ...
A problem occurred evaluating root project 'someproj'.
Could not get unknown property 'artifactory_user' for Credentials [username: null] of type
Environment
- Operating System: macOS 10.14.5
- JDK version: OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.212-b03, mixed mode)
- Visual Studio Code version: 1.35.0
- Java extension version: 0.46.0
Steps To Reproduce
- Define a couple of properties in your
~/.gradle/gradle.properties - Use them in your
build.gradle
Current Result
Could not run build action using Gradle distribution 'https://artifactory.example.com/gradle-cache/gradle-4.5-bin.zip'.
Build file '/Users/someuser/someproj/build.gradle' line: ...
A problem occurred evaluating root project 'someproj'.
Could not get unknown property 'artifactory_user' for Credentials [username: null] of type
Expected Result
The artifactory_user and artifactory_password properties to be resolved.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
issue の build.gradle と ~/.gradle/gradle.properties の設定を使って失敗を再現し、その後、ビルドファイルを評価する Gradle の build アクションから始めます。そのアクション中に外部プロパティがどのように読み込まれるかを追跡します。artifactory_user と artifactory_password のプロパティが正常に解決され、build アクションが完了すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, vscode
- 領域
- build-system, tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100