-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
94 lines (83 loc) · 2.66 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
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0'
}
repositories {
mavenCentral()
}
dependencies {
implementation 'com.google.code.gson:gson:2.10.1'
testImplementation 'junit:junit:4.13.2'
}
def Properties properties = new Properties()
properties.load(project.rootProject.file("local.properties").newDataInputStream())
nexusPublishing {
repositories {
sonatype {
username.set(properties.getProperty("ossrhUsername"))
password.set(properties.getProperty("ossrhPassword"))
stagingProfileId.set(properties.getProperty("sonatypeStagingProfileId"))
nexusUrl.set(uri(properties.getProperty("nexusUrl")))
snapshotRepositoryUrl.set(uri(properties.getProperty("snapshotRepositoryUrl")))
}
}
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = project.pomArtifactId
groupId = project.pomGroup
version = project.versionName
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'authsignal-java'
description = 'The Authsignal Server SDK for Java.'
url = 'https://github.com/authsignal/authsignal-java'
licenses {
license {
name = 'MIT'
url = 'https://github.com/authsignal/authsignal-java/blob/main/LICENSE.md'
}
}
developers {
developer {
id = 'Authsignal'
name = 'Authsignal'
}
}
scm {
connection = 'scm:git:github.com/authsignal/authsignal-java.git'
developerConnection = 'scm:git:ssh://github.com/authsignal/authsignal-java.git'
url = 'https://github.com/authsignal/authsignal-java/tree/main'
}
}
}
}
}
signing {
useInMemoryPgpKeys(
properties.getProperty("signing.keyId"),
properties.getProperty("signing.key"),
properties.getProperty("signing.password"),
)
sign publishing.publications.mavenJava
}
test {
testLogging.showStandardStreams = true
}