-
-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathbuild.gradle
179 lines (158 loc) · 4 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
buildscript {
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
maven {
url "https://repo1.maven.org/maven2"
}
// dependencies {
// classpath "com.bihe0832:GradleDependenciesCheck:4.1.0"
// }
}
dependencies {
// License plugin
classpath 'gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.13.1'
// Versions plugin
classpath 'com.github.ben-manes:gradle-versions-plugin:0.12.0'
// Stats plugin
classpath 'org.kordamp.gradle:stats-gradle-plugin:0.2.0'
classpath 'com.bihe0832:GradleDependenciesCheck:1.0.2'
}
}
tasks.withType(Javadoc) {
options.encoding = "UTF-8"
options.charSet = "UTF-8"
}
apply plugin: 'base' // To add "clean" task to the root project.
apply plugin: 'distribution'
apply plugin: 'com.github.ben-manes.versions'
apply from: "${rootDir}/gradle/common.gradle"
// apply plugin: 'maven'
// apply plugin: 'maven-publish'
group = 'org.opentcs'
version = '4.20.0-SNAPSHOT'
allprojects {
repositories {
maven {
url "https://repo1.maven.org/maven2/"
}
maven {
url 'https://maven.aliyun.com/repository/public/'
}
mavenLocal()
mavenCentral()
}
}
subprojects {
// apply plugin: 'com.bihe0832.gradleDependenciesCheck'
// GradleDependenciesCheckConfig {
// showResultType = 1
// }
apply plugin: "maven-publish"
publishing {
repositories {
// maven {
// name = "GitHubPackages"
// url = uri("https://maven.pkg.github.com/touchmii/OpenTCS-4")
// credentials {
// username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME")
// password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
// }
// }
maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
mavenCentral()
maven {
url "https://repo1.maven.org/maven2/"
}
}
// publications {
// gpr(MavenPublication) {
// from(components.java)
// }
// }
}
// afterEvaluate {Project project ->
// project.getTasks().getByName('build').dependsOn("checkGradleDependencies")
// }
apply from: rootProject.file('gradle/common.gradle')
}
evaluationDependsOnChildren()
distributions {
main {
contents.from {
project(':openTCS-Kernel').ext.collectableDistDir
}
contents.from {
project(':openTCS-KernelControlCenter').ext.collectableDistDir
}
contents.from {
project(':openTCS-PlantOverview').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-PlantOverview:installDist')
dependsOn(':openTCS-Documentation:installDist')
}
task install {
subprojects {
if (!it.name.hasProperty('Exclude')) {
dependsOn it.name
}
}
// subprojects {
// if (!it.name.startsWith('openTCS-Web')) {
// dependsOn it.name
// }
// }
// dependsOn subprojects*.install
}
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 << '.gitlab'
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
}