Closed androa closed 4 years ago
This is weird.... I just tried following the same steps:
gradle init --type kotlin-application --dsl kotlin
gradle clean build
-> it failed but it complained about trying to inline code built with Java 1.8 (i.e. graphql kotlin client lib) and my test project using 1.6updated build script with
tasks {
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = listOf("-Xjsr305=strict")
}
}
}
gradle clean build
and it generated successfully...Whats your environment? e.g. I'm building using Gradle 6.3 (using Kotlin 1.3.70 and Java 11.0.5).
It seemed to help upgrading Gradle. Went from 6.2 to 6.5, now it works.
./gradlew --version
------------------------------------------------------------
Gradle 6.2
------------------------------------------------------------
Build time: 2020-02-17 08:32:01 UTC
Revision: 61d3320259a1a0d31519bf208eb13741679a742f
Kotlin: 1.3.61
Groovy: 2.5.8
Ant: Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM: 13.0.2 (Oracle Corporation 13.0.2+8)
OS: Mac OS X 10.15.5 x86_64
After upgrading to:
------------------------------------------------------------
Gradle 6.5
------------------------------------------------------------
Build time: 2020-06-02 20:46:21 UTC
Revision: a27f41e4ae5e8a41ab9b19f8dd6d86d7b384dad4
Kotlin: 1.3.72
Groovy: 2.5.11
Ant: Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM: 13.0.2 (Oracle Corporation 13.0.2+8)
OS: Mac OS X 10.15.5 x86_64
It seems like the plugin will be executed with the Kotlin version Gradle brings, not what is defined in the build.gradle.kts
. TIL.
Library Version 3.0.0
Describe the bug
To Reproduce Started a new Gradle project with
gradle init --type kotlin-application --dsl kotlin
and the followingbuild.gradle.kts
(as per the example in https://medium.com/expedia-group-tech/introducing-graphql-kotlin-client-b32dc3061a6f):Expected behavior The GraphQL SDL to be downloaded