[BUG][KOTLIN] build.gradle generated with idea=true fails on Gradle 9 (testSourceDirs)
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 15/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- kotlin
- Lĩnh vực
- build-system
Hướng nghiên cứu
Read kotlin-client/build.gradle.mustache and inspect how its idea module configures test source directories. The report identifies replacing testSourceDirs with testSources.from(file('src/test/kotlin')) and gives Gradle 7.6.2 and 9.8.2 as compatibility points. A linked pull request, #25573, is already open.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator?
- Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- What's the actual output vs expected output?
Description
With idea=true, kotlin-client/build.gradle.mustache adds an idea { module { ... } } block that sets testSourceDirs. Gradle 8.14 warns that the property is deprecated ("scheduled to be removed in Gradle 9.0. Please use the testSources property instead"), and Gradle 9 removed it, so the generated project fails to configure. The same project builds on Gradle 8.14, and without idea=true it builds on 9.
openapi-generator version
7.27.0, and master at d15b0164 (7.28.0-SNAPSHOT).
OpenAPI declaration file content or url
modules/openapi-generator/src/test/resources/3_0/petstore.yaml from this repo (validate reports no issues).
Generation Details
java -jar openapi-generator-cli.jar generate -g kotlin \
-i modules/openapi-generator/src/test/resources/3_0/petstore.yaml \
-o out --additional-properties=idea=true
Steps to reproduce
Run gradle compileKotlin in out with Gradle 9.8.2:
* Where:
Build file '.../build.gradle' line: 59
* What went wrong:
Could not get unknown property 'testSourceDirs' for object of type org.gradle.plugins.ide.idea.internal.IdeaModuleInternal.
Expected: it configures and compiles.
Related issues/PRs
#22084, fixed for the Java templates in #24649.
Suggest a fix
testSources.from(file('src/test/kotlin')) instead of testSourceDirs += file('src/test/kotlin'). testSources exists since Gradle 7.4 (tested on 7.4, 7.6.2, 8.14 and 9.8.2; it fails on 7.3), and the oldest wrapper the template ships is 7.6.2 (for jvm-volley). PR to follow.
- Ngôn ngữ chính
- Java
- Star
- 26.9k
- Fork
- 7.8k
- Merge trung bình
- 2 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 180
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc 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 OpenAPITools/openapi-generator
-
Issue: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
OpenAPITools/openapi-generator#25643 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
OpenAPITools/openapi-generator#25640 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG][JAVA] Deprecated properties only get @Deprecated on the getter (base, feign, native, microprofile)Có thể đã có người làm @Inf1mum đã nhận 2 ngày trước. Đang mởIssue: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
OpenAPITools/openapi-generator#25567 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG][KOTLIN-SERVER] typeInfoAnnotation.mustache uses As.PROPERTY → discriminator property serialized twiceCó thể đã có người làm @Inf1mum đã nhận 9 ngày trước. Đang mởIssue: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
OpenAPITools/openapi-generator#25524 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[REQ][JAVA][resteasy] Support for Jackson 3 / useJackson3Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởEnhancement: Feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
OpenAPITools/openapi-generator#25364 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của OpenAPITools/openapi-generator
Issue tương tự
-
bug emitter:client:csharp
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
microsoft/typespec#12572 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
GCC 15.2: -Wcast-qual warning - cast discards const qualifier from pointer target type (H5trace.c)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] RemotingHelper.connect swaps the socket send and receive buffer configurationCó thể đã có người làm @amalsaidov đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-area-label
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày
-
area/ai area/backend component/zeebe kind/task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày