-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
155 lines (144 loc) · 5.55 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
plugins {
id 'java-platform'
id 'maven-publish'
id 'signing'
id 'net.researchgate.release' version '2.8.1'
}
ext {
// Project constants
github_org = 'Discord4J'
project_name = 'Discord4J'
artifact_group = 'com.discord4j'
project_version = "$version".toString()
project_description = 'Bill of Materials (BOM) for Discord4J'
project_url = 'https://discord4j.com'
isRelease = !version.toString().endsWith('-SNAPSHOT')
}
group = artifact_group
version = project_version
description = project_description
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url 'https://oss.sonatype.org/content/repositories/staging' }
maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' }
}
javaPlatform.allowDependencies()
dependencies {
api platform("io.projectreactor:reactor-bom:$reactorBomVersion")
constraints {
// standard style
api "com.discord4j:discord4j-common:$discord4jVersion"
api "com.discord4j:discord4j-core:$discord4jVersion"
api "com.discord4j:discord4j-gateway:$discord4jVersion"
api "com.discord4j:discord4j-rest:$discord4jVersion"
api "com.discord4j:discord4j-voice:$discord4jVersion"
api "com.discord4j:stores-api:$storesVersion"
api "com.discord4j:stores-common:$storesVersion"
api "com.discord4j:stores-caffeine:$storesVersion"
api "com.discord4j:stores-jdk:$storesVersion"
api "com.discord4j:stores-redis:$storesVersion"
api "com.discord4j:stores-tck:$storesVersion"
api "com.discord4j:connect-common:$connectVersion"
api "com.discord4j:connect-rabbitmq:$connectVersion"
api "com.discord4j:connect-rsocket:$connectVersion"
// jitpack style
api "com.discord4j.discord4j:discord4j-common:$discord4jJitpackVersion"
api "com.discord4j.discord4j:discord4j-core:$discord4jJitpackVersion"
api "com.discord4j.discord4j:discord4j-gateway:$discord4jJitpackVersion"
api "com.discord4j.discord4j:discord4j-rest:$discord4jJitpackVersion"
api "com.discord4j.discord4j:discord4j-voice:$discord4jJitpackVersion"
api "com.discord4j.Stores:stores-api:$storesJitpackVersion"
api "com.discord4j.Stores:stores-common:$storesJitpackVersion"
api "com.discord4j.Stores:stores-caffeine:$storesJitpackVersion"
api "com.discord4j.Stores:stores-jdk:$storesJitpackVersion"
api "com.discord4j.Stores:stores-redis:$storesJitpackVersion"
api "com.discord4j.Stores:stores-tck:$storesJitpackVersion"
api "com.discord4j.connect:connect-common:$connectJitpackVersion"
api "com.discord4j.connect:connect-rabbitmq:$connectJitpackVersion"
api "com.discord4j.connect:connect-rsocket:$connectJitpackVersion"
}
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'bom'
from components.javaPlatform
pom {
name = 'BOM'
description = 'Bill of Materials (BOM) for Discord4J'
url = 'https://github.com/Discord4J/BOM'
organization {
name = 'Discord4J'
url = 'https://discord4j.com'
}
issueManagement {
system = 'GitHub'
url = 'https://github.com/Discord4J/BOM/issues'
}
licenses {
license {
name = 'LGPL-3.0'
url = 'https://github.com/Discord4J/BOM/LICENSE.txt'
distribution = 'repo'
}
}
scm {
url = 'https://github.com/Discord4J/BOM'
connection = 'scm:git:git://github.com/Discord4J/BOM.git'
developerConnection = 'scm:git:git://[email protected]:Discord4J/BOM.git'
}
developers {
developer {
name = 'The Discord4J Team'
}
}
}
versionMapping {
usage('java-api') {
fromResolutionResult()
}
usage('java-runtime') {
fromResolutionResult()
}
}
}
}
repositories {
maven {
if (isRelease) {
url 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
} else {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
if (project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword')) {
credentials {
username project.property('sonatypeUsername')
password project.property('sonatypePassword')
}
}
}
}
}
if (isRelease) {
signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
if (signingKey != null && signingPassword != null) {
useInMemoryPgpKeys(new String(signingKey.decodeBase64()), signingPassword as String)
}
sign publishing.publications.mavenJava
}
}
release {
preTagCommitMessage = 'Release version'
tagCommitMessage = 'Release version'
newVersionCommitMessage = 'Next development version'
git {
requireBranch = ''
}
}
wrapper {
distributionType = Wrapper.DistributionType.ALL
}