Skip to content

Commit 9ceeb88

Browse files
authored
Merge pull request #2254 from digma-ai/upgrade-to-beta8
upgrade to beta8 and remove kotlin plugin workaround
2 parents 3058640 + 5c179ae commit 9ceeb88

File tree

9 files changed

+24
-129
lines changed

9 files changed

+24
-129
lines changed

build.gradle.kts

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import org.jetbrains.changelog.date
99
import org.jetbrains.changelog.exceptions.MissingVersionException
1010
import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
1111
import org.jetbrains.intellij.platform.gradle.models.ProductRelease
12-
import org.jetbrains.intellij.platform.gradle.tasks.CustomRunIdeTask
1312
import org.jetbrains.intellij.platform.gradle.tasks.VerifyPluginTask
1413

1514
fun properties(key: String) = properties(key, project)
@@ -83,10 +82,6 @@ dependencies {
8382
pluginModule(implementation(project(":maven-support")))
8483
pluginModule(implementation(project(":rider")))
8584

86-
87-
//we need to supply a jetbrains runtime to runIde because we use maven artifacts for IDE
88-
// downloads, see in gradle.properties useBinaryReleases=false
89-
jetbrainsRuntime()
9085
pluginVerifier()
9186
zipSigner()
9287
}
@@ -218,14 +213,6 @@ tasks {
218213

219214
prepareSandbox {
220215

221-
/*
222-
sometimes runIde fails with this error:
223-
Execution failed for task ':prepareSandbox'.
224-
> Cannot access output property '$1$4' of task ':prepareSandbox'. Accessing unreadable inputs or outputs is not supported. Declare the task as untracked by using Task.doNotTrackState(). For more information, please refer to https://docs.gradle.org/8.8/userguide/incremental_build.html#sec:disable-state-tracking in the Gradle documentation.
225-
> java.io.IOException: Cannot snapshot /home/shalom/workspace/digma/digma-intellij-plugin/build/idea-sandbox/IC-2024.1.3/system/jcef_cache/SingletonSocket: not a regular file
226-
*/
227-
doNotTrackState("prepareSandbox needs to re-run every time")
228-
229216
//copy rider dlls to the plugin sandbox, so it is packaged in the zip
230217
from(configurations.getByName("riderDotNetObjects")) {
231218
into("${rootProject.name}/dotnet/")
@@ -285,22 +272,6 @@ tasks {
285272
}
286273
}
287274

288-
// todo: create custom tasks, for example: runWithoutKotlin, runWithoutGradle etc
289-
// see:https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-custom-tasks.html
290-
291-
292-
val runWithoutGitHubPlugin by registering(CustomRunIdeTask::class) {
293-
plugins {
294-
disablePlugin("org.jetbrains.plugins.github")
295-
}
296-
}
297-
298-
val runWithoutKotlinPlugin by registering(CustomRunIdeTask::class) {
299-
plugins {
300-
disablePlugin("org.jetbrains.kotlin")
301-
}
302-
}
303-
304275

305276
runIde {
306277
dependsOn(deleteLog)
@@ -388,4 +359,4 @@ tasks {
388359
filter<ReplaceTokens>("tokens" to tokens)
389360
}
390361
}
391-
}
362+
}

building-how-to/building-with-eap.txt

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

common-build-logic/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repositories {
1111
}
1212

