-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
83 lines (73 loc) · 2.22 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
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
repositories {
mavenCentral()
}
dependencies {
implementation 'com.fazecast:jSerialComm:2.10.4'
testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
}
java {
withJavadocJar()
withSourcesJar()
}
test {
useJUnitPlatform()
}
boolean publish = project.hasProperty('ossrh_user')
if (!publish) {
println('=== Publish skipped because no credential is provided. ===')
}
publishing {
if (publish) {
publications {
pub(MavenPublication) {
from components.java
groupId = 'io.github.llschall'
artifactId = 'jtrafficlight'
version = '1.0.3-SNAPSHOT'
pom {
signing {
sign publishing.publications.pub
sign configurations.archives
}
name = 'jtrafficlight'
description = 'Plug a traffic light to an Arduino board and control it from your Java application.'
url = 'https://github.com/llschall/jtrafficlight'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'llschall'
name = 'Laurent Schall'
email = 'llschall@gmx.com'
}
}
scm {
url = 'https://github.com/llschall/jtrafficlight.git'
}
}
}
}
repositories {
maven {
credentials {
username "$ossrh_user"
password "$ossrh_pwd"
}
url "https://s01.oss.sonatype.org/content/repositories/snapshots"
}
}
signing {
sign publishing.publications.pub
}
}
}