From 788b534354b0a16b02414053a5ae1ac95ecfe880 Mon Sep 17 00:00:00 2001 From: Andre Dietisheim Date: Thu, 24 Oct 2024 14:33:45 +0200 Subject: [PATCH] moved java classes to kotlin to avoid verification errors (#780) Signed-off-by: Andre Dietisheim --- build.gradle.kts | 19 ++++++++++++++++++- .../io/fabric8/kubernetes/client/Config.java | 0 .../kubernetes/client/KubeConfigFile.java | 0 .../client/internal/KubeConfigUtils.java | 0 .../client/utils/OpenIDConnectionUtils.java | 0 .../kubernetes/client/utils/Utils.java | 0 .../intellij/kubernetes/model/mocks/Mocks.kt | 3 ++- 7 files changed, 20 insertions(+), 2 deletions(-) rename src/main/{java => kotlin}/io/fabric8/kubernetes/client/Config.java (100%) rename src/main/{java => kotlin}/io/fabric8/kubernetes/client/KubeConfigFile.java (100%) rename src/main/{java => kotlin}/io/fabric8/kubernetes/client/internal/KubeConfigUtils.java (100%) rename src/main/{java => kotlin}/io/fabric8/kubernetes/client/utils/OpenIDConnectionUtils.java (100%) rename src/main/{java => kotlin}/io/fabric8/kubernetes/client/utils/Utils.java (100%) diff --git a/build.gradle.kts b/build.gradle.kts index 14f8499e7..9bb985cdf 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,6 +6,7 @@ plugins { alias(libs.plugins.gradleIntelliJPlugin) // Gradle IntelliJ Plugin alias(libs.plugins.kotlinJvm) id("idea") + id("java") } group = "com.redhat.devtools.intellij" @@ -84,7 +85,7 @@ dependencies { } intellijPlatform { - buildSearchableOptions = false + //buildSearchableOptions = false pluginConfiguration { ideaVersion { @@ -110,6 +111,14 @@ intellijPlatform { } tasks { + compileJava { + options.isIncremental = false + } + + compileKotlin { + incremental = false + } + wrapper { gradleVersion = providers.gradleProperty("gradleVersion").get() } @@ -134,6 +143,14 @@ configurations.all { } sourceSets { + main { + java.srcDir("src/main/kotlin") + kotlin.srcDir("src/main/kotlin") + } + test { + java.srcDir("src/test/kotlin") + kotlin.srcDir("src/test/kotlin") + } create("it") { description = "integrationTest" compileClasspath += sourceSets.main.get().compileClasspath + sourceSets.test.get().compileClasspath diff --git a/src/main/java/io/fabric8/kubernetes/client/Config.java b/src/main/kotlin/io/fabric8/kubernetes/client/Config.java similarity index 100% rename from src/main/java/io/fabric8/kubernetes/client/Config.java rename to src/main/kotlin/io/fabric8/kubernetes/client/Config.java diff --git a/src/main/java/io/fabric8/kubernetes/client/KubeConfigFile.java b/src/main/kotlin/io/fabric8/kubernetes/client/KubeConfigFile.java similarity index 100% rename from src/main/java/io/fabric8/kubernetes/client/KubeConfigFile.java rename to src/main/kotlin/io/fabric8/kubernetes/client/KubeConfigFile.java diff --git a/src/main/java/io/fabric8/kubernetes/client/internal/KubeConfigUtils.java b/src/main/kotlin/io/fabric8/kubernetes/client/internal/KubeConfigUtils.java similarity index 100% rename from src/main/java/io/fabric8/kubernetes/client/internal/KubeConfigUtils.java rename to src/main/kotlin/io/fabric8/kubernetes/client/internal/KubeConfigUtils.java diff --git a/src/main/java/io/fabric8/kubernetes/client/utils/OpenIDConnectionUtils.java b/src/main/kotlin/io/fabric8/kubernetes/client/utils/OpenIDConnectionUtils.java similarity index 100% rename from src/main/java/io/fabric8/kubernetes/client/utils/OpenIDConnectionUtils.java rename to src/main/kotlin/io/fabric8/kubernetes/client/utils/OpenIDConnectionUtils.java diff --git a/src/main/java/io/fabric8/kubernetes/client/utils/Utils.java b/src/main/kotlin/io/fabric8/kubernetes/client/utils/Utils.java similarity index 100% rename from src/main/java/io/fabric8/kubernetes/client/utils/Utils.java rename to src/main/kotlin/io/fabric8/kubernetes/client/utils/Utils.java diff --git a/src/test/kotlin/com/redhat/devtools/intellij/kubernetes/model/mocks/Mocks.kt b/src/test/kotlin/com/redhat/devtools/intellij/kubernetes/model/mocks/Mocks.kt index ab6dbce7c..9c290f472 100644 --- a/src/test/kotlin/com/redhat/devtools/intellij/kubernetes/model/mocks/Mocks.kt +++ b/src/test/kotlin/com/redhat/devtools/intellij/kubernetes/model/mocks/Mocks.kt @@ -10,6 +10,7 @@ ******************************************************************************/ package com.redhat.devtools.intellij.kubernetes.model.mocks +import io.fabric8.kubernetes.client.Config import com.nhaarman.mockitokotlin2.any import com.nhaarman.mockitokotlin2.anyOrNull import com.nhaarman.mockitokotlin2.doAnswer @@ -209,7 +210,7 @@ object Mocks { fun clientConfig( currentContext: NamedContext?, allContexts: List, - configuration: io.fabric8.kubernetes.client.Config = mock() + configuration: Config = mock() ): ClientConfig { val saveFuture: CompletableFuture = mock() return mock {