1313
dependencies {
14-
implementation("org.jetbrains.intellij.platform:intellij-platform-gradle-plugin:2.0.0-beta7")
14+
implementation("org.jetbrains.intellij.platform:intellij-platform-gradle-plugin:2.0.0-beta8")
1515
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.24")
1616
implementation("com.glovoapp.gradle:versioning:1.1.10")
1717
implementation("de.undercouch:gradle-download-task:5.6.0")

common-build-logic/src/main/kotlin/common/BuildProfile.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ object BuildProfiles {
173173

174174
profile = Profile.p241,
175175
platformVersion = "2024.1.4",
176-
riderVersion = "2024.1.3",
177-
pycharmVersion = "2024.1.3",
176+
riderVersion = "2024.1.4",
177+
pycharmVersion = "2024.1.4",
178178
riderTargetFramework = "net8.0",
179179
riderResharperVersionConstant = "PROFILE_2023_2",
180180
platformVersionCode = "241",
@@ -190,15 +190,15 @@ object BuildProfiles {
190190

191191
isEAP = true,
192192
profile = Profile.p242,
193-
platformVersion = "242.18071-EAP-CANDIDATE-SNAPSHOT",
194-
riderVersion = "2024.2-EAP4-SNAPSHOT",
193+
platformVersion = "242.19533-EAP-CANDIDATE-SNAPSHOT",
194+
riderVersion = "2024.2-EAP5-SNAPSHOT",
195195
pycharmVersion = "242-EAP-SNAPSHOT",
196196
riderTargetFramework = "net8.0",
197197
riderResharperVersionConstant = "PROFILE_2023_2",
198198
platformVersionCode = "242",
199199
pluginSinceBuild = "242",
200200
pluginUntilBuild = "242.*",
201-
kotlinTarget = KotlinVersion.KOTLIN_1_9.version, //todo: maybe need to upgrade to 2.0
201+
kotlinTarget = KotlinVersion.KOTLIN_1_9.version,
202202
javaVersion = JavaVersion.VERSION_17.majorVersion,
203203
)
204204

common-build-logic/src/main/kotlin/plugin-library.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,21 @@ plugins {
1414
repositories {
1515
intellijPlatform {
1616
defaultRepositories()
17+
jetbrainsRuntime()
1718
}
1819
}
1920

2021
dependencies {
2122
intellijPlatform {
2223
instrumentationTools()
2324
pluginVerifier()
25+
//we need to supply a jetbrains runtime to runIde because we use maven artifacts for IDEs
26+
jetbrainsRuntime()
2427
}
2528
}
2629

2730

31+
2832
afterEvaluate {
2933
if (gradle.startParameter.taskNames.contains("buildPlugin")) {
3034
withSilenceLogging {

common-build-logic/src/main/kotlin/plugin-project.gradle.kts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import common.logBuildProfile
22
import common.logIntellijPlatformPlugin
33
import common.properties
44
import common.withSilenceLogging
5-
import gradle.kotlin.dsl.accessors._44bd68d24449dd49451fa0f0c4976aa6.intellijPlatform
65

76
plugins {
87
id("digma-base")
@@ -19,12 +18,23 @@ repositories {
1918
}
2019
}
2120

21+
dependencies {
22+
intellijPlatform {
23+
instrumentationTools()
24+
pluginVerifier()
25+
//we need to supply a jetbrains runtime to runIde because we use maven artifacts for IDEs
26+
jetbrainsRuntime()
27+
}
28+
}
29+
2230
intellijPlatform {
2331
//buildSearchableOptions is a long-running task, we don't need it in every build,
2432
// local build can do without it. we activate it only in GitHub
2533
buildSearchableOptions = properties("buildSearchableOptions", project).toBoolean()
2634
}
2735

36+
37+
2838
afterEvaluate {
2939
if (gradle.startParameter.taskNames.contains("buildPlugin")) {
3040
withSilenceLogging {
@@ -34,14 +44,6 @@ afterEvaluate {
3444
}
3545
}
3646

37-
38-
dependencies {
39-
intellijPlatform {
40-
instrumentationTools()
41-
pluginVerifier()
42-
}
43-
}
44-
4547
tasks {
4648

4749
//when building with buildPlugin the tests are not executed,

gradle.properties

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,25 +47,8 @@ org.gradle.jvmargs='-Dfile.encoding=UTF-8'
4747
### Intellij platform gradle plugin properties
4848
## see https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-gradle-properties.html
4949

50-
## todo: not sure its necessary
51-
## see https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-gradle-properties.html#useCacheRedirector
52-
#org.jetbrains.intellij.platform.buildFeature.useCacheRedirector=false
53-
5450
org.jetbrains.intellij.platform.buildFeature.downloadSources=true
55-
56-
##### about useBinaryReleases
57-
## the intellij platform gradle plugin downloads IDEs from jetbrains CDN: https://data.services.jetbrains.com/products
58-
## these are exactly the same binaries that users install.
59-
## but EAP builds are not always released to CDN, only RC are released to CDN, so when building with EAP it is not
60-
## guaranteed that we'll find it in CDN, in that case it needs to be downloaded from jetbrains maven repo.
61-
## Rider binary releases do not contain a bundled resharper sdk, maven artifacts do, and with a bundled resharper
62-
## sdk it is easier and more reliable to configure the dotnet project, that is what Rider team recommend.
63-
## So because we build with EAP ,and we build with Rider it is more convenient for us to build with maven artifacts.
64-
## useBinaryReleases=false means the IDEs will be downloaded from maven repo.
65-
## but IDEs from maven repo do not have a bundled jetbrainsRuntime and a jetbrainsRuntime() needs to be supplied
66-
## to runIde. see more info about it in the intellij platform extension configuration in the main module.
67-
org.jetbrains.intellij.platform.buildFeature.useBinaryReleases=false
68-
51+
org.jetbrains.intellij.platform.buildFeature.useCacheRedirector=false
6952
#org.jetbrains.intellij.platform.buildFeature.useClosestVersionResolving=false
7053

7154
### Intellij platform gradle plugin properties END

jvm-common/build.gradle.kts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,7 @@ dependencies {
4141
}
4242

4343
bundledPlugin("com.intellij.java")
44-
45-
//there is an issue with plugin verifier that prevents using bundledPlugin("org.jetbrains.kotlin") for 242.
46-
//https://youtrack.jetbrains.com/issue/MP-6594
47-
//until this issue is fixed we use a direct dependency on kotlin plugin, which is not the best but works.
48-
//todo: the dependency is on a version that i'm not sure compatible with 242
49-
if (project.currentProfile().profile > BuildProfiles.Profile.p241){
50-
plugin("org.jetbrains.kotlin","232-1.9.24-release-822-IJ10072.27")
51-
}else{
52-
bundledPlugin("org.jetbrains.kotlin")
53-
}
44+
bundledPlugin("org.jetbrains.kotlin")
5445
}
5546
}
5647

settings.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ plugins {
2121
/*
2222
kotlin-stdlib: the kotlin-stdlib must be compatible with the intellij platform version,
2323
see: https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library
24-
25-
todo: maybe use java-platforms instead of versionCatalogs
2624
*/
2725
dependencyResolutionManagement {
2826
versionCatalogs {

0 commit comments

Comments
 (0)