Skip to content

Commit 18e5530

Browse files
committed
changes required to release on IntelliJ 2025.1
1 parent 9a72135 commit 18e5530

File tree

6 files changed

+82
-23
lines changed

6 files changed

+82
-23
lines changed

build.gradle.kts

+18-7
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ plugins {
3737
id("org.jetbrains.kotlin.jvm") version "2.1.0"
3838
}
3939

40+
// TODO(mossmana) These properties are duplicated in flutter-idea/build.gradle.kts and flutter-studio/build.gradle.kts. Should be consolidated.
4041
val flutterPluginVersion = providers.gradleProperty("flutterPluginVersion").get()
4142
val ideaProduct = providers.gradleProperty("ideaProduct").get()
4243
val ideaVersion = providers.gradleProperty("ideaVersion").get()
@@ -45,6 +46,7 @@ val dartPluginVersion = providers.gradleProperty("dartPluginVersion").get()
4546
val androidPluginVersion = providers.gradleProperty("androidPluginVersion").get()
4647
val sinceBuildInput = providers.gradleProperty("sinceBuild").get()
4748
val untilBuildInput = providers.gradleProperty("untilBuild").get()
49+
val javaVersion = providers.gradleProperty("javaVersion").get()
4850
group = "io.flutter"
4951

5052
// For debugging purposes:
@@ -55,28 +57,37 @@ println("dartPluginVersion: $dartPluginVersion")
5557
println("androidPluginVersion: $androidPluginVersion")
5658
println("sinceBuild: $sinceBuildInput")
5759
println("untilBuild: $untilBuildInput")
60+
println("javaVersion: $javaVersion")
5861
println("group: $group")
5962

63+
var jvmVersion = JvmTarget.JVM_17
64+
if (javaVersion == "21") {
65+
jvmVersion = JvmTarget.JVM_21
66+
}
6067
kotlin {
6168
compilerOptions {
6269
apiVersion.set(KotlinVersion.KOTLIN_1_9)
63-
jvmTarget = JvmTarget.JVM_17
70+
jvmTarget = jvmVersion
6471
}
6572
}
66-
val javaCompatibilityVersion = JavaVersion.VERSION_17
73+
74+
var javaCompatibilityVersion = JavaVersion.VERSION_17
75+
if (javaVersion == "21") {
76+
javaCompatibilityVersion = JavaVersion.VERSION_21
77+
}
6778
java {
6879
sourceCompatibility = javaCompatibilityVersion
6980
targetCompatibility = javaCompatibilityVersion
7081
}
7182

7283
dependencies {
7384
intellijPlatform {
74-
// Documentation on the create(...) methods:
75-
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html#custom-target-platforms
85+
// Documentation on the default target platform methods:
86+
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html#default-target-platforms
7687
if (ideaProduct == "android-studio") {
77-
create(IntelliJPlatformType.AndroidStudio, ideaVersion)
78-
} else {//if (ide == "ideaIC") {
79-
create(IntelliJPlatformType.IntellijIdeaCommunity, ideaVersion)
88+
androidStudio(ideaVersion)
89+
} else { // if (ideaProduct == "IC") {
90+
intellijIdeaCommunity(ideaVersion)
8091
}
8192
testFramework(TestFrameworkType.Platform)
8293

flutter-idea/build.gradle.kts

+16-6
Original file line numberDiff line numberDiff line change
@@ -35,28 +35,38 @@ val dartPluginVersion = providers.gradleProperty("dartPluginVersion").get()
3535
val androidPluginVersion = providers.gradleProperty("androidPluginVersion").get()
3636
val sinceBuildInput = providers.gradleProperty("sinceBuild").get()
3737
val untilBuildInput = providers.gradleProperty("untilBuild").get()
38+
val javaVersion = providers.gradleProperty("javaVersion").get()
3839
group = "io.flutter"
3940

41+
var jvmVersion = JvmTarget.JVM_17
42+
if (javaVersion == "21") {
43+
jvmVersion = JvmTarget.JVM_21
44+
}
4045
kotlin {
4146
compilerOptions {
4247
apiVersion.set(KotlinVersion.KOTLIN_1_9)
43-
jvmTarget = JvmTarget.JVM_17
48+
jvmTarget = jvmVersion
4449
}
4550
}
46-
val javaCompatibilityVersion = JavaVersion.VERSION_17
51+
52+
var javaCompatibilityVersion = JavaVersion.VERSION_17
53+
if (javaVersion == "21") {
54+
javaCompatibilityVersion = JavaVersion.VERSION_21
55+
}
4756
java {
4857
sourceCompatibility = javaCompatibilityVersion
4958
targetCompatibility = javaCompatibilityVersion
5059
}
5160

61+
5262
dependencies {
5363
intellijPlatform {
54-
// Documentation on the create(...) methods:
55-
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html#custom-target-platforms
64+
// Documentation on the default target platform methods:
65+
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html#default-target-platforms
5666
if (ideaProduct == "android-studio") {
57-
create(IntelliJPlatformType.AndroidStudio, ideaVersion)
67+
androidStudio(ideaVersion)
5868
} else { // if (ideaProduct == "IC") {
59-
create(IntelliJPlatformType.IntellijIdeaCommunity, ideaVersion)
69+
intellijIdeaCommunity(ideaVersion)
6070
}
6171
testFramework(TestFrameworkType.Platform)
6272

flutter-studio/build.gradle.kts

+18-4
Original file line numberDiff line numberDiff line change
@@ -36,28 +36,42 @@ val dartPluginVersion = providers.gradleProperty("dartPluginVersion").get()
3636
val androidPluginVersion = providers.gradleProperty("androidPluginVersion").get()
3737
val sinceBuildInput = providers.gradleProperty("sinceBuild").get()
3838
val untilBuildInput = providers.gradleProperty("untilBuild").get()
39+
val javaVersion = providers.gradleProperty("javaVersion").get()
3940
group = "io.flutter"
4041

42+
var jvmVersion = JvmTarget.JVM_17
43+
if (javaVersion == "21") {
44+
jvmVersion = JvmTarget.JVM_21
45+
}
4146
kotlin {
4247
compilerOptions {
4348
apiVersion.set(KotlinVersion.KOTLIN_1_9)
44-
jvmTarget = JvmTarget.JVM_17
49+
jvmTarget = jvmVersion
4550
}
4651
}
47-
val javaCompatibilityVersion = JavaVersion.VERSION_17
52+
53+
var javaCompatibilityVersion = JavaVersion.VERSION_17
54+
if (javaVersion == "21") {
55+
javaCompatibilityVersion = JavaVersion.VERSION_21
56+
}
4857
java {
4958
sourceCompatibility = javaCompatibilityVersion
5059
targetCompatibility = javaCompatibilityVersion
5160
}
5261

5362
dependencies {
5463
intellijPlatform {
64+
// Documentation on the default target platform methods:
65+
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html#default-target-platforms
5566
if (ideaProduct == "android-studio") {
56-
create(IntelliJPlatformType.AndroidStudio, ideaVersion)
67+
androidStudio(ideaVersion)
5768
} else { // if (ideaProduct == "IC") {
58-
create(IntelliJPlatformType.IntellijIdeaCommunity, ideaVersion)
69+
intellijIdeaCommunity(ideaVersion)
5970
}
6071
testFramework(TestFrameworkType.Platform)
72+
73+
// Plugin dependnecy documentation:
74+
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html#plugins
6175
val bundledPluginList = mutableListOf(
6276
"com.intellij.java",
6377
"com.intellij.properties",

product-matrix.json

+25-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"androidPluginVersion": "",
1414
"sinceBuild": "233",
1515
"untilBuild": "233.*",
16-
"isUnitTestTarget": "false"
16+
"isUnitTestTarget": "false",
17+
"javaVersion": "17"
1718
},
1819
{
1920
"channel": "stable",
@@ -28,7 +29,8 @@
2829
"androidPluginVersion": "",
2930
"sinceBuild": "241",
3031
"untilBuild": "241.*",
31-
"isUnitTestTarget": "false"
32+
"isUnitTestTarget": "false",
33+
"javaVersion": "17"
3234
},
3335
{
3436
"channel": "stable",
@@ -43,7 +45,8 @@
4345
"androidPluginVersion": "",
4446
"sinceBuild": "242",
4547
"untilBuild": "242.*",
46-
"isUnitTestTarget": "false"
48+
"isUnitTestTarget": "false",
49+
"javaVersion": "17"
4750
},
4851
{
4952
"channel": "stable",
@@ -54,11 +57,28 @@
5457
"ideaProduct": "android-studio",
5558
"ideaVersion": "2024.3.1.10",
5659
"baseVersion": "243.22562.59",
57-
"dartPluginVersion": " 243.21565.120",
60+
"dartPluginVersion": "243.21565.120",
5861
"androidPluginVersion": "",
5962
"sinceBuild": "243",
6063
"untilBuild": "253.*",
61-
"isUnitTestTarget": "true"
64+
"isUnitTestTarget": "true",
65+
"javaVersion": "17"
66+
},
67+
{
68+
"channel": "stable",
69+
"comments": "IntelliJ 2025.1 Beta, Android Studio Meerkat 2024.3 EAP",
70+
"name": "2025.1",
71+
"version": "2025.1",
72+
"ijVersion": "2025.1",
73+
"ideaProduct": "IC",
74+
"ideaVersion": "251.23774.16",
75+
"baseVersion": "251.23774.16",
76+
"dartPluginVersion": "251.23774.16",
77+
"androidPluginVersion": "251.23774.16",
78+
"sinceBuild": "243",
79+
"untilBuild": "253.*",
80+
"isUnitTestTarget": "true",
81+
"javaVersion": "21"
6282
}
6383
]
6484
}

tool/plugin/lib/build_spec.dart

+4-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class BuildSpec {
2323
final String ideaVersion;
2424
final String androidPluginVersion;
2525
final String dartPluginVersion;
26+
final String javaVersion;
2627

2728
// TODO (jwren) can baseVersion be removed?
2829
final String baseVersion;
@@ -50,7 +51,8 @@ class BuildSpec {
5051
untilBuild = json['untilBuild'] as String,
5152
filesToSkip = json['filesToSkip'] as List<String>? ?? [],
5253
isUnitTestTarget = json['isUnitTestTarget'] == 'true',
53-
isTestTarget = json['isTestTarget'] == 'true';
54+
isTestTarget = json['isTestTarget'] == 'true',
55+
javaVersion = json['javaVersion'] as String;
5456

5557
bool get copyIjVersion => isAndroidStudio && ijVersion != null;
5658

@@ -106,6 +108,7 @@ class BuildSpec {
106108
'ideaVersion: $ideaVersion, '
107109
'baseVersion: $baseVersion, '
108110
'dartPluginVersion: $dartPluginVersion, '
111+
'javaVersion: $javaVersion, '
109112
'since: $sinceBuild, '
110113
'until: $untilBuild, '
111114
'version: "$release")';

tool/plugin/lib/runner.dart

+1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ androidPluginVersion=${spec.androidPluginVersion}
7373
sinceBuild=${spec.sinceBuild}
7474
untilBuild=${spec.untilBuild}
7575
testing=$testing
76+
javaVersion=${spec.javaVersion}
7677
kotlin.stdlib.default.dependency=false
7778
org.gradle.parallel=true
7879
org.gradle.jvmargs=-Xms1024m -Xmx4048m

0 commit comments

Comments
 (0)