/
build.gradle
112 lines (92 loc) · 2.85 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
plugins {
id 'java-library'
id 'jacoco'
id 'maven-publish'
id 'signing'
}
group 'io.github.werthersechte'
version '1.4.2'
sourceCompatibility = 16
repositories {
mavenCentral()
}
dependencies {
implementation "com.discord4j:discord4j-core:3.2.3"
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: '5.8.1'
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.22.0'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '4.4.0'
testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '4.4.0'
}
test {
useJUnitPlatform()
}
jacocoTestReport {
reports {
csv.enabled true
}
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it,
exclude: ['**/ai/**',
'**/gui/**'])
}))
}
}
// maven central deploy
java {
withSourcesJar()
withJavadocJar()
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
sign publishing.publications
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId = project.group.toString()
artifactId = project.name
version = project.version.toString()
from components.java
pom {
name = project.name
description = "A cathedral implementation in Java"
url = "https://github.com/WerthersEchte/cathedral"
licenses {
license {
name = "The Unlicense"
url = "https://unlicense.org"
}
}
developers {
developer {
id = "WerthersEchte"
name = "Eike Petersen"
email = "epetersen@gmx.li"
}
}
scm {
url = "https://github.com/WerthersEchte/cathedral"
connection = "scm:git:git://github.com/WerthersEchte/cathedral.git"
developerConnection = "scm:git:git://github.com/WerthersEchte/cathedral.git"
}
issueManagement {
url = "https://github.com/WerthersEchte/cathedral/issues"
}
}
}
}
repositories {
maven {
credentials {
username ossrhUsername
password ossrhPassword
}
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}
}