-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
57 lines (45 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
53
54
55
plugins {
`java-library`
id("de.chojo.publishdata") version "1.2.5"
`maven-publish`
}
group = "de.snowii"
version = "1.1.0"
description = "Simple & User Friendly Java Mojang API"
repositories {
mavenCentral()
}
publishData {
useEldoNexusRepos(dev = false)
publishComponent("java")
}
dependencies {
implementation("com.google.code.gson:gson:2.11.0")
compileOnly("org.jetbrains:annotations:26.0.1")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.11.4")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.11.4")
}
java{
toolchain{
languageVersion.set(JavaLanguageVersion.of(17))
}
}
publishing {
publications.create<MavenPublication>("maven") {
// Configure our maven publication
publishData.configurePublication(this)
}
repositories {
maven {
authentication {
credentials(PasswordCredentials::class) {
// Those credentials need to be set under "Settings -> Secrets -> Actions" in your repository
username = System.getenv("NEXUS_USERNAME")
password = System.getenv("NEXUS_PASSWORD")
}
}
name = "EldoNexus"
setUrl(publishData.getRepository())
}
}
}