Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
with:
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: 21
- name: Setup Gradle (with caching)
uses: gradle/actions/setup-gradle@v4
uses: gradle/actions/setup-gradle@v5
with:
# Avoid writing to cache from PRs from forks; still fine for same-repo PRs
cache-read-only: ${{ github.event_name == 'pull_request' }}
Expand All @@ -40,7 +40,7 @@ jobs:
GRADLE_OPTS: -Dfile.encoding=UTF-8
run: ./gradlew --stacktrace --info --warning-mode all :spring-bootstrap:test
- name: Publish Test Report
uses: mikepenz/action-junit-report@v5
uses: mikepenz/action-junit-report@v6
if: success() || failure() # always run even if the previous step fails
with:
verbose_summary: true
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v5
- run: echo "ESCAPED_BRANCH_NAME=$(echo "$GITHUB_REF_NAME" | sed -e 's|release/||g' | sed -e 's|/|_|g' )" >> $GITHUB_ENV
- name: Sign Plugin
env:
Expand All @@ -27,15 +27,15 @@ jobs:
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
run: ./gradlew --info :spring-bootstrap:buildPlugin :spring-bootstrap:signPlugin :spring-bootstrap:publishPlugin -PsnapshotVersion=$GITHUB_RUN_NUMBER -PdistFilePostfix=$ESCAPED_BRANCH_NAME-b$GITHUB_RUN_NUMBER -PsetUntilVersion | tee build.log
- name: Archive production artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: dist-without-markdown
compression-level: 0
retention-days: 5
path: |
modules/spring-bootstrap/build/distributions/*.zip
- name: Build log
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: build-log
compression-level: 0
Expand Down
12 changes: 11 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ subprojects {
apply(plugin = "java")
apply(plugin = "org.jetbrains.intellij.platform")

val junitBomVersion: String by rootProject

dependencies {
add("testImplementation", platform("org.junit:junit-bom:$junitBomVersion"))
}

// This syntax is used to avoid duplicated in compileKotlin and compileTestKotlin settings
//noinspection GroovyAssignabilityCheck

Expand All @@ -38,7 +44,11 @@ subprojects {
tasks.withType<KotlinJvmCompile>().configureEach {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_21)
freeCompilerArgs.addAll("-Xjvm-default=all-compatibility", "-Xjsr305=strict")
freeCompilerArgs.addAll(listOf(
"-Xjvm-default=all-compatibility",
"-Xjsr305=strict",
"-opt-in=org.jetbrains.kotlin.K1Deprecation"
))
}
}

Expand Down
8 changes: 5 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ org.gradle.parallel=true
# Let Gradle choose optimal workers; override with ORG_GRADLE_PROJECT_org_gradle_workers_max if needed
# org.gradle.workers.max=0
kotlin.stdlib.default.dependency=false
kotlinVersion=2.2.0
gradleIntellijPluginVersion=2.10.4
kotlinVersion=2.3.20
# Keep JUnit Platform artifacts aligned with the IntelliJ Platform test framework
junitBomVersion=5.13.4
gradleIntellijPluginVersion=2.13.1
#defaultIdeaVersion=2025.2
defaultIdeaVersion=253.28294.334
defaultIdeaVersion=261-EAP-SNAPSHOT
defaultIdeaType=IC
org.jetbrains.intellij.platform.selfUpdateCheck=false
org.jetbrains.intellij.platform.downloadSources=true
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
9 changes: 4 additions & 5 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion modules/jpa/jpa.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ dependencies {
}
testImplementation(project(":test-framework"))
testImplementation("junit:junit:4.13.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.10.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine")
}

kotlin {
Expand Down
2 changes: 1 addition & 1 deletion modules/quarkus-core/quarkus-core.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ dependencies {
}
testImplementation(project(":test-framework"))
testImplementation("junit:junit:4.13.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.10.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine")
}

kotlin {
Expand Down
2 changes: 1 addition & 1 deletion modules/spring-ai/spring-ai.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ dependencies {
}
testImplementation(project(":test-framework"))
testImplementation("junit:junit:4.13.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.10.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine")
}

kotlin {
Expand Down
2 changes: 1 addition & 1 deletion modules/spring-aop/spring-aop.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ dependencies {
}
testImplementation(project(":test-framework"))
testImplementation("junit:junit:4.13.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.10.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine")

}

Expand Down
2 changes: 1 addition & 1 deletion modules/spring-bootstrap/spring-bootstrap.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ dependencies {
}
testImplementation(testFramework)
testImplementation("junit:junit:4.13.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.10.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine")

@Suppress("UNCHECKED_CAST")
intellijPlatform {
Expand Down
2 changes: 1 addition & 1 deletion modules/spring-core/spring-core.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ dependencies {
}
testImplementation(project(":test-framework"))
testImplementation("junit:junit:4.13.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.10.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine")
}

kotlin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import com.explyt.spring.core.service.SpringSearchService
import com.explyt.spring.core.service.SpringSearchServiceFacade
import com.explyt.spring.test.ExplytJavaLightTestCase
import com.explyt.spring.test.TestLibrary
import com.intellij.openapi.module.ModuleUtilCore
import com.intellij.openapi.util.registry.Registry
import com.intellij.psi.PsiMethod
import junit.framework.TestCase
import org.jetbrains.kotlin.idea.util.projectStructure.getModule

class SpringSearchServiceTest : ExplytJavaLightTestCase() {
override val libraries: Array<TestLibrary> = arrayOf(TestLibrary.springBootAutoConfigure_3_1_1)
Expand All @@ -41,7 +41,7 @@ class SpringSearchServiceTest : ExplytJavaLightTestCase() {

fun testImportComponent() {
val virtualFile = myFixture.copyDirectoryToProject("service/importComponent", "")
val module = virtualFile.getModule(project)
val module = ModuleUtilCore.findModuleForFile(virtualFile, project)
TestCase.assertNotNull(module)
val beans = SpringSearchService.getInstance(project).getBeanPsiClassesAnnotatedByComponent(module!!)
val beanNames = beans.mapNotNullTo(mutableSetOf()) { it.psiClass.qualifiedName }
Expand All @@ -51,7 +51,7 @@ class SpringSearchServiceTest : ExplytJavaLightTestCase() {

fun testImportWithBean() {
val virtualFile = myFixture.copyDirectoryToProject("service/importComponentWithBean", "")
val module = virtualFile.getModule(project)
val module = ModuleUtilCore.findModuleForFile(virtualFile, project)
TestCase.assertNotNull(module)
val beans = SpringSearchServiceFacade.getInstance(project).getAllActiveBeans(module!!)
val beanNames = beans.filter { it.psiClass.qualifiedName?.startsWith("com.") == true }
Expand All @@ -63,7 +63,7 @@ class SpringSearchServiceTest : ExplytJavaLightTestCase() {

fun testImportComplexWithComponentScan() {
val virtualFile = myFixture.copyDirectoryToProject("service/importComplexWithComponentScan", "")
val module = virtualFile.getModule(project)
val module = ModuleUtilCore.findModuleForFile(virtualFile, project)
TestCase.assertNotNull(module)
val beans = SpringSearchServiceFacade.getInstance(project).getAllActiveBeans(module!!)
val beanNames = beans.filter { it.psiClass.qualifiedName?.startsWith("com.") == true }
Expand All @@ -79,7 +79,7 @@ class SpringSearchServiceTest : ExplytJavaLightTestCase() {

fun testComponentMissingBeanSearch() {
val virtualFile = myFixture.copyDirectoryToProject("service/conditionalOnMissingBean", "")
val module = virtualFile.getModule(project)
val module = ModuleUtilCore.findModuleForFile(virtualFile, project)
assertNotNull(module)
val beans = SpringSearchServiceFacade.getInstance(project).getAllActiveBeans(module!!)
val beanTestClass = beans.filter { it.name == "testClass" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import com.explyt.spring.core.service.SpringSearchService
import com.explyt.spring.core.service.SpringSearchServiceFacade
import com.explyt.spring.test.ExplytKotlinLightTestCase
import com.explyt.spring.test.TestLibrary
import com.intellij.openapi.module.ModuleUtilCore
import com.intellij.openapi.util.registry.Registry
import com.intellij.psi.PsiMethod
import junit.framework.TestCase
import org.jetbrains.kotlin.idea.util.projectStructure.getModule

class SpringSearchServiceTest : ExplytKotlinLightTestCase() {
override val libraries: Array<TestLibrary> = arrayOf(TestLibrary.springBootAutoConfigure_3_1_1)
Expand All @@ -41,7 +41,7 @@ class SpringSearchServiceTest : ExplytKotlinLightTestCase() {

fun testImportComponent() {
val virtualFile = myFixture.copyDirectoryToProject("service/importComponent", "")
val module = virtualFile.getModule(project)
val module = ModuleUtilCore.findModuleForFile(virtualFile, project)
TestCase.assertNotNull(module)
val beans = SpringSearchService.getInstance(project).getBeanPsiClassesAnnotatedByComponent(module!!)
val beanNames = beans.filter { it.psiClass.qualifiedName?.startsWith("com.") == true }
Expand All @@ -52,7 +52,7 @@ class SpringSearchServiceTest : ExplytKotlinLightTestCase() {

fun testImportWithBean() {
val virtualFile = myFixture.copyDirectoryToProject("service/importComponentWithBean", "")
val module = virtualFile.getModule(project)
val module = ModuleUtilCore.findModuleForFile(virtualFile, project)
TestCase.assertNotNull(module)
val beans = SpringSearchServiceFacade.getInstance(project).getAllActiveBeans(module!!)
val beanNames = beans.filter { it.psiClass.qualifiedName?.startsWith("com.") == true }
Expand All @@ -64,7 +64,7 @@ class SpringSearchServiceTest : ExplytKotlinLightTestCase() {

fun testImportComplexWithComponentScan() {
val virtualFile = myFixture.copyDirectoryToProject("service/importComplexWithComponentScan", "")
val module = virtualFile.getModule(project)
val module = ModuleUtilCore.findModuleForFile(virtualFile, project)
TestCase.assertNotNull(module)
val beans = SpringSearchServiceFacade.getInstance(project).getAllActiveBeans(module!!)
val beanNames = beans.filter { it.psiClass.qualifiedName?.startsWith("com.") == true }
Expand All @@ -80,7 +80,7 @@ class SpringSearchServiceTest : ExplytKotlinLightTestCase() {

fun testComponentMissingBeanSearch() {
val virtualFile = myFixture.copyDirectoryToProject("service/conditionalOnMissingBean", "")
val module = virtualFile.getModule(project)
val module = ModuleUtilCore.findModuleForFile(virtualFile, project)
assertNotNull(module)
val beans = SpringSearchServiceFacade.getInstance(project).getAllActiveBeans(module!!)
val beanTestClass = beans.filter { it.name == "testClass" }
Expand Down
2 changes: 1 addition & 1 deletion modules/spring-data/spring-data.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ dependencies {
}
testImplementation(project(":test-framework"))
testImplementation("junit:junit:4.13.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.10.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine")
}

kotlin {
Expand Down
2 changes: 1 addition & 1 deletion modules/spring-gradle/spring-gradle.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ dependencies {
}
testImplementation(project(":test-framework"))
testImplementation("junit:junit:4.13.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.10.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine")
}

kotlin {
Expand Down
2 changes: 1 addition & 1 deletion modules/spring-security/spring-security.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ dependencies {
}
testImplementation(project(":test-framework"))
testImplementation("junit:junit:4.13.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.10.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine")
}

kotlin {
Expand Down
2 changes: 1 addition & 1 deletion modules/spring-web/spring-web.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ dependencies {
}
testImplementation(project(":test-framework"))
testImplementation("junit:junit:4.13.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.10.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine")
}

kotlin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ import com.intellij.openapi.project.Project
import com.intellij.openapi.ui.Messages
import com.intellij.psi.PsiDocumentManager
import com.intellij.psi.PsiFile
import org.jetbrains.kotlin.idea.refactoring.isInterfaceClass
import org.jetbrains.kotlin.psi.KtFile
import org.jetbrains.uast.UClass
import org.jetbrains.uast.toUElement

class SpringWebKotlinMethodGenerateAction : BaseGenerateAction(KotlinWebMethodHandler()) {
init {
Expand Down Expand Up @@ -77,7 +78,7 @@ private class KotlinWebMethodHandler : CodeInsightActionHandler {
PsiDocumentManager.getInstance(file.project).commitDocument(document)

val offsetToInsert = KotlinMethodGenerateUtils.findOffsetToInsertMethod(editor, file, targetClass)
val isInterface = targetClass?.isInterfaceClass() == true
val isInterface = (targetClass.toUElement() as? UClass)?.isInterface == true
val template = getTemplate(file.project, httpMethod, isInterface) ?: return@runWriteAction

editor.caretModel.moveToOffset(offsetToInsert)
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pluginManagement {

plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0"
id("org.jetbrains.intellij.platform.settings") version "2.10.4"
id("org.jetbrains.intellij.platform.settings") version "2.13.1"
}

@Suppress("UnstableApiUsage")
Expand Down
Loading