-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
executable file
·128 lines (106 loc) · 4.05 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
buildscript {
ext {
springBootVersion = '2.0.0.M7'
}
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
maven { url 'http://repo.spring.io/plugins-release' }
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath 'io.spring.gradle:propdeps-plugin:0.0.9.RELEASE'
classpath "com.moowork.gradle:gradle-node-plugin:1.2.0"
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'groovy'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
//apply plugin: 'war'
apply plugin: 'propdeps'
apply plugin: 'propdeps-idea'
apply plugin: 'com.moowork.node'
group = 'com.transempiric.isoWebTemplate'
version = '0.0.1'
sourceCompatibility = 1.8
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
configurations {
providedRuntime
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-actuator')
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.springframework.boot:spring-boot-starter-security')
compile 'org.springframework.security:spring-security-rsa:1.0.5.RELEASE'
compile('org.springframework.boot:spring-boot-starter-mail')
compile('org.codehaus.groovy:groovy')
runtime('org.springframework.boot:spring-boot-devtools')
runtime('mysql:mysql-connector-java')
compileOnly('org.springframework.boot:spring-boot-configuration-processor')
compile('org.springframework.boot:spring-boot-starter-tomcat')
compile("com.h2database:h2")
/********************** JWT *********************/
compile('io.jsonwebtoken:jjwt:0.7.0')
compile group: 'org.passay', name: 'passay', version: '1.3.0'
compile group: 'com.google.guava', name: 'guava', version: '24.0-jre'
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile('org.springframework.security:spring-security-test')
compile("com.transempiric:simple-encryptor:1.0.0")
}
task wrapper(type: Wrapper) {
gradleVersion = '4.6'
}
/*
************************************************************
**************** Node Build Task ***************************
* Node tasks, useful for project configured Jenkins deploy
************************************************************/
node {
version = '9.5.0'
npmVersion = '5.6.0'
distBaseUrl = 'https://nodejs.org/dist'
download = true
workDir = file("${project.buildDir}/nodejs")
npmWorkDir = file("${project.buildDir}/npm")
nodeModulesDir = file("${project.projectDir}/src/main/trans-react")
}
task nodeBuidClientProd(type: NodeTask) {
println 'Starting gradle node CLIENT PROD BUILD...'
script = file('src/main/trans-react/client/bin/client.prod.build.js')
ignoreExitValue = true
dependsOn npmInstall
}
task nodeBuildSsr(type: NodeTask) {
println 'Starting gradle node SSR PROD BUILD...'
script = file('src/main/trans-react/ssr/bin/ssr.build.js')
ignoreExitValue = true
dependsOn nodeBuidClientProd
}
task nodeBuildProd() {
println 'Starting node PROD Build...'
dependsOn nodeBuildSsr
}
/*
************************************************************
**************** Gradle Build Task *************************
* Makes build task run all the node task (install and build)
************************************************************/
build.dependsOn(nodeBuildProd)
/*
*************************************************************
**************** Spring Boot Task ***************************
*************************************************************/
bootRun {
/**************** Allows for passing in JVM args ****************/
if (project.hasProperty('jvmArgs')) jvmArgs project.jvmArgs.split('\\s+');
}
compileJava.dependsOn(processResources)