@@ -15,6 +15,12 @@ group = "com.redhat.devtools.intellij"
15
15
version = providers.gradleProperty(" projectVersion" ).get() // Plugin version
16
16
val ideaVersion = providers.gradleProperty(" platformVersion" ).get()
17
17
val javaVersion = 17
18
+ val ideaVersionInt = when {
19
+ // e.g. '20XY.Z'
20
+ ideaVersion.length == 6 -> ideaVersion.replace(" ." , " " ).substring(2 ).toInt()
21
+ // e.g. '2XY.ABCDE.12'
22
+ else -> ideaVersion.substringBefore(" ." ).toInt()
23
+ }
18
24
19
25
// Set the JVM language level used to build the project.
20
26
kotlin {
@@ -29,16 +35,12 @@ java {
29
35
targetCompatibility = JavaVersion .toVersion(javaVersion)
30
36
}
31
37
32
-
33
38
repositories {
34
39
mavenLocal()
35
- /*
36
- * github repo with intellij-common needs to be listed before jboss repository. Both have 1.9.9-SNAPSHOT
37
- * First hit wins regardless of timestamp
38
- */
40
+ maven { url = uri(" https://raw.githubusercontent.com/redhat-developer/intellij-common-ui-test-library/repository/snapshots" ) }
41
+ maven { url = uri(" https://raw.githubusercontent.com/redhat-developer/intellij-common-ui-test-library/repository/releases" ) }
39
42
maven { url = uri(" https://raw.githubusercontent.com/redhat-developer/intellij-common/repository/snapshots" ) }
40
43
maven { url = uri(" https://raw.githubusercontent.com/redhat-developer/intellij-common/repository/releases" ) }
41
- maven { url = uri(" https://repository.jboss.org" ) }
42
44
mavenCentral()
43
45
intellijPlatform {
44
46
defaultRepositories()
@@ -56,7 +58,7 @@ dependencies {
56
58
/*
57
59
* platformVersion check for JSON breaking changes since 2024.3
58
60
*/
59
- if (ideaVersion.startsWith( " 2024.3 " ) || ideaVersion.startsWith( " 25 " ) ) {
61
+ if (ideaVersionInt >= 243 ) {
60
62
platformBundledPlugins.add(" com.intellij.modules.json" )
61
63
}
62
64
println (" use bundled Plugins: $platformBundledPlugins " )
@@ -74,10 +76,10 @@ dependencies {
74
76
}
75
77
76
78
implementation(libs.devtools.common)
79
+ implementation(libs.openshift.client)
77
80
implementation(libs.kubernetes.client)
78
81
implementation(libs.kubernetes.model)
79
82
implementation(libs.kubernetes.model.common)
80
- implementation(libs.openshift.client)
81
83
implementation(libs.kubernetes.httpclient.okhttp)
82
84
implementation(libs.jackson.core)
83
85
implementation(libs.commons.lang3)
@@ -135,9 +137,7 @@ intellijPlatform {
135
137
136
138
tasks {
137
139
fun supportsEnhancedClassRedefinition (): Boolean {
138
- val platformVersion = findProperty(" platformVersion" ).toString().toFloatOrNull()
139
- return platformVersion != null
140
- && platformVersion >= 2024.1
140
+ return ideaVersionInt >= 241
141
141
}
142
142
143
143
wrapper {
0 commit comments