NativeScript / NativeScript/nativescript-cli
plugin gradle fail
Đang mở
Chưa có ai nhận issue này.
bug
os: android
plugins
- Ngôn ngữ chính
- JavaScript
- Star
- 1.1k
- Fork
- 204
- Merge trung bình
- 1 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 8
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Tái hiện lỗi từ ví dụ plugin build.gradle và kiểm tra tệp được tạo platforms/tempPlugin/nativescript_material_button/build.gradle. Theo dõi cách nội dung Gradle của plugin được tập hợp, sau đó xác minh rằng các định nghĩa phương thức vẫn khả dụng bên trong khối dependencies và ví dụ được build thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript
- Lĩnh vực
- build-system, cli, mobile-dev
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100