使用Gradle为Intellij 15定义测试源集

时间:2016-03-31 04:51:30

标签: gradle build.gradle intellij-15

我可以使用以下内容在Gradle中定义sourceSet

sourceSets {
    unitTest {
        java {
            srcDir 'src/unitTest/java'
        }
        resources {
            srcDir 'src/unitTest/resources'
        }
    }
}

但是,我似乎无法使用gradle定义测试源集。我可以通过UI手动指定它,但是当刷新gradle项目时,它们将再次设置为源集,而不是测试源集。

有没有办法在Gradle中定义源集,让Intellij选择它是一个测试源集?

1 个答案:

答案 0 :(得分:1)

这让很多人感到烦恼,请参阅IDEA-165647。那里提出的解决方案实际上有效,如下所示:

test.resources.srcDir

不同之处在于添加Don't know how to automatically pick scale for object of type data.frame. Defaulting to continuous. Error: Aesthetics must be either length 1 or the same as the data (65507): fill, x, y' library(reshape2) library(ggplot2) library(dplyr) ggplot_missing <- function(x){ x %>% is.na %>% melt %>% ggplot(data = ., aes(x , y )) + geom_raster(aes(fill = value)) + scale_fill_grey(name = "", labels = c("Present","Missing")) + theme_minimal() + theme(axis.text.x = element_text(angle=45, vjust=0.5)) + labs(x = "Variables in Dataset", y = "Rows / observations") } ggplot_missing(productholding)