GRADLE - 您必须为平面目录存储库指定至少一个目录

时间:2016-07-06 13:33:26

标签: intellij-idea gradle

我正在尝试在var canvas = document.getElementById('canvas'); var ctx = canvas.getContext('2d'); ctx.fillRect(0, 0, 100, 100); ctx.canvas.addEventListener('mousedown', function(evt) { document.getElementById('canvas').remove(); }, false); 中构建一个gradle 2.11项目,并且我一直将此错误反馈给我。我在build.gradle文件中设置了Intellij但是当我运行flatDir时,这个错误仍然存​​在。

gradle idea

错误

buildscript {
  repositories {
    flatDir {
      dirs "$rootProject.rootDir/lib/gradle-plugins"
    }
  }
  dependencies {
    classpath "gradle.plugins:prompt-version-plugin:1.0.0"
    classpath "gradle.plugins:properties-plugin:1.0.0"
  }
}
idea {
    module {
        /*
         * If you omit [ ] around, it fails with: Cannot change configuration ':provided' after it has been resolved
         * This is due Gradle 2.x using Groovy 2.3 that does not allow += for single elements addition.
         * More: https://discuss.gradle.org/t/custom-provided-configuration-not-working-with-gradle-2-0-rc2-in-multi-project-mode/2459
         */
        scopes.PROVIDED.plus += [configurations.provided]
        downloadJavadoc = true
        downloadSources = true
    }
}

0 个答案:

没有答案