Mercurial > public > ssdtforms
view build.gradle @ 4:5fb47fac1404 tip
fix span for jira issue
author | smith@nwoca.org |
---|---|
date | Tue, 01 Nov 2016 14:38:33 -0400 |
parents | 91703efb1d29 |
children |
line wrap: on
line source
import java.time.Instant import com.bmuschko.gradle.docker.tasks.image.DockerBuildImage import com.bmuschko.gradle.docker.tasks.image.Dockerfile apply from: "${gradle.ext.has('ssdtDevelkitLocation') ? gradle.ssdtDevelkitLocation : 'http://hg.ssdt-ohio.org/browse/public/develkit'}/init20.gradle" buildscript { repositories { maven { url 'http://repos.ssdt.nwoca.org/artifactory/gradle-plugins' } maven { url 'http://repos.ssdt.nwoca.org/artifactory/repo' } } dependencies { classpath 'com.bmuschko:gradle-docker-plugin:2.6.5' } } description = "ssdt.forms application" apply plugin: "war" apply plugin: "java" apply plugin: "groovy" apply plugin: "jetty" apply plugin: "idea" apply plugin: 'com.bmuschko.docker-remote-api' sourceCompatibility = "1.5" targetCompatibility = "1.5" group = "org.ssdt_ohio" version = "1.0-SNAPSHOT" configurations { provided } sourceSets { main { compileClasspath += configurations.provided } test { compileClasspath += configurations.provided runtimeClasspath += configurations.provided } } dependencies { compile 'org.codehaus.groovy:groovy-all:2.4.5' compile "org.apache.tapestry:tapestry-core:5.3.8" compile(group: 'me.davesmith', name: 'tapestry-bootstrap', version: '2.1-SNAPSHOT') compile group: 'org.got5', name: 'tapestry5-jquery', version: '3.3.6' compile "org.apache.tapestry:tapestry-yuicompressor:5.3.6" // Uncomment this to add support for file uploads: // compile "org.apache.tapestry:tapestry-upload:5.3.6" provided "javax.servlet:servlet-api:2.5" } test { useTestNG() options.suites("src/test/conf/testng.xml") systemProperties["tapestry.service-reloading-enabled"] = "false" systemProperties["tapestry.execution-mode"] = "development" maxHeapSize = "600M" jvmArgs("-XX:MaxPermSize=256M") enableAssertions = true } jettyRun { webAppSourceDirectory = file("src/main/webapp") httpPort = 8086 } docker { if (System.env.DOCKER_HOST) { url = "https:${System.env.DOCKER_HOST?.minus('tcp:')}" } if (System.env.DOCKER_CERT_PATH) { certPath = new File("$System.env.DOCKER_CERT_PATH") } } war { archiveName 'ssdtforms.war' } task createDockerfile(type: Dockerfile) { group = "Docker" destFile = project.file('build/docker/Dockerfile') from 'docker.ssdt.io/ssdt-tomcat:3' maintainer 'Dave Smith <smith@nwoca.org>' label { [ 'io.ssdt.version' : version, 'io.ssdt.id' : "${project.name}", 'io.ssdt.type' : "webapp", 'io.ssdt.app' : "ssdtforms", 'io.ssdt.build.date' : Instant.now().toString(), ] } copyFile("ssdtforms.war", '/usr/local/tomcat/webapps/ROOT.war') } task prepareDockerImage(type: Copy) { group = "Docker" dependsOn war dependsOn createDockerfile from war.getArchivePath() into project.file('build/docker') } task buildDockerImage(type: DockerBuildImage) { group = "Docker" dependsOn prepareDockerImage inputDir = createDockerfile.destFile.parentFile tag = "ssdtforms:latest" }