Skip to content

Bringing Guice to live - #23

Open
Sergej Salnikov (SergejSalnikov) wants to merge 3 commits into
JetBrains:masterfrom
SergejSalnikov:master
Open

Bringing Guice to live#23
Sergej Salnikov (SergejSalnikov) wants to merge 3 commits into
JetBrains:masterfrom
SergejSalnikov:master

Conversation

@SergejSalnikov

Copy link
Copy Markdown

Complete refactoring of Guice binding and injection site analysis.
Added kotlin language support
Added many Guice features as Multibinders and etc.
Performance optimizations
Added unit tests

@SergejSalnikov

Sergej Salnikov (SergejSalnikov) commented Jun 20, 2026

Copy link
Copy Markdown
Author

If you want to test it:

gradle.properties:

org.gradle.configuration-cache=true
kotlin.stdlib.default.dependency=false

build.gradle.kts:

import org.jetbrains.intellij.platform.gradle.TestFrameworkType
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
  id("java")
  id("org.jetbrains.kotlin.jvm") version "2.3.0"
  id("org.jetbrains.intellij.platform") version "2.16.0"
}

java {
  toolchain {
    languageVersion.set(JavaLanguageVersion.of(25))
  }
}

group = "com.intellij.guice"
version = "261.0"

repositories {
  mavenCentral()
  intellijPlatform {
    defaultRepositories()
  }
}

dependencies {
  intellijPlatform {
    intellijIdea("2026.1")
    bundledPlugin("com.intellij.java")
    bundledPlugin("org.jetbrains.kotlin")
    testFramework(TestFrameworkType.Platform)
    testFramework(TestFrameworkType.Plugin.Java)
    testFramework(TestFrameworkType.JUnit5)
  }
   testImplementation("com.google.truth:truth:1.4.2")
}

java {
  sourceSets.getByName("main") {
    java {
      srcDir("gen")
      srcDir("src")
    }
    kotlin {
      srcDir("gen")
      srcDir("src")
    }
    resources {
      srcDir("resources")
    }
  }
  sourceSets.getByName("test") {
    java {
      srcDir("test")
    }
    kotlin {
      srcDir("test")
    }
  }

}

kotlin {
  jvmToolchain(25)
}

intellijPlatform {
  pluginConfiguration {
    ideaVersion {
      sinceBuild = "261"
    }

    changeNotes = ""
  }
}

tasks {
  // Set the JVM compatibility versions
  withType<JavaCompile> {
    options.release = 25
    sourceCompatibility = "25"
    targetCompatibility = "25"
  }
  withType<KotlinCompile> {
    compilerOptions {
      jvmTarget.set(JvmTarget.JVM_25)
    }
  }
}

@SergejSalnikov

Copy link
Copy Markdown
Author

Indentation seems to be off, but I don't know which code style is used at JetBrains and how to apply it to all files at once. Sorry.

@SergejSalnikov

Copy link
Copy Markdown
Author

Yann Cébron (@YannCebron), FYI

@SergejSalnikov
Sergej Salnikov (SergejSalnikov) marked this pull request as draft June 22, 2026 10:08
@SergejSalnikov
Sergej Salnikov (SergejSalnikov) marked this pull request as ready for review June 25, 2026 12:35
@SergejSalnikov

Sergej Salnikov (SergejSalnikov) commented Jun 25, 2026

Copy link
Copy Markdown
Author

Andrey Belyaev (@belyaev-andrey), do you want to take a look? :)
I'm sure there are some issues introduced in the inspections, but the model part was significantly improved in terms of supported features, performance and languages.

@alexanderbaumann-toast

Copy link
Copy Markdown

bump!

@alexanderbaumann-toast

Copy link
Copy Markdown

Is there a youtrack for this? Would love to upvote and contribute.

@SergejSalnikov

Copy link
Copy Markdown
Author

have you tried the PR? maybe it doesn't work at all :).

@SergejSalnikov

Copy link
Copy Markdown
Author

IDEA-379829

@baumannalexj

Copy link
Copy Markdown

have you tried the PR? maybe it doesn't work at all :).

Works great with Kotlin: using java 21, gradle 8, kotlin 2.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants