diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index a6f8cf15..a4e07355 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -17,11 +17,11 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up JDK 21 - uses: actions/setup-java@v4 + - name: Set up JDK 25 + uses: actions/setup-java@v5 with: - java-version: '21' - distribution: 'adopt' + java-version: '25' + distribution: 'temurin' # Cache Gradle dependencies - name: Setup Gradle Dependencies Cache @@ -48,4 +48,4 @@ jobs: # env: # ORG_GRADLE_PROJECT_platformPlugins: "java,webDeployment,com.jetbrains.php:223.8617.59,de.espend.idea.php.toolbox:6.1.0" # ORG_GRADLE_PROJECT_platformVersion: "2022.3.2" -# run: ./gradlew check verifyPlugin buildPlugin \ No newline at end of file +# run: ./gradlew check verifyPlugin buildPlugin diff --git a/build.gradle.kts b/build.gradle.kts index 9c99a018..fac1c747 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,9 +5,9 @@ fun properties(key: String) = project.findProperty(key).toString() plugins { id("java") - id("org.jetbrains.kotlin.jvm") version "2.3.20" - id("org.jetbrains.intellij.platform") version "2.14.0" + id("org.jetbrains.intellij.platform") version "2.18.1" id("org.jetbrains.changelog") version "2.5.0" + kotlin("jvm") } group = properties("pluginGroup") @@ -95,7 +95,6 @@ tasks { patchPluginXml { version = properties("pluginVersion") sinceBuild.set(properties("pluginSinceBuild")) - untilBuild.set(properties("pluginUntilBuild")) changeNotes.set(file("src/main/resources/META-INF/change-notes.html").readText().replace("", "").replace("", "")) } @@ -116,3 +115,7 @@ tasks { } } } + +kotlin { + jvmToolchain(25) +} diff --git a/gradle.properties b/gradle.properties index 7f245c2e..880cbaca 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,22 +9,21 @@ pluginVersion = 12.1.0 # See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html # for insight into build numbers and IntelliJ Platform versions. -pluginSinceBuild = 252 -pluginUntilBuild = 299.* +pluginSinceBuild = 262 # IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties platformType = IU -platformVersion = 2026.1 +platformVersion = 2026.2 # Java language level used to compile sources and to generate the files for -javaVersion = 21 +javaVersion = 25 # Gradle Releases -> https://github.com/gradle/gradle/releases -gradleVersion = 9.4.1 +gradleVersion = 9.6.1 # Opt-out flag for bundling Kotlin standard library. # See https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library for details. # suppress inspection "UnusedProperty" kotlin.stdlib.default.dependency = false -org.gradle.configuration-cache=true \ No newline at end of file +org.gradle.configuration-cache=true diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index d997cfc6..b1b8ef56 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index c61a118f..a9db1155 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,9 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip networkTimeout=10000 +retries=0 +retryBackOffMs=500 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 739907df..249efbb0 100755 --- a/gradlew +++ b/gradlew @@ -20,7 +20,7 @@ ############################################################################## # -# Gradle start up script for POSIX generated by Gradle. +# gradlew start up script for POSIX generated by Gradle. # # Important for running: # @@ -29,7 +29,7 @@ # bash, then to run this script, type that shell name before the whole # command line, like: # -# ksh Gradle +# ksh gradlew # # Busybox and similar reduced shells will NOT work, because this script # requires all of these POSIX shell features: @@ -57,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/2d6327017519d23b96af35865dc997fcb544fb40/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. diff --git a/gradlew.bat b/gradlew.bat index c4bdd3ab..a51ec4f5 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -19,12 +19,12 @@ @if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem -@rem Gradle startup script for Windows +@rem gradlew startup script for Windows @rem @rem ########################################################################## -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal +@rem Set local scope for the variables, and ensure extensions are enabled +setlocal EnableExtensions set DIRNAME=%~dp0 if "%DIRNAME%"=="" set DIRNAME=. @@ -51,7 +51,7 @@ echo. 1>&2 echo Please set the JAVA_HOME variable in your environment to match the 1>&2 echo location of your Java installation. 1>&2 -goto fail +"%COMSPEC%" /c exit 1 :findJavaFromJavaHome set JAVA_HOME=%JAVA_HOME:"=% @@ -65,29 +65,18 @@ echo. 1>&2 echo Please set the JAVA_HOME variable in your environment to match the 1>&2 echo location of your Java installation. 1>&2 -goto fail +"%COMSPEC%" /c exit 1 :execute @rem Setup the command line -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* +@rem Execute gradlew +@rem endlocal doesn't take effect until after the line is parsed and variables are expanded +@rem which allows us to clear the local environment before executing the java command +endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +:exitWithErrorLevel +@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts +"%COMSPEC%" /c exit %ERRORLEVEL% diff --git a/settings.gradle.kts b/settings.gradle.kts index dbf0b413..ebe4184e 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1 +1,11 @@ +pluginManagement { + plugins { + kotlin("jvm") version "2.4.10" + } +} + +plugins { + id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0" +} + rootProject.name = "PHP Annotations" diff --git a/src/test/java/de/espend/idea/php/annotation/tests/AnnotationLightCodeInsightFixtureTestCase.java b/src/test/java/de/espend/idea/php/annotation/tests/AnnotationLightCodeInsightFixtureTestCase.java index 0b2c1896..6a3136e4 100644 --- a/src/test/java/de/espend/idea/php/annotation/tests/AnnotationLightCodeInsightFixtureTestCase.java +++ b/src/test/java/de/espend/idea/php/annotation/tests/AnnotationLightCodeInsightFixtureTestCase.java @@ -50,6 +50,14 @@ */ public abstract class AnnotationLightCodeInsightFixtureTestCase extends LightJavaCodeInsightFixtureTestCase { + // These external inspections are incompatible with the legacy light-test traversal below. + private static final Set UNSUPPORTED_LIGHT_TEST_INSPECTIONS = Set.of( + "com.intellij.clouds.docker.gateway.json.inspections.DevcontainerFolderInspection", + "com.intellij.lang.javascript.inspections.JSInspection", + "org.editorconfig.language.codeinsight.inspections.EditorConfigVerifyByCoreInspection", + "org.jetbrains.qodana.staticAnalysis.inspections.sanity.QodanaSanity" + ); + @Override public void setUp() throws Exception { super.setUp(); @@ -496,6 +504,21 @@ private Pair, Integer> getLocalInspectionsAtCaret(@NotNu continue; } + Class inspectionClass = object.getClass(); + boolean unsupportedInspection = false; + while(inspectionClass != null) { + if(UNSUPPORTED_LIGHT_TEST_INSPECTIONS.contains(inspectionClass.getName())) { + unsupportedInspection = true; + break; + } + + inspectionClass = inspectionClass.getSuperclass(); + } + + if(unsupportedInspection) { + continue; + } + final PsiElementVisitor psiElementVisitor = ((LocalInspectionTool) object).buildVisitor(problemsHolder, false); psiFile.acceptChildren(new PsiRecursiveElementVisitor() { diff --git a/src/test/java/de/espend/idea/php/annotation/tests/doctrine/action/DoctrineClassOrmAnnotationGenerateActionTest.java b/src/test/java/de/espend/idea/php/annotation/tests/doctrine/action/DoctrineClassOrmAnnotationGenerateActionTest.java index 87b2d744..e3282285 100644 --- a/src/test/java/de/espend/idea/php/annotation/tests/doctrine/action/DoctrineClassOrmAnnotationGenerateActionTest.java +++ b/src/test/java/de/espend/idea/php/annotation/tests/doctrine/action/DoctrineClassOrmAnnotationGenerateActionTest.java @@ -20,6 +20,11 @@ public String getTestDataPath() { public void testThatThatEntityClassIsGeneratedForAnnotations() { myFixture.configureByText(PhpFileType.INSTANCE, "