-
Notifications
You must be signed in to change notification settings - Fork 16
/
build.gradle
88 lines (79 loc) · 2.49 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
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
group = 'org.sqids'
version = '0.1.1-SNAPSHOT'
String rootArtifactiId = 'sqids'
String projectUrl = 'https://sqids.org/java'
repositories {
mavenCentral()
}
dependencies {
testImplementation platform('org.junit:junit-bom:5.10.0')
testImplementation 'org.junit.jupiter:junit-jupiter'
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
test {
useJUnitPlatform()
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId = group
artifactId = rootArtifactiId
version = version
from components.java
pom {
name = 'Sqids'
description = 'Generate short YouTube-looking IDs from numbers.'
url = projectUrl
properties = [
"parent.groupId": "org.sonatype.oss",
"parent.artifactId": "oss-parent",
"parent.version": "7"
]
licenses {
license {
name = 'MIT License'
url = 'https://github.com/sqids/sqids-java/blob/main/LICENSE'
}
}
developers {
developer {
id = '0x3333'
name = 'Tercio Gaudencio Filho'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:https://github.com/sqids/sqids-java.git'
developerConnection = 'scm:git:ssh://[email protected]:sqids/sqids-java.git'
url = projectUrl
}
}
}
}
repositories {
maven {
def releasesRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/releases/'
def snapshotsRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username "${System.getenv("SONATYPE_USERNAME")}"
password "${System.getenv("SONATYPE_PASSWORD")}"
}
}
}
signing {
useGpgCmd()
sign publishing.publications.mavenJava
}
}