Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
102 lines (82 sloc) 2.53 KB
defaultTasks "clean", "htmlProps", "build", "serverInstructions", "jettyRunWar"
buildscript {
/*
* Change this location to point to your GWT plugin build libs directory
*/
repositories { flatDir(dirs: "../gwt-gradle-plugin/build/libs/") }
dependencies { classpath 'com.markuskobler.gradle:gwt-gradle-plugin:0.1-SNAPSHOT' }
}
buildscript {
/*
* This pulls in the Spiffy UI build tasks which are used only for compilation
*/
repositories {
mavenCentral()
}
dependencies {
classpath group: 'org.spiffyui', name: 'spiffyuitasks', version: '0.7.9'
}
}
import org.spiffyui.build.HTMLPropertiesUtil
apply plugin: 'war'
apply plugin: 'jetty'
apply plugin: com.markuskobler.gradle.plugin.gwt.Gwt2Plugin
/*
* Now we define our application
*/
group = 'HelloSpiffyGradle'
version = '0.1-SNAPSHOT'
repositories {
mavenCentral()
}
/*
* We specify our dependencies
*/
dependencies {
providedCompile 'javax.servlet:servlet-api:2.5'
compile group: 'javax.validation', name: 'validation-api', version: '1.0.0.GA'
compile group: 'javax.validation', name: 'validation-api', version: '1.0.0.GA', classifier: 'sources'
compile 'org.spiffyui:spiffyui:0.7.9'
compile files('build/gen');
}
/*
* We define our GWT module
*/
gwtVersion = '2.4.0'
gwtModule = 'org.spiffyui.hellospiffygradle.index'
gwtStartupUrl = 'index.html'
jettyRunWar.contextPath = '/'
/*
* We generate the Message class from our HTML files
*/
task htmlProps << {
FileTree tree = fileTree(dir: 'src/main/html')
tree.include '**/*.html'
List<File> files = new ArrayList<File>();
tree.each {File file ->
files.add(file)
}
File gen = new File('build/gen/org/spiffyui/hellospiffygradle/client')
gen.mkdirs();
String pkg = 'org.spiffyui.hellospiffygradle.client'
HTMLPropertiesUtil.generatePropertiesFiles(files, new File(gen, 'SpiffyUiHtml.properties'), pkg);
}
/*
* We add our JavaScript files to the root of our WAR so we can find them
* for localization support.
*/
war {
from 'build/gwt/out/org.spiffyui.hellospiffygradle.index/js/'
}
/*
* We print out some server instructions
*/
task serverInstructions << {
println '''
========================================================================
Running the Spiffy UI application with an embedded
Jetty server. Press Ctrl+C to stop the server.
Access Hello Spiffy Gradle at: http://localhost:8080
========================================================================
'''
}
Something went wrong with that request. Please try again.