'Intellij gradle kotlin project generate .class files in both java and kotlin directory
I have a Gradle Kotlin project setup in Intellij,
The source directory is as follows:
src
main
kotlin
resource
test
kotlin
resource
When I run from command line gradlew build
, the .class files are only generated under
./build/classes/kotlin/main/com/
But if I run build task from Intellij Gradle panel, it generated .class files under both
./build/classes/kotlin/main/com/
./build/classes/java/main/com/
It causes errors on further Gradle tasks.
Since Gradle command line gives me expected result, I am assuming this is an issue related to the Intellij setting/bug.
How can I tell Intellij only generate .class file under ./build/class/kotlin
folder?
I am using IntelliJ IDEA 2022.1 (Ultimate Edition).
Solution 1:[1]
This must because of some temp issue specific to my local project setting, as I can't reproduce this problem by recreating the project locally from the scrach, closing this issue.
Please ignore this question.
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 | Mike Zhao |