diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a8fcbf6..487dc4fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: - name: Build and run tests id: gradle - run: ./gradlew check + run: ./gradlew check testIdeUi - name: Print build scan url if: always() diff --git a/build.gradle.kts b/build.gradle.kts index 8d53ede3..e4d3c057 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -58,6 +58,16 @@ plugins { alias(libs.plugins.binaryCompatibilityValidator) } +buildscript { + dependencies { + // Apply boms for buildscript classpath + classpath(platform(libs.asm.bom)) + classpath(platform(libs.kotlin.bom)) + classpath(platform(libs.coroutines.bom)) + classpath(platform(libs.kotlin.gradlePlugins.bom)) + } +} + apiValidation { // only :tools:cli is tracking this right now // Annoyingly this only uses simple names @@ -156,7 +166,7 @@ subprojects { } } - tasks.withType().configureEach { options.release.set(17) } + tasks.withType().configureEach { options.release.set(libs.versions.jvmTarget.map(String::toInt)) } } val isForIntelliJPlugin = @@ -208,19 +218,10 @@ subprojects { this.jvmTarget.set(jvmTargetVersion) freeCompilerArgs.addAll( // Enhance not null annotated type parameter's types to definitely not null types - // (@NotNull T - // => T & Any) + // (@NotNull T => T & Any) "-Xenhance-type-parameter-types-to-def-not-null", - // Use fast implementation on Jar FS. This may speed up compilation time, but currently - // it's - // an experimental mode - // TODO toe-hold but we can't use it yet because it emits a warning that fails with - // -Werror - // https://youtrack.jetbrains.com/issue/KT-54928 - // "-Xuse-fast-jar-file-system", // Support inferring type arguments based on only self upper bounds of the corresponding - // type - // parameters + // type parameters "-Xself-upper-bound-inference", "-Xjsr305=strict", // Match JVM assertion behavior: @@ -336,7 +337,7 @@ subprojects { } } project.dependencies { - configure { intellijIdeaCommunity("2024.1.2") } + configure { intellijIdeaCommunity("2024.2.1") } } if (hasProperty("SgpIntellijArtifactoryBaseUrl")) { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3a526a71..bd960587 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,6 +2,8 @@ agp = "8.6.1" agpAlpha = "8.6.1" anvil = "2.5.0-beta11" +# Release notes: https://asm.ow2.io/versions.html +asm = "9.7" bugsnagGradle = "8.1.0" circuit = "0.23.1" compose-jb = "1.7.0-rc01" @@ -13,7 +15,8 @@ dokka = "1.9.20" errorproneGradle = "3.1.0" gradle-retry = "1.6.0" intellij-platform = "2.1.0" -jdk = "22" +# Temporary until https://bugs.openjdk.org/browse/JDK-8331027 is fixed in 23 +jdk = "21" jvmTarget = "17" jewel = "0.25.0" jna = "5.15.0" @@ -69,6 +72,7 @@ wire = { id = "com.squareup.wire", version.ref = "wire" } [libraries] agp = { module = "com.android.tools.build:gradle", version.ref = "agp" } agpAlpha = { module = "com.android.tools.build:gradle", version.ref = "agpAlpha" } +asm-bom = { module = "org.ow2.asm:asm-bom", version.ref = "asm" } autoService-annotations = "com.google.auto.service:auto-service-annotations:1.1.1" autoService-ksp = "dev.zacsweers.autoservice:auto-service-ksp:1.2.0" bugsnag = "com.bugsnag:bugsnag:3.7.2" @@ -108,13 +112,14 @@ gradlePlugins-wire = { module = "com.squareup.wire:wire-gradle-plugin", version. guava = "com.google.guava:guava:33.3.1-jre" kaml = { module = "com.charleskorn.kaml:kaml", version.ref = "kaml" } kotlin-bom = { module = "org.jetbrains.kotlin:kotlin-bom", version.ref = "kotlin" } +kotlin-gradlePlugins-bom = { module = "org.jetbrains.kotlin:kotlin-gradle-plugins-bom", version.ref = "kotlin" } kotlin-poet = { module = "com.squareup:kotlinpoet", version.ref = "kotlinPoet" } kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" } kotlinx-serialization-core = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version.ref = "kotlinx-serialization" } kotlinShell = "eu.jrie.jetbrains:kotlin-shell-core:0.2.1" ktfmt = { module = "com.facebook:ktfmt", version.ref = "ktfmt" } -jewel-bridge = { module = "org.jetbrains.jewel:jewel-ide-laf-bridge-241", version.ref = "jewel" } -jewel-standalone = { module = "org.jetbrains.jewel:jewel-int-ui-standalone-241", version.ref = "jewel" } +jewel-bridge = { module = "org.jetbrains.jewel:jewel-ide-laf-bridge-242", version.ref = "jewel" } +jewel-standalone = { module = "org.jetbrains.jewel:jewel-int-ui-standalone-242", version.ref = "jewel" } jgrapht = "org.jgrapht:jgrapht-core:1.5.2" jna = { module = "net.java.dev.jna:jna", version.ref = "jna" } jna-platform = { module = "net.java.dev.jna:jna-platform", version.ref = "jna" } diff --git a/platforms/intellij/artifactory-authenticator/gradle.properties b/platforms/intellij/artifactory-authenticator/gradle.properties index 1a06b669..ccaefd84 100644 --- a/platforms/intellij/artifactory-authenticator/gradle.properties +++ b/platforms/intellij/artifactory-authenticator/gradle.properties @@ -3,7 +3,7 @@ PLUGIN_ID=com.slack.intellij.artifactory PLUGIN_NAME=Artifactory Authenticator PLUGIN_DESCRIPTION=A plugin for authenticating plugin repositories with Artifactory. VERSION_NAME=0.1.1 -PLUGIN_SINCE_BUILD=241 +PLUGIN_SINCE_BUILD=242 ARTIFACTORY_URL_SUFFIX=artifactory-authenticator # Opt-out flag for bundling Kotlin standard library. # See https://plugins.jetbrains.com/docs/intellij/using-kotlin.html#kotlin-standard-library diff --git a/platforms/intellij/skate/build.gradle.kts b/platforms/intellij/skate/build.gradle.kts index fd0381d9..f98747a7 100644 --- a/platforms/intellij/skate/build.gradle.kts +++ b/platforms/intellij/skate/build.gradle.kts @@ -126,7 +126,7 @@ dependencies { // https://plugins.jetbrains.com/docs/intellij/android-studio.html#open-source-plugins-for-android-studio // https://plugins.jetbrains.com/docs/intellij/android-studio-releases-list.html // https://plugins.jetbrains.com/plugin/22989-android/versions/stable - plugin("org.jetbrains.android:241.17011.79") + plugin("org.jetbrains.android:242.21829.142") bundledPlugins( "com.intellij.java", "org.intellij.plugins.markdown", diff --git a/platforms/intellij/skate/gradle.properties b/platforms/intellij/skate/gradle.properties index 7287ba40..4a5015ff 100644 --- a/platforms/intellij/skate/gradle.properties +++ b/platforms/intellij/skate/gradle.properties @@ -3,7 +3,7 @@ PLUGIN_ID=com.slack.intellij.skate PLUGIN_NAME=Skate PLUGIN_DESCRIPTION=A plugin for IntelliJ and Android Studio for faster Kotlin and Android development! VERSION_NAME=0.1.0 -PLUGIN_SINCE_BUILD=241 +PLUGIN_SINCE_BUILD=242 ARTIFACTORY_URL_SUFFIX=skate # Opt-out flag for bundling Kotlin standard library. # See https://plugins.jetbrains.com/docs/intellij/using-kotlin.html#kotlin-standard-library diff --git a/platforms/intellij/skate/src/main/kotlin/foundry/intellij/skate/modeltranslator/helper/TranslatorHelper.kt b/platforms/intellij/skate/src/main/kotlin/foundry/intellij/skate/modeltranslator/helper/TranslatorHelper.kt index 9b86f476..0473cbde 100644 --- a/platforms/intellij/skate/src/main/kotlin/foundry/intellij/skate/modeltranslator/helper/TranslatorHelper.kt +++ b/platforms/intellij/skate/src/main/kotlin/foundry/intellij/skate/modeltranslator/helper/TranslatorHelper.kt @@ -28,7 +28,7 @@ import com.intellij.psi.search.GlobalSearchScope import foundry.intellij.skate.SkatePluginSettings import foundry.intellij.skate.modeltranslator.model.TranslatorBundle import foundry.intellij.skate.util.snakeToCamelCase -import org.jetbrains.kotlin.idea.quickfix.createFromUsage.callableBuilder.getReturnTypeReference +import org.jetbrains.kotlin.idea.base.psi.getReturnTypeReferences import org.jetbrains.kotlin.psi.KtBlockExpression import org.jetbrains.kotlin.psi.KtConstructorCalleeExpression import org.jetbrains.kotlin.psi.KtImportDirective @@ -94,7 +94,7 @@ object TranslatorHelper { // If the function doesn't have a return type, then it can't be a translator and no need to // process it. - val destinationModelRef = element.getReturnTypeReference() + val destinationModelRef = element.getReturnTypeReferences().firstOrNull() val destinationModel = destinationModelRef?.text ?: return null // If the source model is a String and the destination isn't an enum, diff --git a/platforms/intellij/skate/src/main/resources/META-INF/plugin.xml b/platforms/intellij/skate/src/main/resources/META-INF/plugin.xml index 2f64079c..a79cf995 100644 --- a/platforms/intellij/skate/src/main/resources/META-INF/plugin.xml +++ b/platforms/intellij/skate/src/main/resources/META-INF/plugin.xml @@ -26,6 +26,10 @@ canCloseContents="true" secondary="false" icon="AllIcons.Actions.Lightning"/> + + + +