-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
75 lines (64 loc) · 2.19 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import org.gradle.api.JavaVersion.VERSION_21
plugins {
java
alias(libs.plugins.paperweight.userdev)
alias(libs.plugins.maven.publish)
}
allprojects {
apply(plugin = "java-library")
apply(plugin = rootProject.libs.plugins.paperweight.userdev.get().pluginId)
group = "de.ole101.i18n"
version = "1.0.1"
description = "A small library for simplifying internationalization in Minecraft plugins"
repositories {
mavenCentral()
maven("https://oss.sonatype.org/content/groups/public/")
maven("https://jitpack.io")
}
dependencies {
implementation(rootProject.libs.lombok)
annotationProcessor(rootProject.libs.lombok)
implementation(rootProject.libs.guice)
implementation(rootProject.libs.annotations)
paperweight.paperDevBundle("1.21.3-R0.1-SNAPSHOT")
}
tasks {
withType<JavaCompile>().configureEach {
sourceCompatibility = VERSION_21.toString()
targetCompatibility = VERSION_21.toString()
options.encoding = "UTF-8"
}
test {
useJUnitPlatform()
}
named<Jar>("jar") {
archiveFileName.set("${rootProject.name}-${project.name}-${project.version}.jar")
}
val publishJar by creating(Jar::class) {
archiveFileName.set("${rootProject.name}-${project.name}-${project.version}.jar")
from(sourceSets.main.get().output)
}
}
}
publishing {
repositories {
maven {
name = "ole101"
val releasesRepoUrl = "https://repo.ole101.de/releases"
val snapshotsRepoUrl = "https://repo.ole101.de/snapshots"
url = uri(if (project.version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
credentials(PasswordCredentials::class)
authentication {
create<BasicAuthentication>("basic")
}
}
}
publications {
create<MavenPublication>("maven") {
groupId = "de.ole101"
artifactId = "i18n"
version = project.version as String
artifact(project(":api").tasks.named("publishJar").get())
}
}
}