forked from openTCS/opentcs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
158 lines (134 loc) · 3.44 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
buildscript {
repositories {
mavenLocal()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
// License plugin
classpath 'gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.14.0'
// Stats plugin
classpath 'org.kordamp.gradle:stats-gradle-plugin:0.2.2'
// JaCoCo log plugin
classpath 'gradle.plugin.org.barfuin.gradle.jacocolog:gradle-jacoco-log:2.0.0'
}
}
apply plugin: 'base' // To add "clean" task to the root project.
apply plugin: 'distribution'
apply plugin: 'org.barfuin.gradle.jacocolog'
apply from: "${rootDir}/gradle/common.gradle"
apply from: "${rootDir}/gradle/publishing-common.gradle"
subprojects {
apply from: rootProject.file('gradle/common.gradle')
}
evaluationDependsOnChildren()
repositories {
mavenLocal()
mavenCentral()
}
distributions {
main {
contents.from {
project(':openTCS-Kernel').ext.collectableDistDir
}
contents.from {
project(':openTCS-KernelControlCenter').ext.collectableDistDir
}
contents.from {
project(':openTCS-ModelEditor').ext.collectableDistDir
}
contents.from {
project(':openTCS-OperationsDesk').ext.collectableDistDir
}
contents.from {
project(':openTCS-Documentation').ext.collectableDistDir
}
}
}
task statsAggregate(type: org.kordamp.gradle.stats.AggregateStatsReportTask) {
dependsOn subprojects*.stats
}
task subDists {
dependsOn(':openTCS-Kernel:installDist')
dependsOn(':openTCS-KernelControlCenter:installDist')
dependsOn(':openTCS-ModelEditor:installDist')
dependsOn(':openTCS-OperationsDesk:installDist')
dependsOn(':openTCS-Documentation:installDist')
}
installDist.dependsOn subDists
distZip {
classifier = 'bin'
dependsOn subDists
}
distTar {
classifier = 'bin'
dependsOn subDists
compression = Compression.GZIP
}
task distSrcZip(type: Zip) {
classifier = 'src'
from "${rootDir}"
includes << 'config/**'
includes << 'gradle/**'
includes << 'openTCS-*/**'
includes << 'src/**'
includes << '.nb-gradle-properties'
includes << '*.gradle'
includes << 'gradlew'
includes << 'gradlew.bat'
excludes << '.codeclimate.yml'
excludes << '.gitlab'
excludes << '.gitlab-ci.yml'
excludes << '.gradle'
excludes << '**/build'
}
artifacts {
archives distZip
archives distSrcZip
}
build {
dependsOn subprojects*.build
dependsOn installDist
}
task release {
dependsOn build
dependsOn subprojects*.release
dependsOn distZip
dependsOn distSrcZip
}
publish.dependsOn subprojects*.publish
publishing {
publications {
maven(MavenPublication) {
artifact distZip
artifact distSrcZip
pom {
artifactId = 'opentcs'
name = project.name
description = project.name
url = "https://www.opentcs.org"
licenses {
license {
name = "MIT License"
url = "http://www.opensource.org/licenses/mit-license.php"
}
}
developers {
developer {
name = "The openTCS Authors"
email = "[email protected]"
organization = "The open Transportation Control System"
organizationUrl = "https://www.opentcs.org/"
}
}
scm {
connection = "scm:git:git://github.com/opentcs/opentcs.git"
developerConnection = "scm:git:ssh://github.com:opentcs/opentcs.git"
url = "https://github.com/opentcs/opentcs"
}
}
}
}
}