forked from jc-lab/javautils-system-information
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
106 lines (86 loc) · 3 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
plugins {
id 'java'
id 'maven'
id 'maven-publish'
id 'signing'
}
allprojects {
group 'kr.jclab.javautils'
version '1.0.4'
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
repositories {
mavenCentral()
}
dependencies {
compileOnly 'org.projectlombok:lombok:1.18.20'
annotationProcessor 'org.projectlombok:lombok:1.18.20'
testCompileOnly 'org.projectlombok:lombok:1.18.20'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.20'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
implementation 'org.apache.commons:commons-lang3:3.11'
implementation 'commons-io:commons-io:2.8.0'
implementation 'net.java.dev.jna:jna:5.6.0'
implementation 'net.java.dev.jna:jna-platform:5.6.0'
}
test {
useJUnitPlatform()
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar, javadocJar
}
signing {
useGpgCmd()
sign configurations.archives
}
tasks.withType(Sign) {
onlyIf { project.hasProperty('signing.gnupg.keyName') || project.hasProperty('signing.keyId') }
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: findProperty('ossrhUsername'), password: findProperty('ossrhPassword'))
}
snapshotRepository(url: "https://s01.oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: findProperty('ossrhUsername'), password: findProperty('ossrhPassword'))
}
pom.project {
name project.name
packaging 'jar'
// optionally artifactId can be defined here
description 'cross-platform system information'
url 'https://github.com/jc-lab/javautils-system-information'
scm {
connection 'scm:git:https://github.com/jc-lab/javautils-system-information.git'
developerConnection 'scm:git:ssh://[email protected]/jc-lab/javautils-system-information.git'
url 'https://github.com/jc-lab/javautils-system-information'
}
licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'jclab'
name 'Joseph Lee'
email '[email protected]'
}
}
}
}
}
}