forked from gythialy/openmuc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configuration.gradle
169 lines (133 loc) · 4.37 KB
/
configuration.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
project.ext {
cfgVersion = "0.17.2"
cfgGroup = "org.openmuc.framework"
cfgCopyDependencies = false
cfgCopyToRoot = true
cfgSignPom = true
cfgRepository = project.properties.sonatypeRepository
cfgSnapshotRepository = project.properties.sonatypeSnapshotRepository
cfgRepositoryUser = project.properties.sonatypeUser
cfgRepositoryPass = project.properties.sonatypePass
javaProjects = subprojects
jarDefaultImportPackageVersion = ";version=0"
distributionProjects = javaProjects.findAll {
it.getPath() == ":openmuc-app-simpledemo" ||
it.getPath() == ":openmuc-core-api" ||
it.getPath() == ":openmuc-core-datamanager" ||
it.getPath() == ":openmuc-core-spi" ||
it.getPath() == ":openmuc-datalogger-ascii" ||
it.getPath() == ":openmuc-datalogger-slotsdb" ||
it.getPath() == ":openmuc-driver-aggregator" ||
it.getPath() == ":openmuc-driver-csv" ||
it.getPath() == ":openmuc-driver-dlms" ||
it.getPath() == ":openmuc-driver-ehz" ||
it.getPath() == ":openmuc-driver-iec60870" ||
it.getPath() == ":openmuc-driver-iec61850" ||
it.getPath() == ":openmuc-driver-iec62056p21" ||
it.getPath() == ":openmuc-driver-knx" ||
it.getPath() == ":openmuc-driver-mbus" ||
it.getPath() == ":openmuc-driver-modbus" ||
it.getPath() == ":openmuc-driver-rest" ||
it.getPath() == ":openmuc-driver-snmp" ||
it.getPath() == ":openmuc-driver-wmbus" ||
it.getPath() == ":openmuc-server-restws" ||
it.getPath() == ":openmuc-server-modbus" ||
it.getPath() == ":openmuc-webui-base" ||
it.getPath() == ":openmuc-webui-channelaccesstool" ||
it.getPath() == ":openmuc-webui-channelconfigurator" ||
it.getPath() == ":openmuc-webui-dataexporter" ||
it.getPath() == ":openmuc-webui-dataplotter" ||
it.getPath() == ":openmuc-webui-mediaviewer" ||
it.getPath() == ":openmuc-webui-simpledemovisualisation" ||
it.getPath() == ":openmuc-webui-spi" ||
it.getPath() == ":openmuc-webui-userconfigurator"
}
docProjects = distributionProjects.findAll {
it.getPath() == ":openmuc-core-api" ||
it.getPath() == ":openmuc-core-spi" ||
it.getPath() == ":openmuc-webui-spi"
}
repositoryProjects = distributionProjects
}
configure(javaProjects) {
apply plugin: "java"
apply plugin: "maven"
uploadArchives {
repositories {
mavenDeployer {
pom.project {
licenses {
license {
name "GNU General Public License"
url "http://www.gnu.org/copyleft/gpl-3.0.html"
distribution "repo"
}
}
}
}
}
}
}
task updateBundles(type:Exec) {
dependsOn(distributionProjects.install)
commandLine "./framework/bin/openmuc", "update-bundles"
}
tasks.withType(Tar) {
dependsOn(updateBundles)
into(project.name) {
from("./") {
include "build.gradle"
include "configuration.gradle"
include "license/**"
include "docs/CHANGELOG.txt"
include "gradle/wrapper/**"
include "gradlew"
include "gradlew.bat"
include "build/libs-all/**"
include "dependencies/**"
include "src/**"
include "framework/felix/**"
include "framework/bundle/**"
include "framework/conf/**"
include "framework/bin/"
include "framework/media/README.txt/"
include "framework/log/README.txt"
include "framework/dependencies/**"
include "framework/csv-driver/**"
include "framework/README.txt"
exclude "**/projects/**/bin"
exclude "**/projects/**/build"
exclude "**/projects/**/.settings"
exclude "**/projects/**/.project"
exclude "**/projects/**/.classpath"
exclude "**/projects/**/.gradle"
for (Project myproject: distributionProjects) {
include myproject.getProjectDir().toString().substring((int)(getProjectDir().toString().size() + 1)) + "/**";
}
}
if (name.equals("tar") ){
exclude "**/dependencies/**/src"
}
from("./build/") {
include "settings.gradle"
}
}
into(project.name + "/doc/user-guide/") {
from("./build/asciidoc/html5/") {
include "**"
}
from("./build/asciidoc/pdf/") {
include "*.pdf"
}
}
into(project.name + "/framework/media/") {
from("./build/asciidoc/pdf/") {
include "*.pdf"
}
}
into(project.name + "/doc/") {
from("./build/docs/") {
include "javadoc/**"
}
}
}