我正在开发 java web-app,我正在使用 GWT。但是我需要 GWT 上的 SmartGWT 包装器,并且我正在使用 gradle 依赖项管理。这是我的 build.gradle 文件:
apply plugin: 'war'
apply plugin: 'eclipse-wtp'
configurations { gwtCompile }
dependencies {
// your own dependencies
// the gwt servlet dependency for the war file
compile 'com.google.gwt:gwt-servlet:2.4.0'
compile 'org.springframework:spring-jdbc:3.1.1.RELEASE'
// dependencies for the gwt compiler
gwtCompile (
[group: 'com.google.gwt', name: 'gwt-user', version: '2.4.0'],
[group: 'com.google.gwt', name: 'gwt-dev', version: '2.4.0']
)
}
repositories {
mavenCentral()
}
gwtBuildDir = 'war'
task gwtCompile << {
created = (new File(gwtBuildDir)).mkdirs()
ant.java(classname:'com.google.gwt.dev.Compiler', failOnError: 'true', fork: 'true')
{
jvmarg(value: '-Xmx184M')
arg(line: '-war ' + gwtBuildDir)
arg(line: '-logLevel INFO')
arg(line: '-style PRETTY')
arg(value: 'com.trader.TestGWTGradle')
classpath {
pathElement(location: 'src')
pathElement(path: configurations.compile.asPath)
pathElement(path: configurations.gwtCompile.asPath)
}
}
}
war.dependsOn gwtCompile
war {
baseName = 'TestGWTGradle'
archiveName = "${baseName}.${extension}"
from gwtBuildDir
manifest {
attributes 'Implementation-Title': 'TestGWTGradle Version'
attributes 'Implementation-Version': '1.0'
attributes provider: 'gradle'
}
}
你能告诉我如何在这里进行 SmartGWT 导入吗?