Regression in Gradle plugin v8.3.0: Cannot set the value of task ':integTest:spotlessJava' property 'taskService'
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- java
- Lĩnh vực
- build-system
Hướng nghiên cứu
Bắt đầu với lần chạy GitHub Actions được liên kết và thiết lập multi-project được mô tả trong issue, tập trung vào build.gradle.kts root còn thiếu và project integTest. So sánh lỗi này với workaround apply-false, sau đó xác định xem behavior của plugin hay documentation có nên thay đổi hay không. Hoàn thành khi thiết lập không còn thất bại nếu không dùng workaround, hoặc yêu cầu mới được document rõ ràng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
See https://github.com/tbroyer/gradle-incap-helper/actions/runs/23116714774/job/67143450577?pr=53.
Caused by: java.lang.IllegalArgumentException: Cannot set the value of task ':integTest:spotlessJava' property 'taskService' of type com.diffplug.gradle.spotless.SpotlessTaskService loaded with InstrumentingVisitableURLClassLoader(ClassLoaderScopeIdentifier.Id{coreAndPlugins:settings[:]:buildSrc[:]:root-project[:]:project-integTest(export)}) using a provider of type com.diffplug.gradle.spotless.SpotlessTaskService loaded with InstrumentingVisitableURLClassLoader(ClassLoaderScopeIdentifier.Id{coreAndPlugins:settings[:]:buildSrc[:]:root-project[:]:project-incap(export)}).
This can be caused by a plugin being applied to two sibling projects and then using a shared build service. To fix this, use `@ServiceReference` or add the problematic plugin with `apply false` to the root build script.
This happens in a multi-project build where the root project doesn't have a build.gradle.kts, so the spotless plugin isn't applied on the root project; and indeed adding it with apply false works around the error.
Either this should be documented as a new requirement, or the plugin should use @ServiceReference (if that makes a difference; but then also require Gradle >= 8)
- Ngôn ngữ chính
- Java
- Star
- 5.7k
- Fork
- 560
- Merge trung bình
- 1 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 43
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.
Issue khác của diffplug/spotless
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 66/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
Tất cả issue của diffplug/spotless
Issue tương tự
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
apache/cloudstack#14222 ·
-
[BUG]茶杯方块在取茶时会引发崩溃 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Cannot differ own consent and managed consents in My Consents view and detailed consent view. Đang mở1.0.0-alpha2 Type/Improvement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
wso2/dpdp-accelerator#272 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
infinispan/infinispan#18150 ·
-
area/frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100