Repository navigation
Expand file tree
/
Copy pathbuild.gradle
More file actions
134 lines (115 loc) · 3.86 KB
/
Copy pathbuild.gradle
File metadata and controls
134 lines (115 loc) · 3.86 KB
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
plugins {
id 'java-library'
id 'application'
id 'maven-publish'
id 'signing'
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
}
group = 'org.openbase'
version = providers.gradleProperty('releaseVersion')
.map { it.replaceFirst('^v', '') }
.orElse(providers.gradleProperty('version'))
.get()
description = 'Network control API for the homeautomation gateway module senact.'
repositories {
mavenCentral()
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
withSourcesJar()
withJavadocJar()
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
options.release = 21
}
dependencies {
api 'org.openbase:jul.exception:3.7.4'
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifactId = 'bco.senact.api'
pom {
name = 'BCO Senact API'
description = project.description
url = 'https://github.com/openbase/bco.senact.api/wiki'
inceptionYear = '2013'
organization {
name = 'openbase.org'
url = 'https://github.com/openbase'
}
licenses {
license {
name = 'GPLv3'
url = 'https://www.gnu.org/licenses/gpl-3.0.html'
}
}
developers {
developer {
id = 'DivineThreepwood'
name = 'Marian Pohling'
email = 'divine@openbase.org'
url = 'https://github.com/DivineThreepwood'
organization = 'openbase.org'
organizationUrl = 'https://github.com/openbase'
roles = ['developer', 'architect', 'tester']
timezone = '+1'
}
}
scm {
connection = 'scm:git:https://github.com/openbase/bco.senact.api.git'
developerConnection = 'scm:git:https://github.com/openbase/bco.senact.api.git'
url = 'https://github.com/openbase/bco.senact.api'
}
}
}
}
}
nexusPublishing {
repositories {
sonatype {
username.set(providers.gradleProperty('MAVEN_CENTRAL_USERNAME'))
password.set(providers.gradleProperty('MAVEN_CENTRAL_TOKEN'))
nexusUrl.set(uri('https://ossrh-staging-api.central.sonatype.com/service/local/'))
snapshotRepositoryUrl.set(uri('https://central.sonatype.com/repository/maven-snapshots/'))
}
}
}
def encodedSigningKey = providers.gradleProperty('OPENBASE_GPG_PRIVATE_KEY').orNull
if (encodedSigningKey) {
def signingKey = new String(
Base64.decoder.decode(encodedSigningKey),
java.nio.charset.StandardCharsets.UTF_8
)
def signingPassphrase = providers.gradleProperty('OPENBASE_GPG_PRIVATE_KEY_PASSPHRASE').getOrElse('')
signing {
useInMemoryPgpKeys(signingKey, signingPassphrase)
sign publishing.publications.mavenJava
}
}
application {
mainClass = 'org.openbase.bco.senact.api.SenactDebugFrame'
}
jar {
manifest {
attributes(
'Main-Class': application.mainClass.get()
)
}
}
tasks.register('runServerService', JavaExec) {
group = 'application'
description = 'Runs the Senact server service.'
classpath = sourceSets.main.runtimeClasspath
mainClass = 'org.openbase.bco.senact.api.SenactServerService'
}
tasks.register('runDebugFrame', JavaExec) {
group = 'application'
description = 'Runs the Senact debug frame.'
classpath = sourceSets.main.runtimeClasspath
mainClass = 'org.openbase.bco.senact.api.SenactDebugFrame'
}