Griffon 2.7教程 [英] Griffon 2.7 Tutorial
问题描述
按照griffon-framework.org/tutorials/1_getting_started.html的官方教程进行..已安装lazybones/gradle ..按照教程创建了示例应用程序.试图运行gradle build并获取
$ gradle run --info开始构建使用设置文件评估设置'C:\ cygwin64 \ home \ Rob \ sample \ settings.gradle'.项目已加载.使用构建文件进行根项目C:\ cygwin64 \ home \ Rob \ sample \ build.gradle'.包含的项目:[根项目示例"]使用构建文件评估根项目样本"C:\ cygwin64 \ home \ Rob \ sample \ build.gradle'.添加许可证扩展添加下载许可证扩展添加许可证扩展规则为sourceSet licenseMain添加许可证任务为sourceSet licenseTest添加许可证任务将许可证默认值应用于任务::licenseFormatMain将许可证默认值应用于任务::licenseFormatTest将许可证默认值应用于任务::licenseMain将许可证默认值应用于任务::licenseTest将默认值应用于下载任务::downloadLicenses为sourceSet licenseIntegrationTest添加许可证任务将许可证默认值应用于任务::licenseIntegrationTest将许可证默认值应用于任务::licenseFormatIntegrationTest失败:生成失败,发生异常.* 在哪里:脚本'C:\ cygwin64 \ home \ Rob \ sample \ gradle \ integration-test.gradle'行:20* 什么地方出了错:评估脚本时发生问题.>在配置容器上找不到属性"compileOnly".
它反对的脚本..
sourceSets {integrationTest {如果(file('src/integration-test/java').exists()){java.srcDirs文件('src/integration-test/java')}如果(file('src/integration-test/groovy').exists()){groovy.srcDirs文件('src/integration-test/groovy')}resources.srcDir文件('src/integration-test/resources')compileClasspath + = sourceSets.main.outputcompileClasspath + = configurations.compileOnly<-第20行compileClasspath + = configuration.testCompileOnlyruntimeClasspath + = compileClasspath}}
成绩信息
------------------------------------------------------------摇篮2.2.1------------------------------------------------------------建立时间:2014年11月24日UTC内部版本号:无修订:6fcb59c06f43a4e6b1bcb401f7686a8601a1fb4aGroovy:2.3.6蚂蚁:2013年12月23日编译的Apache Ant(TM)版本1.9.3JVM:1.7.0_79(Oracle Corporation 24.79-b02)操作系统:Windows 8.1 6.3 amd64
有人指出我正确的方向吗?我是Gradle和Griffon 2.7的新手..谢谢..
我相信Gradle 2.12中引入了 compileOnly
(来自 Griffon文档指出第2级是受支持的最低版本"可能已经过时了.Following the official tutorial on griffon-framework.org/tutorials/1_getting_started.html .. Installed lazybones / gradle .. Created the sample application as per tutorial .. Tried to run gradle build and get
$ 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.
The script it's objecting to ..
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 info
------------------------------------------------------------
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
Anyone point me in the right direction ? I'm new to both Gradle and Griffon 2.7 .. Thanks ..
I believe that compileOnly
was introduced in Gradle 2.12 (from this blog post).
I realize the Griffon doc states "Gradle 2 is the minimum supported version" but that may be obsolete.
这篇关于Griffon 2.7教程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!