diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index c242b0146e0..652a920e528 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -124,7 +124,7 @@ jobs: uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1 with: distribution: 'temurin' - java-version: 17 + java-version: 23 # Set environment variables - name: Export Properties @@ -166,7 +166,7 @@ jobs: # Run Verify Plugin task and IntelliJ Plugin Verifier tool - name: Run Plugin Verification tasks env: - JAVA_TOOL_OPTIONS: -Dlogback.configurationFile=${{ github.workspace }}/intellij-plugin/logback.xml + JAVA_TOOL_OPTIONS: -Xmx4g -Dlogback.configurationFile=${{ github.workspace }}/intellij-plugin/logback.xml run: ./gradlew :intellij-plugin:verifyPlugin -Pplugin.verifier.home.dir=${{ steps.properties.outputs.pluginVerifierHomeDir }} # Collect Plugin Verifier Result diff --git a/gradle/libraries.toml b/gradle/libraries.toml index f796496a0ed..67fb258f334 100644 --- a/gradle/libraries.toml +++ b/gradle/libraries.toml @@ -27,12 +27,12 @@ javaPoet = "1.13.0" jetbrains-annotations = "24.0.1" junit = "4.13.2" kotlin-plugin-min = "1.9.0" -kotlin-plugin = "2.1.10" -kotlin-plugin-max = "2.1.10" +kotlin-plugin = "2.1.20" +kotlin-plugin-max = "2.1.20" kotlinx-coroutines = "1.9.0" kotlinx-datetime = "0.5.0" kotlinx-serialization-runtime = "1.6.2" -ksp = "2.1.10-1.0.29" +ksp = "2.1.20-1.0.31" ktor = "3.0.0" moshix = "0.14.1" node-fetch = "2.7.0" diff --git a/intellij-plugin/build.gradle.kts b/intellij-plugin/build.gradle.kts index 7bed6901c6f..fdc35b6deb6 100644 --- a/intellij-plugin/build.gradle.kts +++ b/intellij-plugin/build.gradle.kts @@ -1,11 +1,12 @@ - import org.gradle.api.tasks.testing.logging.TestExceptionFormat import org.gradle.api.tasks.testing.logging.TestLogEvent import org.jetbrains.changelog.markdownToHTML import org.jetbrains.intellij.platform.gradle.TestFrameworkType +import org.jetbrains.intellij.platform.gradle.tasks.VerifyPluginTask.FailureLevel.COMPATIBILITY_PROBLEMS import org.jetbrains.intellij.platform.gradle.tasks.VerifyPluginTask.FailureLevel.INTERNAL_API_USAGES import org.jetbrains.intellij.platform.gradle.tasks.VerifyPluginTask.FailureLevel.INVALID_PLUGIN import org.jetbrains.intellij.platform.gradle.tasks.VerifyPluginTask.FailureLevel.PLUGIN_STRUCTURE_WARNINGS +import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType import java.net.URI import java.text.SimpleDateFormat import java.util.Date @@ -55,6 +56,9 @@ kotlin { } val apolloDependencies = configurations.create("apolloDependencies").apply { + attributes { + attribute(KotlinPlatformType.attribute, KotlinPlatformType.jvm) + } listOf(":apollo-annotations", ":apollo-api", ":apollo-runtime").forEach { dependencies.add(project.dependencies.project(it, "jvmApiElements")) } @@ -160,7 +164,9 @@ dependencies { bundledPlugins(properties("platformBundledPlugins").split(',').map(String::trim).filter(String::isNotEmpty)) plugins(properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty)) instrumentationTools() - pluginVerifier() + // Use a specific version of the verifier + // TODO: remove when https://youtrack.jetbrains.com/issue/MP-7366 is fixed + pluginVerifier(version = "1.383") testFramework(TestFrameworkType.Plugin.Java) zipSigner() } @@ -243,8 +249,9 @@ intellijPlatform { } failureLevel.set( setOf( - // TODO: Temporarily disabled due to https://platform.jetbrains.com/t/plugin-verifier-fails-with-plugin-com-intellij-modules-json-not-declared-as-a-plugin-dependency/580 -// COMPATIBILITY_PROBLEMS, + // Temporarily disabled due to https://platform.jetbrains.com/t/plugin-verifier-fails-with-plugin-com-intellij-modules-json-not-declared-as-a-plugin-dependency/580 + // TODO: Uncomment when https://youtrack.jetbrains.com/issue/MP-7366 is fixed + // COMPATIBILITY_PROBLEMS, INTERNAL_API_USAGES, INVALID_PLUGIN, PLUGIN_STRUCTURE_WARNINGS, diff --git a/intellij-plugin/logback.xml b/intellij-plugin/logback.xml index 0075d2bc1d5..ccaa085fb5a 100644 --- a/intellij-plugin/logback.xml +++ b/intellij-plugin/logback.xml @@ -6,7 +6,7 @@ - + diff --git a/libraries/apollo-tooling/src/main/kotlin/com/apollographql/apollo/tooling/RegisterOperations.kt b/libraries/apollo-tooling/src/main/kotlin/com/apollographql/apollo/tooling/RegisterOperations.kt index 895e29e5dd0..8616c4cd104 100644 --- a/libraries/apollo-tooling/src/main/kotlin/com/apollographql/apollo/tooling/RegisterOperations.kt +++ b/libraries/apollo-tooling/src/main/kotlin/com/apollographql/apollo/tooling/RegisterOperations.kt @@ -51,7 +51,6 @@ private fun GQLSelection.score(): String { is GQLField -> "a$name" is GQLFragmentSpread -> "b$name" is GQLInlineFragment -> "c" // apollo-tooling doesn't sort inline fragments - else -> error("Cannot sort Selection '$this'") } } diff --git a/libraries/apollo-tooling/src/main/kotlin/com/apollographql/apollo/tooling/serialization.kt b/libraries/apollo-tooling/src/main/kotlin/com/apollographql/apollo/tooling/serialization.kt index 0e97cf66bbc..7f18038d1dc 100644 --- a/libraries/apollo-tooling/src/main/kotlin/com/apollographql/apollo/tooling/serialization.kt +++ b/libraries/apollo-tooling/src/main/kotlin/com/apollographql/apollo/tooling/serialization.kt @@ -21,7 +21,6 @@ internal fun JsonElement.toAny(): Any? = when (this) { else -> booleanOrNull ?: intOrNull ?: longOrNull ?: doubleOrNull ?: error("cannot decode $this") } } - else -> error("cannot convert $this to Any") } fun Any?.toJsonElement(): JsonElement = when (this) { @@ -32,4 +31,4 @@ fun Any?.toJsonElement(): JsonElement = when (this) { is String -> JsonPrimitive(this) null -> JsonNull else -> error("cannot convert $this to JsonElement") -} \ No newline at end of file +}