'How to disable Kotlin compiler in IntelliJ IDEA for Maven Java projects?
I have a Java only multi module Maven project in IntelliJ IDEA and I can see IDEA calling a Kotlin compiler whenever I rebuild a module or choose to run all tests. This is shown in the background processes bar. It sometimes shows Kotlin: connecting to daemon
as well which seems to take quite some time.
Is there a way to tell IDEA to ignore Kotlin completely for a certain project? I guess the build times could speed up a little bit that way. I know I can disable the Kotlin plugin but that's not what I want as it would be disabled for all projects.
Solution 1:[1]
I tried to disable the plugin of Kotlin, and restart IDEA, and it is solved, even I continue using Gradle. Community 2019.3.
Solution 2:[2]
Intellij provides 2 different settings. Project wise setting and global settings.
You can see the project specific settings by "right click the project" and select "Open Module Settings" as Below -
This will open Project Settings
window. You can select kotlin and remove there in the below screen.
Solution 3:[3]
If you are using Maven
for build manager, you might be using Koltin
plugin to build the project.
The plugin name is org.jetbrains.kotlin:kotlin-maven-plugin
.
<build>
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
<testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<configuration>
<compilerPlugins>
<plugin>jpa</plugin>
</compilerPlugins>
<args>
<arg>-Xjsr305=strict</arg>
</args>
</configuration>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-noarg</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-allopen</artifactId>
<version>${kotlin.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
You just need to delete it!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | WesternGun |
Solution 2 | Rajkumar Natarajan |
Solution 3 | Pemassi |