This repository has been archived by the owner on Dec 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpublish-helper.gradle
53 lines (46 loc) · 1.97 KB
/
publish-helper.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
apply plugin: 'maven-publish'
apply plugin: 'signing'
java {
sourceCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
it.create("main", MavenPublication) {MavenPublication publication ->
from(components["java"])
pom {
name = 'macOS keychain helper library'
description = 'A helper library to work with the macOS keychain.'
url = 'https://github.com/wooga/macos-security.groovy'
artifactId = project.name
inceptionYear = "2021"
scm {
connection = 'scm:git:https://github.com/wooga/macos-security.groovy.git'
developerConnection = 'scm:git:https://github.com/wooga/macos-security.groovy.git'
url = 'https://github.com/wooga/macos-security.groovy.git'
}
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'manfred.endres'
name = 'Manfred Endres'
email = '[email protected]'
}
}
}
}
}
}
signing {
def signingKeyId = project.hasProperty("signingKeyId") ? project.property('signingKeyId') : System.getenv('OSSRH_SIGNING_KEY_ID')
def signingKey = project.hasProperty("signingKey") ? project.property('signingKey') : System.getenv('OSSRH_SIGNING_KEY')
def signingPassword = project.hasProperty('signingPassphrase') ? project.property('signingPassphrase') : System.getenv("OSSRH_SIGNING_PASSPHRASE")
useInMemoryPgpKeys(signingKeyId.toString(), signingKey.toString(), signingPassword.toString())
sign publishing.publications.main
}