allprojects {
apply plugin: 'idea'
idea {
module {
outputDir file('build/classes/main')
testOutputDir file('build/classes/test')
}
}
if(project.convention.findPlugin(JavaPluginConvention)) {
// Change the output directory for the main and test source sets back to the old path
sourceSets.main.output.classesDir = new File(buildDir, "classes/main")
sourceSets.test.output.classesDir = new File(buildDir, "classes/test")
}
}
2 回答
IntelliJ IDEA不再与Gradle共享输出,请see this ticket for details .
您可以通过以下配置覆盖它:
或者将构建委托给Gradle:File |设置|构建,执行,部署|构建工具| Gradle | Runner =>委派IDE构建/运行操作以进行gradle .
档案|项目结构|项目设置|模块|路径选项卡|编译器输出
选择'Inherit project compile output path'以继续使用
/build
进行构建工件