Skip to content

Commit 58427f6

Browse files
committed
2024.3 release compatibility
- gradle upgrade to 8.10 - platform plugin to 2.0.1 - intellij idea 2024.3
1 parent 02f8464 commit 58427f6

File tree

8 files changed

+283
-206
lines changed

8 files changed

+283
-206
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,4 @@ jflex*.jar
3333
*.sdf
3434
*.iobj
3535
*.ipdb
36+
.intellijPlatform

.idea/modules.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

build.gradle.kts

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,17 @@
1414
* limitations under the License.
1515
*/
1616

17-
import de.undercouch.gradle.tasks.download.*
17+
import de.undercouch.gradle.tasks.download.Download
1818
import org.apache.tools.ant.taskdefs.condition.Os
19+
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
20+
import org.jetbrains.intellij.platform.gradle.tasks.PrepareSandboxTask
1921
import java.io.ByteArrayOutputStream
2022

23+
fun properties(key: String) = providers.gradleProperty(key)
24+
2125
plugins {
22-
id("org.jetbrains.intellij").version("1.13.3")
23-
id("org.jetbrains.kotlin.jvm").version("1.8.21")
26+
id("org.jetbrains.intellij.platform") version "2.0.1"
27+
id("org.jetbrains.kotlin.jvm") version "2.0.21"
2428
id("de.undercouch.download").version("5.3.0")
2529
}
2630

@@ -42,7 +46,7 @@ data class BuildData(
4246
val buildDataList = listOf(
4347
BuildData(
4448
ideaSDKShortVersion = "243",
45-
ideaSDKVersion = "243-EAP-SNAPSHOT",
49+
ideaSDKVersion = "2024.3",
4650
sinceBuild = "232",
4751
untilBuild = "243.*",
4852
bunch = "212",
@@ -146,9 +150,15 @@ task("installEmmyDebugger", type = Copy::class) {
146150
}
147151

148152
project(":") {
153+
apply(plugin = "org.jetbrains.intellij.platform")
154+
149155
repositories {
150-
maven(url = "https://www.jetbrains.com/intellij-repository/releases")
151156
mavenCentral()
157+
intellijPlatform {
158+
defaultRepositories()
159+
jetbrainsRuntime()
160+
nightly()
161+
}
152162
}
153163

154164
dependencies {
@@ -158,6 +168,18 @@ project(":") {
158168
implementation("org.luaj:luaj-jse:3.0.1")
159169
implementation("org.eclipse.mylyn.github:org.eclipse.egit.github.core:2.1.5")
160170
implementation("com.jgoodies:forms:1.2.1")
171+
172+
intellijPlatform {
173+
create("IC", buildVersionData.ideaSDKVersion, useInstaller = properties("useInstaller").get().toBoolean())
174+
instrumentationTools()
175+
jetbrainsRuntime()
176+
177+
// some code used in tests was moved to the java plugin and not available in the platform
178+
bundledPlugins("com.intellij.java")
179+
testFramework(TestFrameworkType.Plugin.Java)
180+
}
181+
testImplementation("junit:junit:4.13.2")
182+
testImplementation("org.opentest4j:opentest4j:1.3.0")
161183
}
162184

163185
sourceSets {
@@ -168,20 +190,6 @@ project(":") {
168190
}
169191
}
170192

171-
/*configure<JavaPluginConvention> {
172-
sourceCompatibility = buildVersionData.targetCompatibilityLevel
173-
targetCompatibility = buildVersionData.targetCompatibilityLevel
174-
}*/
175-
176-
intellij {
177-
type.set("IC")
178-
updateSinceUntilBuild.set(false)
179-
downloadSources.set(!isCI)
180-
version.set(buildVersionData.ideaSDKVersion)
181-
//localPath.set(System.getenv("IDEA_HOME_${buildVersionData.ideaSDKShortVersion}"))
182-
sandboxDir.set("${project.buildDir}/${buildVersionData.ideaSDKShortVersion}/idea-sandbox")
183-
}
184-
185193
task("bunch") {
186194
doLast {
187195
val rev = getRev()
@@ -228,25 +236,18 @@ project(":") {
228236
untilBuild.set(buildVersionData.untilBuild)
229237
}
230238

231-
instrumentCode {
232-
compilerVersion.set(buildVersionData.instrumentCodeCompilerVersion)
233-
}
234-
235239
publishPlugin {
236240
token.set(System.getenv("IDEA_PUBLISH_TOKEN"))
237241
}
238242

239-
withType<org.jetbrains.intellij.tasks.PrepareSandboxTask> {
240-
doLast {
241-
copy {
242-
from("src/main/resources/std")
243-
into("$destinationDir/${pluginName.get()}/std")
244-
}
245-
copy {
246-
from("src/main/resources/debugger")
247-
into("$destinationDir/${pluginName.get()}/debugger")
248-
}
249-
}
243+
withType<PrepareSandboxTask> {
244+
inputs.dir("src/main/resources/std")
245+
inputs.dir("src/main/resources/debugger")
246+
247+
intoChild(intellijPlatform.projectName.map { projectName -> "$projectName/std" })
248+
.from(file("src/main/resources/std"))
249+
intoChild(intellijPlatform.projectName.map { projectName -> "$projectName/debugger" })
250+
.from(file("src/main/resources/debugger"))
250251
}
251252
}
252-
}
253+
}

gradle.properties

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,10 @@ artifactsPath = build/artifacts
2626

2727
org.gradle.jvmargs=-Xmx1536m -Dfile.encoding=utf-8
2828
#kotlin.stdlib.default.dependency = false
29+
30+
# necessary for snapshot dependencies
31+
platformToolsVersion=
32+
33+
# also, may be necessary for eap builds
34+
useInstaller=false
35+

gradle/wrapper/gradle-wrapper.jar

-10.6 KB
Binary file not shown.
Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,7 @@
1-
#
2-
# Copyright (c) 2017. tangzx([email protected])
3-
#
4-
# Licensed under the Apache License, Version 2.0 (the "License");
5-
# you may not use this file except in compliance with the License.
6-
# You may obtain a copy of the License at
7-
#
8-
# http://www.apache.org/licenses/LICENSE-2.0
9-
#
10-
# Unless required by applicable law or agreed to in writing, software
11-
# distributed under the License is distributed on an "AS IS" BASIS,
12-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
# See the License for the specific language governing permissions and
14-
# limitations under the License.
15-
#
16-
171
distributionBase=GRADLE_USER_HOME
182
distributionPath=wrapper/dists
19-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
206
zipStoreBase=GRADLE_USER_HOME
217
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)