diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 7b4342e..0172910 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -8,8 +8,25 @@ concurrency: cancel-in-progress: true jobs: + + codeChecks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + cache: gradle + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + - name: Check Spotless + run: ./gradlew spotlessCheck + buildPlugin: runs-on: ubuntu-latest + needs: codeChecks steps: - uses: actions/checkout@v4 - name: Set up JDK 21 @@ -36,6 +53,7 @@ jobs: runPluginVerifier: runs-on: ubuntu-latest + needs: codeChecks steps: - uses: actions/checkout@v4 - name: Set up JDK 21 diff --git a/src/main/kotlin/com/vaadin/plugin/VaadinProjectDetector.kt b/src/main/kotlin/com/vaadin/plugin/VaadinProjectDetector.kt index 3ccef8a..ce8ec03 100644 --- a/src/main/kotlin/com/vaadin/plugin/VaadinProjectDetector.kt +++ b/src/main/kotlin/com/vaadin/plugin/VaadinProjectDetector.kt @@ -13,7 +13,7 @@ class VaadinProjectDetector : ModuleRootListener, ProjectActivity { private val LOG: Logger = Logger.getInstance(VaadinProjectDetector::class.java) override fun rootsChanged(event: ModuleRootEvent) { - if (isVaadinProject(event.project)) { + if (event.project.isOpen && isVaadinProject(event.project)) { doNotifyAboutVaadinProject(event.project) LOG.info("Vaadin detected in dependencies of " + event.project.name) } diff --git a/src/main/kotlin/com/vaadin/plugin/hotswapagent/JdkUtil.kt b/src/main/kotlin/com/vaadin/plugin/hotswapagent/JdkUtil.kt index 58c8a74..21e7f3c 100644 --- a/src/main/kotlin/com/vaadin/plugin/hotswapagent/JdkUtil.kt +++ b/src/main/kotlin/com/vaadin/plugin/hotswapagent/JdkUtil.kt @@ -18,7 +18,7 @@ class JdkUtil { fun isJetbrainsRuntime(jdk: Sdk?): Boolean { val homePath = jdk?.homePath ?: throw IllegalStateException("JDK has no home path: $jdk") val jdkInfo = JdkVersionDetector.getInstance().detectJdkVersionInfo(homePath) - return "JBR" == jdkInfo?.variant?.prefix + return "jbr" == jdkInfo?.variant?.prefix?.lowercase() } fun getBundledJetbrainsJdk(): Sdk {