Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

So, I created a new gradle project, choosing Java as "additional libraries and frameworks".

Gradle will compile to .uildclasses and maintain package structure,

but the "module compile output path" in project structure -> modules is set to .outproductionclasses.

That's really annoying and not something I want to remember having to change every time I create a new Java project.

Can I somehow change the default so it matches the gradle output path?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
230 views
Welcome To Ask or Share your Answers For Others

1 Answer

You can use the Gradle pluigin for INtelliJ

In build.gradle:

apply plugin: 'idea'

idea{
    module{
        inheritOutputDirs = false
        outputDir = compileJava.destinationDir
        testOutputDir = compileTestJava.destinationDir
    }
}

Then when you run ...

gradle idea

... it will generate complete IntelliJ project files for you.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...