我正在开发一个 Web 应用程序,使用Grails 2.2.3
with Ember.js (rc3)
。我使用IntelliJ IDEA 12.1
Utlimate 作为 IDE 和IntelliJ TeamCity
CI 服务器 - 一切都在Windows 7 Professional SP1
. 现在我想用它Gradle 1.7
来更好地组织我的构建任务(组合Grails
、、Grunt
测试等等……),我期待天堂,但我得到的只是地狱……
当我开始使用该gradle.build
文件并JetGradle
在 IntelliJ IDEA 中启动时,它开始一遍又一遍地扫描和索引文件(实际上它现在仍在运行 - 14 小时并且还在计数),IDE 被阻塞,我什么也做不了。 ..这真的令人沮丧。
如果有任何兴趣,这是我的gradle.build
:
import org.apache.tools.ant.taskdefs.condition.Os
import org.gradle.api.tasks.Exec
import org.grails.gradle.plugin.GrailsTask
buildscript {
repositories {
maven { url "http://my.company.archiva:8080/repository/internal" }
maven { url "http://repo.grails.org/grails/repo" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:2.0.0-SNAPSHOT",
"org.grails:grails-bootstrap:2.2.3"
}
}
apply plugin: "grails"
apply plugin: "base"
repositories {
maven { url "http://my.company.archiva:8080/repository/internal" }
maven { url "http://repo.grails.org/grails/repo" }
}
grails {
grailsVersion "2.2.3"
}
configurations {
all {
exclude module: "commons-logging"
exclude module: "xml-apis"
exclude module: "grails-plugin-log4j"
exclude module: "slf4j-log4j12"
}
test {
exclude module: "groovy-all"
}
compile {
exclude module: "hibernate"
}
compileOnly
}
dependencies {
compile("com.my.company:grails-custom-plugin1:0.1.7@zip")
compile("com.my.company:grails-cusotm-plugin:0.2@zip")
compile("com.my.company:backendapi:1.1")
compile("org.mozilla:rhino:1.7R4")
compile("io.netty:netty:3.3.1.Final")
compile("com.google.protobuf:protobuf-java:2.4.1")
compile("org.grails.plugins:cache:1.0.1")
compileOnly "org.grails:grails-plugin-tomcat:$grails.grailsVersion" // No tomcat-*.jar in the war
bootstrap "org.codehaus.groovy:groovy-all:2.0.5"
}
/*
GRADLE Wrapper
*/
task wrapper(type: Wrapper) {
gradleVersion = '1.7'
}
/*
GRUNT Section
*/
task npm(type: Exec) {
group = "Build"
description = "Installs all Node.js dependencies defined in package.json"
workingDir "web-app"
commandLine = ["npm.cmd", "install"]
inputs.file "package.json"
outputs.dir "node_modules"
}
task production(type: GruntTask) {
gruntArgs = "prod"
}
class GruntTask extends Exec {
private String gruntExecutable = Os.isFamily(Os.FAMILY_WINDOWS) ? "grunt.cmd" : "grunt"
private String switches = "--no-color"
private String workDir = "web-app"
String gruntArgs = ""
public GruntTask() {
super()
this.setExecutable(gruntExecutable)
this.workingDir(workDir)
}
public void setGruntArgs(String gruntArgs) {
this.args = "$switches $gruntArgs".trim().split(" ") as List
}
}
/*
WAR creation
*/
task war(type: GrailsTask) {
command "war"
env "prod"
}
有没有人可以帮助我?我在互联网上上下搜索,但似乎没有人使用 , , 的组合,或者Grails
一切都很简单,我只是愚蠢地使用这些工具......Ember.js
Gradle
IntelliJ IDEA