-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
173 lines (147 loc) · 5.63 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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
id 'signing'
id 'java-library'
id 'maven-publish'
id 'org.jetbrains.dokka' version '1.9.20'
id 'org.cadixdev.licenser' version '0.6.1'
id 'org.jetbrains.kotlin.jvm' version '1.9.25'
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0'
}
final KOTLIN_VER = '1.9.25'
//noinspection GroovyUnusedAssignment
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
compileJava.options.encoding 'UTF-8'
group 'me.dkim19375'
version '2.10.10'
//noinspection GrUnresolvedAccess
compileKotlin.compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
}
compileTestKotlin.compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
}
license {
header = rootProject.file 'LICENSE'
include '**/*.kt'
}
test {
useJUnitPlatform()
}
repositories {
mavenCentral()
maven { url = 'https://jitpack.io' }
maven { url = 'https://m2.dv8tion.net/releases' }
maven { url = 'https://repo.triumphteam.dev/snapshots/' }
maven { url = 'https://s01.oss.sonatype.org/content/repositories/releases/' }
maven { url = 'https://s01.oss.sonatype.org/content/repositories/snapshots/' }
}
dependencies {
compileOnly 'org.openjdk.nashorn:nashorn-core:15.6'
//noinspection GradlePackageUpdate
api 'commons-io:commons-io:2.18.0'
api 'net.dv8tion:JDA:5.2.2'
api 'org.apache.commons:commons-lang3:3.17.0'
api 'com.github.minndevelopment:jda-ktx:0.12.0'
api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$KOTLIN_VER"
//noinspection GradlePackageUpdate
api 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0'
//noinspection GradlePackageUpdate
api 'org.jetbrains.kotlinx:kotlinx-coroutines-reactor:1.9.0'
api 'io.github.dkim19375:dkimcore:1.5.0'
// api 'org.codehaus.groovy:groovy-jsr223:3.0.8'
// testImplementation "net.dv8tion:JDA:$JDA_VER"
testImplementation 'net.dv8tion:JDA:5.2.2'
testImplementation 'commons-io:commons-io:2.18.0'
testImplementation 'org.apache.commons:commons-lang3:3.17.0'
testImplementation 'com.github.minndevelopment:jda-ktx:0.12.0'
// testing libs
testImplementation "org.jetbrains.kotlin:kotlin-test:$KOTLIN_VER"
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.4'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.4'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.11.4'
testImplementation 'org.mockito.kotlin:mockito-kotlin:4.1.0'
}
tasks.register('dokkaHtmlJar', Jar.class) {
dependsOn(dokkaHtml)
from(dokkaHtml)
archiveClassifier.set("javadoc")
}
publishing {
repositories {
/* maven {
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = releasesRepoUrl
credentials {
it.username mavenUsername
it.password mavenPassword
}
}*/
}
def project = project
publications {
//noinspection GroovyAssignabilityCheck
mavenJava(MavenPublication) {
//noinspection GroovyAssignabilityCheck
groupId 'io.github.dkim19375'
//noinspection GroovyAssignabilityCheck
artifactId 'dkim19375jdautils'
version project.version
//noinspection GroovyAssignabilityCheck
from components.kotlin
//noinspection GroovyAssignabilityCheck
artifact kotlinSourcesJar
//noinspection GroovyAssignabilityCheck
artifact dokkaHtmlJar
pom {
//noinspection GroovyAssignabilityCheck
name = 'dkim19375JDAUtils'
//noinspection GroovyAssignabilityCheck
description = 'A kotlin library used to help JDA developers make bots either!'
//noinspection GroovyAssignabilityCheck
url = 'https://github.com/dkim19375/dkim19375JDAUtils'
//noinspection GroovyAssignabilityCheck
packaging = 'jar'
licenses {
license {
//noinspection GroovyAssignabilityCheck
name = 'MIT License'
//noinspection GroovyAssignabilityCheck
url = 'https://opensource.org/licenses/MIT'
}
}
developers {
developer {
//noinspection GroovyAssignabilityCheck
id = 'dkim19375'
}
}
scm {
//noinspection GroovyAssignabilityCheck
connection = 'scm:git:git://github.com/dkim19375/dkim19375JDAUtils.git'
//noinspection GroovyAssignabilityCheck
developerConnection = 'scm:git:ssh://github.com:dkim19375/dkim19375JDAUtils.git'
//noinspection GroovyAssignabilityCheck
url = 'https://github.com/dkim19375/dkim19375JDAUtils'
}
}
}
}
}
nexusPublishing {
packageGroup.set 'io.github.dkim19375'
repositories {
sonatype {
nexusUrl = uri 'https://s01.oss.sonatype.org/service/local/'
snapshotRepositoryUrl = uri 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
username = project.findProperty 'mavenUsername'
password = project.findProperty 'mavenPassword'
}
}
}
signing {
sign publishing.publications.mavenJava
}
tasks.jar.dependsOn licenseFormat