Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- plugins {
- id "java"
- id "eclipse"
- id "groovy"
- id "idea"
- id "war"
- id "org.springframework.boot" version "1.5.9.RELEASE"
- id "com.github.ben-manes.versions" version "0.17.0"
- id "net.ltgt.apt" version "0.13"
- }
- sourceSets {
- main.java.srcDir "src/main/java"
- main.resources.srcDir "src/main/resources"
- test.java.srcDir "src/test/java"
- test.resources.srcDir "src/test/resources"
- }
- dependencies {
- // guava-gwt
- compileOnly("com.google.guava:guava-gwt:$guavaVersion")
- compileOnly("com.google.gwt.inject:gin:$ginVersion")
- compileOnly("com.gwtplatform:gwtp-mvp-client:$gwtpVersion")
- compileOnly("org.fusesource.restygwt:restygwt:$restyGwtVersion")
- compileOnly("org.apache.httpcomponents:httpclient:$httpclientVersion")
- compileOnly("org.apache.httpcomponents:httpmime:$httpmimeVersion")
- compileOnly("org.apache.httpcomponents:httpcore:$httpcoreVersion")
- // gwt-material
- compileOnly("com.github.gwtmaterialdesign:gwt-material:$gwtMaterialVersion")
- compileOnly("com.github.gwtmaterialdesign:gwt-material-addins:$gwtMaterialAddinsVersion")
- compileOnly("com.github.gwtmaterialdesign:gwt-material-themes:$gwtMaterialThemesVersion")
- compileOnly("com.github.gwtmaterialdesign:gwt-material-table:$gwtMaterialTableVersion")
- compileOnly("com.googlecode.gwt-charts:gwt-charts:$gwtChartsVersion")
- compileOnly("de.knightsoft-net:gwt-commons-lang3:$gwtCommonsLang3Version")
- // GWT framework
- // compileOnly("com.google.gwt:gwt-user:$gwtVersion")
- // compileOnly("com.google.gwt:gwt-dev:$gwtVersion")
- providedCompile("com.google.gwt:gwt-user:$gwtVersion")
- providedCompile("com.google.gwt:gwt-dev:$gwtVersion")
- compileOnly("org.realityforge.gwt.websockets:gwt-websockets:$gwtWebsocketsVersion")
- compileOnly("org.springframework.boot:spring-boot-configuration-processor")
- compile("org.springframework.boot:spring-boot-starter-jetty")
- compile("org.springframework.boot:spring-boot-starter-web") {
- exclude module: "spring-boot-starter-tomcat"
- }
- compile("javax.ws.rs:javax.ws.rs-api:$wsrsapiVersion")
- compile("org.projectlombok:lombok:$lombokVersion")
- apt("org.projectlombok:lombok:$lombokVersion")
- testCompile("org.springframework.boot:spring-boot-starter-test")
- }
- // copy war file to $rootDir/install folder
- def installDir = "$rootDir" + "/install/"
- task installWar(type: Copy) {
- delete installDir
- def sourceFolder = "$buildDir" + "/libs"
- from sourceFolder
- into installDir
- }
- clean.doFirst {
- delete "${projectDir}/build"
- delete "${projectDir}/out"
- delete "${projectDir}/war"
- }
- task wrapper(type: Wrapper) {
- gradleVersion = "4.5"
- }
- task compileGwt(dependsOn: classes, type: JavaExec) {
- ext.buildDir = "${project.buildDir}/gwt"
- ext.extraDir = "${project.buildDir}/extra"
- inputs.file sourceSets.main.java.srcDirs
- inputs.dir sourceSets.main.output.resourcesDir
- outputs.dir buildDir
- doFirst {
- file(buildDir).mkdirs()
- }
- main = "com.google.gwt.dev.Compiler"
- classpath {
- [
- sourceSets.main.java.srcDirs, // Java source
- sourceSets.main.output.resourcesDir, // Generated resources
- sourceSets.main.output.classesDir, // Generated classes
- sourceSets.main.compileClasspath, // Deps
- ]
- }
- args = [
- "com.test.DeviceManager",
- "-war", buildDir,
- "-logLevel", "INFO",
- "-localWorkers", "4",
- "-compileReport",
- "-extra", extraDir,
- "-style", "OBF",
- "-optimize", "7" // 0=none, 9=max
- ]
- maxHeapSize = "4G"
- }
- war.dependsOn compileGwt
- war {
- from compileGwt.buildDir
- }
- compileJava.dependsOn(processResources)
- jar.dependsOn compileGwt
- jar {
- baseName = "gwt-material"
- version = "2.0"
- into("../webapp") {
- from compileGwt.buildDir
- }
- }
- eclipse {
- classpath {
- containers.remove("org.eclipse.jdt.launching.JRE_CONTAINER")
- containers "org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement