-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
164 lines (136 loc) · 3.84 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
//
// Copyright 2019 - 2021 SenX S.A.S.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id 'com.github.johnrengelman.shadow' version '7.0.0'
id 'net.nemerosa.versioning' version '2.14.0'
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
}
project.group = 'io.warp10.plugins'
project.description = 'BACNet plugin for Warp 10'
// If the current tag is set, then it's a new release. Don't add build number
project.version = versioning.info.lastTag + ((versioning.info.tag != null) ? '' : '-' + versioning.info.build)
//
// Repositories for the project dependencies
//
repositories {
mavenCentral()
maven {
url "https://maven.mangoautomation.net/repository/ias-release"
}
}
//
// Dependencies of the project
//
dependencies {
//
// Insert your dependencies here
//
//implementation group: 'GROUP', name: 'NAME', version: 'VERSION', classifier: 'CLASSIFIER'
// Use JUnit test framework.
testImplementation 'junit:junit:4.13'
// Compile time only dependencies, not used at runtime, or provided by other dependencies.
compileOnly group: 'io.warp10', name: 'warpscript', version: '2.+'
// bacnet
implementation "com.infiniteautomation:bacnet4j:6.0.0"
}
java {
withJavadocJar()
withSourcesJar()
}
jar {
manifest {
attributes('WarpFleet-Description': project.description)
attributes('WarpFleet-Group': project.group)
attributes('WarpFleet-Artifact': project.name)
attributes('WarpFleet-Version': project.version)
}
from('src/main/warpscript') {
//
// Only consider macros which are in our namespace
//
include project.group + '/' + project.name + '/*.mc2'
include project.group + '/' + project.name + '/**/*.mc2'
}
from('.') {
include 'README.md'
include project.group + '-' + project.name + '.conf'
}
}
shadowJar {
archiveClassifier.set('uberjar')
shadowJar.archiveName = 'warp10-plugin-bacnet.jar'
from('src/main/warpscript') {
//
// Only consider macros which are in our namespace
//
include project.group + '/' + project.name + '/*.mc2'
include project.group + '/' + project.name + '/**/*.mc2'
}
from('.') {
include 'README.md'
include project.group + '-' + project.name + '.conf'
}
}
//
// Maven related config
//
publishing {
publications {
module(MavenPublication) {
from components.java
pom {
name = project.name
description = project.description
url = 'https://github.com/senx/' + project.name
scm {
connection = 'scm:git:git://github.com/senx/' + project.name
developerConnection = 'scm:git:ssh://github.com/senx/' + project.name
url = 'https://github.com/senx/' + project.name
}
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'senx'
name = 'SenX'
email = '[email protected]'
}
}
}
}
}
}
nexusPublishing {
repositories {
sonatype()
}
}
//
// Artifact Signing only if signing key name is in the properties
//
if (project.hasProperty("signing.gnupg.keyName")) {
signing {
useGpgCmd()
sign publishing.publications
}
}