[BUG][KOTLIN] build.gradle generated with idea=true fails on Gradle 9 (testSourceDirs)
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 15/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- kotlin
- Ambito
- build-system
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Java
- Stelle
- 26.9k
- Fork
- 7.8k
- Merge medio
- 2g 10h
- PR unite (30g)
- 180
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OpenAPITools/openapi-generator
-
Issue: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
OpenAPITools/openapi-generator#25643 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
OpenAPITools/openapi-generator#25640 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG][JAVA] Deprecated properties only get @Deprecated on the getter (base, feign, native, microprofile)Forse già presa @Inf1mum l’ha presa 2 giorni fa. ApertaIssue: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
OpenAPITools/openapi-generator#25567 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG][KOTLIN-SERVER] typeInfoAnnotation.mustache uses As.PROPERTY → discriminator property serialized twiceForse già presa @Inf1mum l’ha presa 9 giorni fa. ApertaIssue: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
OpenAPITools/openapi-generator#25524 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[REQ][JAVA][resteasy] Support for Jackson 3 / useJackson3Forse già presa Una pull request collegata a questa issue è aperta o già unita. ApertaEnhancement: Feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OpenAPITools/openapi-generator#25364 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di OpenAPITools/openapi-generator
Issue simili
-
bug emitter:client:csharp
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
microsoft/typespec#12572 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
GCC 15.2: -Wcast-qual warning - cast discards const qualifier from pointer target type (H5trace.c)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug] RemotingHelper.connect swaps the socket send and receive buffer configurationForse già presa @amalsaidov l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
needs-area-label
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni
-
area/ai area/backend component/zeebe kind/task
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno