@@ -5,12 +5,10 @@ plugins {
55 id(" java" )
66 // Kotlin support
77 id(" org.jetbrains.kotlin.jvm" ) version " 2.1.0"
8- // Gradle IntelliJ Platform Plugin
8+ // https://github.com/JetBrains/intellij-platform-gradle-plugin
99 id(" org.jetbrains.intellij.platform" ) version " 2.6.0"
10- // Gradle Changelog Plugin
11- id(" org.jetbrains.changelog" ) version " 1.3.1"
12- // Protobuf support
13- id(" com.google.protobuf" ) version " 0.9.4"
10+ // https://github.com/JetBrains/gradle-changelog-plugin
11+ id(" org.jetbrains.changelog" ) version " 2.2.1"
1412}
1513
1614fun properties (key : String ) = project.findProperty(key).toString()
@@ -21,28 +19,45 @@ version = properties("pluginVersion")
2119// Configure Java compatibility
2220java {
2321 toolchain {
24- languageVersion.set(JavaLanguageVersion .of(17 ))
22+ languageVersion.set(JavaLanguageVersion .of(21 ))
2523 }
26- sourceCompatibility = JavaVersion .VERSION_17
27- targetCompatibility = JavaVersion .VERSION_17
24+ sourceCompatibility = JavaVersion .VERSION_21
25+ targetCompatibility = JavaVersion .VERSION_21
2826}
2927
3028kotlin {
3129 jvmToolchain {
32- languageVersion.set(JavaLanguageVersion .of(17 ))
30+ languageVersion.set(JavaLanguageVersion .of(21 ))
3331 }
3432}
3533
3634// Configure project's dependencies
3735repositories {
3836 mavenCentral()
37+ google()
3938 intellijPlatform { defaultRepositories() }
4039}
4140
41+ intellijPlatform {
42+ pluginConfiguration {
43+ name = properties(" pluginName" )
44+ group = properties(" pluginGroup" )
45+ changeNotes.set(" Updated android studio compatibility to 2024.3.1.7" )
46+ ideaVersion.sinceBuild.set(project.property(" sinceBuild" ).toString())
47+ ideaVersion.untilBuild.set(provider { null })
48+ }
49+ buildSearchableOptions.set(false )
50+ instrumentCode = true
51+ }
52+
4253dependencies {
4354 intellijPlatform {
44- androidStudio(properties(" platformVersion" ))
4555 bundledPlugin(" org.jetbrains.android" )
56+ if (project.hasProperty(" localASVersion" )) {
57+ local(property(" localASVersion" ).toString())
58+ } else {
59+ androidStudio(property(" platformVersion" ).toString())
60+ }
4661 }
4762 implementation(platform(" io.projectreactor:reactor-bom:2024.0.0" ))
4863 implementation(" io.projectreactor.netty:reactor-netty-http:1.1.13" )
@@ -57,41 +72,7 @@ dependencies {
5772 testImplementation(" junit:junit:4.12" )
5873}
5974
60- protobuf {
61- protoc {
62- artifact = " com.google.protobuf:protoc:3.25.1"
63- }
64- generateProtoTasks {
65- all().forEach { task ->
66- task.builtins {
67- named(" java" ) {
68- option(" lite" )
69- }
70- }
71- }
72- }
73- }
74-
75- sourceSets {
76- main {
77- proto {
78- srcDir(" proto" )
79- }
80- }
81- }
82-
8375tasks {
84- patchPluginXml {
85- version = properties(" pluginVersion" )
86- sinceBuild = properties(" pluginSinceBuild" )
87- untilBuild = properties(" pluginUntilBuild" )
88- changeNotes = """
89- Support Android Studio Ladybug.<br>
90- Improved tree renderer.<br>
91- Fixed uiautomator dump.<br>
92- """
93- }
94-
9576 runIde {
9677 jvmArgs = listOf (
9778 " -Dide.mac.message.dialogs.as.sheets=false" ,
@@ -102,7 +83,7 @@ tasks {
10283
10384 withType< org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile > ().configureEach {
10485 compilerOptions {
105- jvmTarget.set(JvmTarget .JVM_17 )
86+ jvmTarget.set(JvmTarget .JVM_21 )
10687 }
10788 }
10889}
0 commit comments