-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
52 lines (44 loc) · 1.29 KB
/
build.gradle.kts
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
plugins {
java
`maven-publish`
}
group = "com.oskarmc"
version = "1.0.0-SNAPSHOT"
publishing {
publications {
create<MavenPublication>("maven") {
groupId = project.group as String?
artifactId = project.name
version = project.version as String?
from(components["java"])
}
}
repositories {
maven {
val releasesRepoUrl = uri("https://repository.oskarsmc.com/releases")
val snapshotsRepoUrl = uri("https://repository.oskarsmc.com/snapshots")
url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_SECRET")
}
}
}
}
java {
withJavadocJar()
withSourcesJar()
}
repositories {
mavenCentral()
}
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.1")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.1")
testRuntimeOnly("net.kyori:adventure-text-serializer-gson:4.9.3")
implementation("net.kyori:adventure-api:4.9.3")
implementation("net.kyori:adventure-text-serializer-plain:4.9.3")
}
tasks.getByName<Test>("test") {
useJUnitPlatform()
}