-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
133 lines (115 loc) · 4.48 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
129
130
131
132
133
buildscript {
repositories {
jcenter()
mavenLocal()
}
dependencies {
classpath 'org.codehaus.griffon:gradle-griffon-plugin:2.6.0'
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.6.3'
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0'
classpath 'org.gradle.api.plugins:gradle-izpack-plugin:0.2.3'
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
classpath 'com.github.cr0:gradle-macappbundle-plugin:3.1.0'
classpath 'org.kordamp.gradle:stats-gradle-plugin:0.1.5'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.12.0'
classpath 'de.gliderpilot.gradle.jnlp:gradle-jnlp-plugin:0.2.1'
classpath 'net.nemerosa:versioning:1.6.2'
}
}
apply plugin: 'groovy'
apply plugin: 'org.codehaus.griffon.griffon'
apply plugin: 'net.nemerosa.versioning'
Date buildTimeAndDate = new Date()
ext {
buildDate = new SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate)
buildTime = new SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate)
macosx = System.getProperty('os.name').contains('Mac OS')
}
griffon {
disableDependencyResolution = false
includeGroovyDependencies = true
version = '2.6.0'
toolkit = 'swing'
applicationProperties = [
'build.date' : buildDate,
'build.time' : buildTime,
'build.revision': versioning.info.commit
]
}
mainClassName = 'encryptomania.Launcher'
apply from: 'gradle/publishing.gradle'
apply from: 'gradle/code-coverage.gradle'
apply from: 'gradle/code-quality.gradle'
apply from: 'gradle/integration-test.gradle'
apply from: 'gradle/package.gradle'
apply from: 'gradle/docs.gradle'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'org.kordamp.gradle.stats'
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'com.github.kt3k.coveralls'
dependencies {
compile 'org.springframework.security:spring-security-crypto:4.0.4.RELEASE'
compile "org.codehaus.griffon:griffon-guice:${griffon.version}"
runtime('log4j:log4j:1.2.17') {
exclude group: 'ant', module: 'ant-nodeps'
exclude group: 'ant', module: 'ant-junit'
exclude group: 'ant-contrib', module: 'ant-contrib'
}
runtime 'org.slf4j:slf4j-log4j12:1.7.18'
testCompile "org.codehaus.griffon:griffon-fest-test:${griffon.version}"
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4'
testCompile 'com.jayway.awaitility:awaitility-groovy:1.6.3'
}
tasks.withType(JavaCompile) {
sourceCompatibility = project.sourceCompatibility
targetCompatibility = project.targetCompatibility
}
tasks.withType(GroovyCompile) {
sourceCompatibility = project.sourceCompatibility
targetCompatibility = project.targetCompatibility
}
import com.github.jengelman.gradle.plugins.shadow.transformers.*
import java.text.SimpleDateFormat
shadowJar {
transform(ServiceFileTransformer)
transform(ServiceFileTransformer) {
path = 'META-INF/griffon'
}
transform(ServiceFileTransformer) {
path = 'META-INF/types'
}
transform(PropertiesFileTransformer) {
paths = [
'META-INF/editors/java.beans.PropertyEditor'
]
}
}
startScripts {
doLast {
if (!macosx) unixScript.text = unixScript.text.replaceAll('"(-Xdock:(name|icon)=)([^"]*?)(")', ' ')
windowsScript.text = windowsScript.text.replaceAll('"(-Xdock:(name|icon)=)([^"]*?)(")', ' ')
}
}
if (hasProperty('debugRun') && ((project.debugRun as boolean))) {
run {
jvmArgs '-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005'
}
}
task jacocoRootMerge(type: org.gradle.testing.jacoco.tasks.JacocoMerge, dependsOn: [test, jacocoTestReport, jacocoIntegrationTestReport]) {
executionData = files(jacocoTestReport.executionData, jacocoIntegrationTestReport.executionData)
destinationFile = file("${buildDir}/jacoco/root.exec")
}
task jacocoRootReport(dependsOn: jacocoRootMerge, type: JacocoReport) {
group = 'Reporting'
description = 'Generate Jacoco coverage reports after running all tests.'
executionData file("${buildDir}/jacoco/root.exec")
sourceDirectories = files(sourceSets.main.allSource.srcDirs)
classDirectories = files(sourceSets.main.output)
reports {
csv.enabled = false
xml.enabled = true
html.enabled = true
html.destination = "${buildDir}/reports/jacoco/root/html"
xml.destination = "${buildDir}/reports/jacoco/root/root.xml"
}
}