-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathbuild.gradle
113 lines (101 loc) · 3.12 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
plugins {
id 'java'
id 'java-library'
id 'maven-publish'
id 'org.jreleaser' version '1.13.1'
}
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
apply plugin: 'maven-publish'
group 'io.gitee.gaoxingliang:mac-address-detector-java'
version '0.0.1'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
maven { url 'https://maven.aliyun.com/repository/public/' }
mavenLocal()
mavenCentral()
}
java {
withJavadocJar()
withSourcesJar()
}
dependencies {
implementation group: 'org.pcap4j', name: 'pcap4j-core', version: '1.7.3'
implementation group: 'org.pcap4j', name: 'pcap4j-packetfactory-static', version: '1.7.3'
}
test {
useJUnitPlatform()
}
publishing {
publications {
maven(MavenPublication) {
groupId = "io.gitee.gaoxingliang"
artifactId = 'mac-address-detector-java'
from components.java
pom {
name = 'mac-address-detector-java'
description = 'Use pcap4j to detect a mac address of remote host'
url = 'https://github.com/gaoxingliang/mac-address-detector-java'
inceptionYear = '2024'
licenses {
license {
name = 'Apache-2.0'
url = 'https://spdx.org/licenses/Apache-2.0.html'
}
}
developers {
developer {
id = 'gaoxingliang'
name = 'gaoxingliang'
}
}
scm {
connection = 'scm:git:https://github.com/gaoxingliang/mac-address-detector-java.git'
developerConnection = 'scm:git:ssh://github.com/gaoxingliang/mac-address-detector-java.git'
url = 'https://github.com/gaoxingliang/mac-address-detector-java'
}
}
}
}
repositories {
maven {
url = layout.projectDirectory.dir('build/staging-deploy')
}
}
}
jreleaser {
signing {
active = 'ALWAYS'
armored = true
mode = 'FILE'
publicKey = '/Users/edward/.jreleaser/public.pgp'
secretKey = '/Users/edward/.jreleaser/private.pgp'
}
deploy {
maven {
// nexus2 {
// 'maven-central' {
// active = 'ALWAYS'
// url = 'https://s01.oss.sonatype.org/service/local'
// snapshotUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
// closeRepository = true
// releaseRepository = true
// stagingRepository('build/staging-deploy'
// }
// }
mavenCentral {
sonatype {
active = 'ALWAYS'
url = 'https://central.sonatype.com/api/v1/publisher'
stagingRepository('build/staging-deploy')
}
}
}
}
}