-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quarkus Upgrade with gradle kotlin dsl not working #33046
Comments
/cc @evanchooly (kotlin), @geoand (kotlin), @glefloch, @quarkusio/devtools |
I think this has already been reported but I can't find it right now. cc @gsmet |
@ia3andy could you have a look at this one? At a quick glance, it seems to be in your ballpark. |
Any fix for above issue ? Also getting below error while running tests java.lang.instrument.IllegalClassFormatException: Error while instrumenting io/quarkus/test/common/TestResourceManager with JaCoCo 0.8.9.202303310957/c0ad781. |
same problem: Caused by: io.quarkus.devtools.commands.data.QuarkusCommandException: Error while running the project update script |
As explained in the log: "gradle-kotlin-dsl is not supported yet", AFAIK OpenRewrite doesn't yet support Gradle with Kotlin DSL. |
@anubhavjain24 in the issue logs I also see: |
Wrong statement it seems they do, I need to check again but last time I tested, our recipe didn't work with Kotlin DSL for some reason I don't remember. |
@ia3andy are there plans to make it work with kotlin DSL in the near future? As I'm struggling with the manual upgrade I'm considering if it's worth moving back to Groovy. (Currently it's mixed which causes it's own exception when running the script, so I'd have to move in one or the other direction anyways). |
@AdrianAulbach I can't find a similar article for Gradle with Kotlin: I need the init script if we want to support Gradle with Kotlin. |
@ia3andy sorry, I missed the notification I don't need it necessarily to work with Kotlin, it's just helpful to know that it won't be supported (or at least any time soon) so we can decide to move back to groovy (and don't start new projects with Kotlin DSL). So my suggestion would be to update https://quarkus.io/guides/gradle-tooling and discourage using Kotlin DSL with the warning that it's not supported by OpenRewrite / quarkus update) |
@AdrianAulbach this is not as final as this :) FYI I will soon initiate a discussion with the OpenRewrite team to see if they have or can do something to help us solve this problem. |
Here is the upstream issue: openrewrite/rewrite-docs#234 |
Still getting the error Caused by: io.quarkus.devtools.project.update.rewrite.QuarkusUpdateException: gradle-kotlin-dsl is not supported yet |
Can Quarkus team update the doc to mention that |
opened #43009 to at least mention it. |
Describe the bug
Below is the o/p of gradle update command
quarkus update --stream=3.0
BUILD SUCCESSFUL in 12s
my gradle. properties
quarkusPluginId=io.quarkus
quarkusPluginVersion=3.0.1.Final
quarkusPlatformGroupId=io.quarkus
quarkusPlatformArtifactId=quarkus-universe-bom
quarkusPlatformVersion=3.0.1.Final
build.gradle.kts
plugins {
kotlin("jvm") version "1.8.10"
kotlin("plugin.allopen") version "1.8.10"
id("io.quarkus")
id("org.sonarqube") version "4.0.0.2929"
id("org.owasp.dependencycheck") version "8.2.1"
jacoco
}
repositories {
mavenCentral()
mavenLocal()
}
val quarkusPlatformGroupId: String by project
val quarkusPlatformArtifactId: String by project
val quarkusPlatformVersion: String by project
dependencies {
implementation(enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}"))
implementation(enforcedPlatform("org.jetbrains.kotlin:kotlin-bom:1.8.10"))
implementation("io.quarkus:quarkus-container-image-docker")
implementation("io.quarkus:quarkus-smallrye-openapi")
implementation("io.quarkus:quarkus-kotlin")
implementation("io.quarkus:quarkus-resteasy")
implementation("io.quarkus:quarkus-resteasy-jackson")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("io.quarkus:quarkus-arc")
implementation("com.zaxxer:HikariCP:5.0.1")
implementation("org.apache.commons:commons-lang3:3.12.0")
implementation("com.microsoft.sqlserver:mssql-jdbc:11.2.2.jre8")
implementation("io.quarkus:quarkus-smallrye-health")
implementation(enforcedPlatform("software.amazon.awssdk:bom:2.18.38"))
implementation("software.amazon.awssdk:secretsmanager")
implementation("software.amazon.awssdk:sts")
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
allOpen {
annotation("javax.ws.rs.Path")
annotation("jakarta.enterprise.context.ApplicationScoped")
annotation("io.quarkus.test.junit.QuarkusTest")
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = JavaVersion.VERSION_11.toString()
kotlinOptions.javaParameters = true
}
jacoco {
toolVersion = "0.8.9"
}
tasks.compileTestKotlin {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
}
tasks.test {
outputs.file(layout.buildDirectory.file("reports/jacoco/test/jacoco.xml"))
finalizedBy(tasks.jacocoTestReport) // report is always generated after tests run
}
tasks.jacocoTestReport {
dependsOn(tasks.test) // tests are required to run before generating the report
reports{
xml.required.set(true)
xml.outputLocation.set(layout.buildDirectory.file("reports/jacoco/test/jacoco.xml"))
}
}
tasks.jacocoTestCoverageVerification {
violationRules {
rule {
limit {
minimum = "0.8".toBigDecimal()
}
}
}
}
settings.gradle.kts
pluginManagement {
val quarkusPluginVersion: String by settings
val quarkusPluginId: String by settings
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
}
plugins {
id(quarkusPluginId) version quarkusPluginVersion
}
}
Expected behavior
quarkus update changes should be applied
Actual behavior
Quarlkus not updating. Manually updated gradle.properties
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
Old Version : 2.16.5.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)------------------------------------------------------------ Gradle 8.0.2 ------------------------------------------------------------ Build time: 2023-03-03 16:41:37 UTC Revision: 7d6581558e226a580d91d399f7dfb9e3095c2b1d Kotlin: 1.8.10 Groovy: 3.0.13 Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021 JVM: 17.0.7 (Oracle Corporation 17.0.7+8-LTS-224) OS: Windows 10 10.0 amd64
Additional information
No response
The text was updated successfully, but these errors were encountered: