-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
61 lines (41 loc) · 1.6 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
System.properties.putIfAbsent('javax.net.ssl.keyStore', System.properties['user.home]+'/.ssh/keystore.jks')
System.properties.putIfAbsent('javax.net.ssl.keyStorePassword', 'password')
System.properties.putIfAbsent('javax.net.ssl.keyStoreType', 'JKS')
System.properties.putIfAbsent('javax.net.ssl.trustStore', System.properties['user.home]+'/.ssh/truststore.jks')
System.properties.putIfAbsent('javax.net.ssl.trustStorePassword', 'password')
System.properties.putIfAbsent('javax.net.ssl.trustStoreType', 'JKS')
ext.sslSystemProperties = System.properties.findAll { it.key.startsWith('javax.net.ssl') }
ext.isReleaseBuild = !(project.version.endsWith('-SNAPSHOT'))
apply plugin: 'git-release'
apply plugin: 'war'
apply plugin: 'groovy'
apply plugin: 'requirejs-optimizer'
sourceCompatibility = 1.8
targetCompatibility = 1.8
ext.groovyVersion = '2.4.3'
ext.springVersion = '4.1.6.RELEASE'
repositories {
mavenCentral()
}
dependencies {
compile "org.springframework:spring-webmvc:$springVersion"
}
def processedAssets = fileTree("$buildDir/assets") { builtBy 'processAssets' }
task processAssets(type: Copy) {
from 'src/main/webapp'
into processedAssets.dir
}
task optimizeWebAssets(type: RequireJsOptimizer) {
dependsOn processedAssets
inputs.dir processedAssets.dir
configurationFile = "${processedAssets.dir}/js/build.js"
outputDir = "$buildDir/optimizedAssets"
logLevel = 'WARN'
}
war {
dependsOn optimizeWebAssets
exclude 'js', 'css'
from("${optimizeWebAssets.outputDir}/js") { into 'js' }
from("${optimizeWebAssets.outputDir}/css") { into 'css' }
duplicatesStrategy 'FAIL'
}