-
Notifications
You must be signed in to change notification settings - Fork 45
/
build.gradle
86 lines (78 loc) · 1.83 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
plugins {
id 'signing'
id "maven-publish"
id "java-library"
id "io.github.gradle-nexus.publish-plugin" version "1.3.0"
}
repositories {
mavenCentral()
}
dependencies {
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: '5.9.3'
}
java {
group = "net.fornwall"
version = "0.9.0"
sourceCompatibility = 1.8
withJavadocJar()
withSourcesJar()
}
test {
systemProperty "jelf.version", project.version.toString()
useJUnitPlatform()
afterTest { desc, result ->
println "Test ${desc.name} [${desc.className}] result: ${result.resultType}"
}
}
// See https://docs.gradle.org/current/userguide/publishing_maven.html
// and https://github.com/gradle-nexus/publish-plugin
/*
gpg --keyring secring.gpg --export-secret-keys > ~/.gnupg/secring.gpg
gradle --info \
-PsonatypeUsername=xxx \
-PsonatypePassword=xxx \
-Psigning.keyId=xxx \
-Psigning.password=xxx \
-Psigning.secretKeyRingFile=$HOME/.gnupg/secring.gpg \
publishToSonatype \
closeAndReleaseSonatypeStagingRepository
*/
nexusPublishing {
repositories {
sonatype()
}
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'jelf'
from components.java
pom {
name = 'JElf'
description = 'ELF parsing library in java'
url = 'https://github.com/fornwall/jelf'
licenses {
license {
name = 'The MIT License'
url = 'https://opensource.org/licenses/MIT'
}
}
developers {
developer {
id = 'fornwall'
name = 'Fredrik Fornwall'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/fornwall/jelf.git'
developerConnection = 'scm:git:ssh://[email protected]/fornwall/jelf.git'
url = 'https://github.com/fornwall/jelf/'
}
}
}
}
}
signing {
sign publishing.publications.mavenJava
}