I'm build a kotlin library and when I run build with
./gradlew build
, it creates the jar file, but not when I use
Build Project
or
Build Module
in Intellij. How do I get those commands to have the same output?
v
Vladyslav Sitalo
10/28/2018, 3:39 PM
you can approach this from multiple directions. some options would be :
• run the gradle build/jar task via intellij instead of doing
Build Project
• configure the
Build project
target to have the jar output artifacts (see intellij build/run settings)
• delegate building of the project from intellij to gradle, and make the default target build jar
• or if you don’t care about jar and only care about sameness - you can change your build.gradle to not produce jar by default
j
Joe
10/28/2018, 3:42 PM
Option three is the one I think I want, but how do I do that? I've checked that box in Settings | Build... | Build tools | Gradle | Runner, but unfortunately that doesn't seem to have done the job. 😞
Joe
10/28/2018, 3:43 PM
Oh wait, maybe it's the "make the default target build jar" that I'm missing. Where do I set that?
g
gildor
10/29/2018, 1:57 AM
Did you enable “Delegate IDE build/run actions to Gradle”?