-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
179 lines (154 loc) · 5.8 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
174
175
176
177
178
179
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
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'
id 'org.jetbrains.kotlin.plugin.serialization' version '1.9.25'
}
//noinspection GroovyUnusedAssignment
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
compileJava.options.encoding 'UTF-8'
group 'me.dkim19375'
version '1.5.0'
//noinspection GrUnresolvedAccess
compileKotlin.compilerOptions {
languageVersion = KotlinVersion.KOTLIN_1_8
jvmTarget = JvmTarget.JVM_1_8
}
//noinspection GrUnresolvedAccess
compileTestKotlin.compilerOptions {
languageVersion = KotlinVersion.KOTLIN_1_8
jvmTarget = JvmTarget.JVM_1_8
}
license {
header = rootProject.file 'LICENSE'
skipExistingHeaders = true
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/' }
}
dependencies {
compileOnly 'com.charleskorn.kaml:kaml:0.59.0'
compileOnly 'org.jetbrains.kotlin:kotlin-reflect:1.9.25'
compileOnly 'me.mattstudios:triumph-config:1.0.5-SNAPSHOT'
api 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.25'
//noinspection GradlePackageUpdate
api('org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0') {
exclude group: 'org.jetbrains.kotlin'
}
//noinspection GradlePackageUpdate
api('org.jetbrains.kotlinx:kotlinx-coroutines-reactor:1.9.0') {
exclude group: 'org.jetbrains.kotlin'
exclude module: 'kotlinx-coroutines-core'
}
// optional dependencies
//noinspection GradlePackageUpdate
compileOnly 'commons-io:commons-io:2.17.0'
compileOnly 'com.google.code.gson:gson:2.11.0'
compileOnly 'org.apache.commons:commons-text:1.12.0'
compileOnly 'org.apache.commons:commons-lang3:3.17.0'
// testing libs
testImplementation 'commons-io:commons-io:2.17.0'
testImplementation 'com.charleskorn.kaml:kaml:0.59.0'
testImplementation 'org.apache.commons:commons-lang3:3.17.0'
testImplementation 'org.jetbrains.kotlin:kotlin-reflect:1.9.25'
testImplementation 'me.mattstudios:triumph-config:1.0.5-SNAPSHOT'
testImplementation 'com.google.code.gson:gson:2.11.0'
testImplementation 'org.jetbrains.kotlin:kotlin-test:1.9.25'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.3'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.3'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.11.3'
testImplementation 'org.mockito.kotlin:mockito-kotlin:5.4.0'
}
tasks.register('dokkaHtmlJar', Jar.class) {
dependsOn(dokkaHtml)
from(dokkaHtml)
archiveClassifier.set("javadoc")
}
/*task sourcesJar(type: Jar) {
classifier 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar) {
from dokkaJavadoc
classifier 'javadoc'
}*/
publishing {
final project = project
publications {
//noinspection GroovyAssignabilityCheck
mavenJava(MavenPublication) {
//noinspection GroovyAssignabilityCheck
groupId 'io.github.dkim19375'
//noinspection GroovyAssignabilityCheck
artifactId 'dkimcore'
version project.version
//noinspection GroovyAssignabilityCheck
from components.kotlin
//noinspection GroovyAssignabilityCheck
artifact kotlinSourcesJar
//noinspection GroovyAssignabilityCheck
artifact dokkaHtmlJar
pom {
//noinspection GroovyAssignabilityCheck
name = 'DkimCore'
//noinspection GroovyAssignabilityCheck
description = 'A library for some utilities made in kotlin!'
//noinspection GroovyAssignabilityCheck
url = 'https://github.com/dkim19375/DkimCore'
//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/DkimCore.git'
//noinspection GroovyAssignabilityCheck
developerConnection = 'scm:git:ssh://github.com:dkim19375/DkimCore.git'
//noinspection GroovyAssignabilityCheck
url = 'https://github.com/dkim19375/DkimCore'
}
}
}
}
}
nexusPublishing {
//noinspection GrUnresolvedAccess
packageGroup.set 'io.github.dkim19375'
repositories {
//noinspection GrUnresolvedAccess
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