Griffon 2.7 教程

Griffon 2.7 Tutorial

按照 griffon-framework 的官方教程进行操作。org/tutorials/1_getting_started.html .. 安装了 lazybones / gradle .. 按照教程创建示例应用程序。尝试 运行 gradle 构建并获得

$ gradle run --info
Starting Build
Settings evaluated using settings file 
'C:\cygwin64\home\Rob\sample\settings.gradle'.
Projects loaded. Root project using build file 
C:\cygwin64\home\Rob\sample\build.gradle'.
Included projects: [root project 'sample']
Evaluating root project 'sample' using build file
C:\cygwin64\home\Rob\sample\build.gradle'.
Adding license extension
Adding download licenses extension
Adding license extension rule
Adding license tasks for sourceSet licenseMain
Adding license tasks for sourceSet licenseTest
Applying license defaults to task: :licenseFormatMain
Applying license defaults to task: :licenseFormatTest
Applying license defaults to task: :licenseMain
Applying license defaults to task: :licenseTest
Applying defaults to download task: :downloadLicenses
Adding license tasks for sourceSet licenseIntegrationTest
Applying license defaults to task: :licenseIntegrationTest 
Applying license defaults to task: :licenseFormatIntegrationTest

FAILURE: Build failed with an exception.

* Where:
Script 'C:\cygwin64\home\Rob\sample\gradle\integration-test.gradle' line: 20

* What went wrong:
A problem occurred evaluating script.
> Could not find property 'compileOnly' on configuration container.

它反对的脚本..

sourceSets {
    integrationTest {
        if (file('src/integration-test/java').exists()) {
            java.srcDirs file('src/integration-test/java')
        }
        if (file('src/integration-test/groovy').exists()) {
            groovy.srcDirs file('src/integration-test/groovy')
        }
        resources.srcDir file('src/integration-test/resources')
        compileClasspath += sourceSets.main.output
        compileClasspath += configurations.compileOnly      <-- line 20 
        compileClasspath += configurations.testCompileOnly
        runtimeClasspath += compileClasspath
    }
}

Gradle 信息

------------------------------------------------------------
Gradle 2.2.1
------------------------------------------------------------

Build time:   2014-11-24 09:45:35 UTC
Build number: none
Revision:     6fcb59c06f43a4e6b1bcb401f7686a8601a1fb4a

Groovy:       2.3.6
Ant:          Apache Ant(TM) version 1.9.3 compiled on December 23 2013
JVM:          1.7.0_79 (Oracle Corporation 24.79-b02)
OS:           Windows 8.1 6.3 amd64

有人指出我正确的方向吗?我是 Gradle 和 Griffon 2.7 的新手 .. 谢谢 ..

我相信 compileOnly 是在 Gradle 2.12 中引入的(来自 this blog post)。

我知道 Griffon doc 状态 "Gradle 2 is the minimum supported version" 但这可能已过时。