Created
December 15, 2016 18:28
-
-
Save pioh/f51d90a6b9c7c0a74c943e98d452aabc to your computer and use it in GitHub Desktop.
9r-web
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.3.5.RELEASE") | |
classpath('com.bmuschko:gradle-cargo-plugin:2.0.3') | |
classpath('org.flywaydb:flyway-core:4.0') | |
} | |
} | |
plugins { | |
id 'org.flywaydb.flyway' version '4.0' | |
id 'com.moowork.node' version '1.0.1' | |
} | |
apply plugin: 'war' | |
apply plugin: 'idea' | |
apply plugin: 'spring-boot' | |
apply plugin: 'com.bmuschko.cargo' | |
apply plugin: 'java' | |
war { | |
baseName = '9r-web' | |
version = '0.0.1' | |
} | |
repositories { | |
maven { | |
url 'http://test.srg-it.ru:8081/artifactory/remote-repos' | |
} | |
} | |
idea { | |
module { | |
generatedSourceDirs += file('generated/') | |
} | |
} | |
sourceCompatibility = 1.8 | |
targetCompatibility = 1.8 | |
compileJava.options.encoding = 'UTF-8' | |
dependencies { | |
compile("org.springframework.boot:spring-boot-starter-cache", | |
"org.springframework.boot:spring-boot-starter-data-jpa", | |
"org.springframework.boot:spring-boot-starter-data-rest", | |
"org.springframework.boot:spring-boot-starter-mail", | |
"org.springframework.boot:spring-boot-starter-security", | |
"org.springframework.boot:spring-boot-starter-validation", | |
"org.springframework.boot:spring-boot-starter-web", | |
"org.springframework.session:spring-session", | |
"org.springframework.boot:spring-boot-devtools", | |
"org.springframework.boot:spring-boot-starter-thymeleaf", | |
"org.springframework.data:spring-data-rest-hal-browser", | |
"org.springframework.ws:spring-ws-core:", | |
"com.fasterxml.jackson.core:jackson-databind:2.7.5", | |
"com.fasterxml.jackson.core:jackson-annotations:2.7.5", | |
"com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.7.5", | |
"org.springframework:spring-test", | |
"com.google.guava:guava:18.0", | |
"org.projectlombok:lombok:1.16.6", | |
"com.github.rholder:snowball-stemmer:1.3.0.581.1", | |
'org.webjars:requirejs:2.1.22', | |
'org.webjars:require-css:0.1.8-1', | |
'org.webjars:webjars-locator:0.32', | |
'org.webjars:typeaheadjs:0.11.1.patched', | |
'org.webjars:bootstrap:3.3.6', | |
'org.webjars:font-awesome:4.6.3', | |
'org.webjars:datatables:1.10.9', | |
'org.webjars:Eonasdan-bootstrap-datetimepicker:4.17.37-1', | |
'org.webjars:bootstrap-datepicker:1.5.0-1', | |
'org.webjars:knockout:3.4.0', | |
'org.webjars.bower:jquery-mask-plugin:1.13.4', | |
'org.webjars.bower:knockout-validation:2.0.3', | |
'org.webjars.bower:chosen:1.4.1', | |
'org.webjars:requirejs-domready:2.0.1-2', | |
'org.webjars:bootbox:4.4.0', | |
'org.webjars.npm:fine-uploader:5.9.0', | |
'org.webjars:jquery-ui:1.12.0', | |
'org.webjars:clipboard.js:1.5.5', | |
'org.webjars.bower:blueimp-gallery:2.21.3', | |
'org.flywaydb:flyway-core:4.0', | |
'com.mysema.querydsl:querydsl-jpa:3.7.4', | |
'com.mysema.querydsl:querydsl-apt:3.7.4:jpa', | |
'org.springframework.amqp:spring-amqp:1.6.0.RELEASE', // FIXME: remove version after boot upgradeafk | |
'org.springframework.amqp:spring-rabbit:1.6.0.RELEASE', | |
'org.apache.commons:commons-csv:1.4', | |
'commons-io:commons-io:2.4', | |
'org.apache.poi:poi:3.14', | |
'org.apache.poi:poi-ooxml:3.14', | |
'org.apache.poi:ooxml-schemas:1.3', | |
'eu.bitwalker:UserAgentUtils:1.20', | |
'org.apache.tika:tika-core:1.14' | |
) | |
compile project(':9r-interop') | |
compile project(':9r-commons') | |
runtime("mysql:mysql-connector-java") | |
runtime("org.thymeleaf.extras:thymeleaf-extras-springsecurity4") | |
runtime("org.flywaydb:flyway-core:4.0") | |
def os = System.getProperty("os.name").toLowerCase() | |
if (os.contains("linux")) { | |
compile group: 'com.eclipsesource.j2v8', name: 'j2v8_linux_x86_64', version: '4.6.0' | |
} else { | |
compile group: 'com.eclipsesource.j2v8', name: 'j2v8_win32_x86_64', version: '4.6.0' | |
} | |
testCompile( | |
"org.springframework.boot:spring-boot-starter-test", | |
"junit:junit", | |
"org.hsqldb:hsqldb", | |
"info.cukes:cucumber-jvm:1.2.4", | |
"info.cukes:cucumber-core:1.2.4", | |
"info.cukes:cucumber-java:1.2.4", | |
"info.cukes:cucumber-junit:1.2.4", | |
"info.cukes:cucumber-spring:1.2.4", | |
"com.fasterxml.jackson.core:jackson-annotations:2.7.5", | |
) | |
if (project.hasProperty('notEmbedded')) { | |
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat' | |
} | |
} | |
/** | |
* Deploy | |
*/ | |
cargoRedeployRemote.dependsOn build | |
cargo { | |
containerId = config.server.containerId | |
port = config.server.port | |
deployable { | |
context = '9r' | |
} | |
remote { | |
hostname = config.server.hostname | |
username = config.server.username | |
// password = cargoPassword | |
} | |
} | |
node { | |
// Version of node to use. | |
version = '7.2.1' | |
// Version of npm to use. | |
// npmVersion = '4.0.5' | |
// Base URL for fetching node distributions (change if you have a mirror). | |
distBaseUrl = 'https://nodejs.org/dist' | |
// If true, it will download node using above parameters. | |
// If false, it will try to use globally installed node. | |
download = false | |
// Set the work directory for unpacking node | |
workDir = file("${project.buildDir}/nodejs") | |
// npmWorkDir = file("${project.buildDir}/nodejs/npm") | |
// Set the work directory where node_modules should be located | |
nodeModulesDir = file("${project.projectDir}/src/main/react") | |
} | |
task buildServerJS(type: NpmTask) { | |
// install the express package only | |
args = ['run', 'deploy:server'] | |
def _env = [:] | |
_env << System.getenv(); | |
_env["SERVER_JS_PATH"] = "${project.projectDir}/src/main/resources/com/srg/baikal/validation/js/" | |
environment _env | |
} | |
task reactStart(type: NpmTask) { | |
// install the express package only | |
args = ['start'] | |
} | |
npm_install { | |
args = ['--save'] | |
} | |
reactStart.dependsOn npmInstall | |
buildServerJS.dependsOn npmInstall | |
processResources { | |
dependsOn buildServerJS | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment