本地時間好,
我正在為一個大型的多模塊專案更新舊版 (4.8.1) Gradle 構建檔案。我們使用了一個 intellij.gradle 檔案,該檔案具有以下行(由注釋標記):
idea {
module {
inheritOutputDirs = true // <-- HOW DO I DO THIS
downloadJavadoc = true
downloadSources = true
}
workspace.iws.withXml { provider ->
def node = provider.asNode()
def dynamicClasspath = node.component.find { it."@name" == "dynamic.classpath" }
if (dynamicClasspath != null) {
dynamicClasspath."@value" = "true"
}
}
來自 4.8.1 DSL 檔案:
如果為 true,則此模塊的輸出目錄將位于專案的輸出目錄下方;否則,它們將被設定為 IdeaModule.getOutputDir() 和 IdeaModule.getTestOutputDir() 指定的目錄。
關于 Eclipse DSL 等效于 inheritOutputDirs 的任何想法?是否應該使用 eclipseClasspath API 來處理?現在一切都很好,但是 Eclipse Java 構建器正在標記一些東西。
參考:
注意:這是未經測驗的,因為我沒有可以使用的示例專案。
這里有更多討論:如何將 gradle 生成的源檔案夾添加到 Eclipse 專案?
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/444807.html上一篇:無法在Eclipse中插入反引號
