-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
106 lines (84 loc) · 2.81 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
106 lines (84 loc) · 2.81 KB
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
import java.net.URI
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
id("java")
id("java-library")
id("maven-publish")
id("io.github.goooler.shadow") version "8.1.8"
}
group = "de.varilx"
version = project.property("project_version") as String
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
}
dependencies {
// Hibernate and Jakarta
implementation("jakarta.persistence:jakarta.persistence-api:3.2.0")
implementation("org.hibernate:hibernate-core:7.0.0.Final")
implementation("org.hibernate.orm:hibernate-community-dialects:7.0.7.Final")
testImplementation("org.hibernate.orm:hibernate-community-dialects:7.0.7.Final")
// SQLite
implementation("org.xerial:sqlite-jdbc:3.50.3.0")
testImplementation("org.xerial:sqlite-jdbc:3.50.3.0")
// PaperMC API
compileOnly("io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT")
testImplementation("io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT")
// Reflections
implementation("org.reflections:reflections:0.10.2")
// Lombok
implementation("org.projectlombok:lombok:1.18.38")
annotationProcessor("org.projectlombok:lombok:1.18.38")
compileOnly("org.projectlombok:lombok:1.18.38")
testImplementation("org.projectlombok:lombok:1.18.38")
testAnnotationProcessor("org.projectlombok:lombok:1.18.38")
// JetBrains Annotations
implementation("org.jetbrains:annotations:26.0.2")
// JUnit and SLF4J for testing
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.13.4")
testImplementation("org.junit.platform:junit-platform-launcher:1.13.4")
testImplementation("org.slf4j:slf4j-jdk14:2.0.17")
testImplementation("org.assertj:assertj-core:3.27.3")
}
tasks.withType<Test> {
useJUnitPlatform()
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
tasks.named<ShadowJar>("shadowJar") {
archiveClassifier.set("")
}
tasks.register<Jar>("sourcesJar") {
archiveClassifier.set("sources")
from(sourceSets.main.get().allJava)
}
tasks.withType<Test> {
useJUnitPlatform()
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
publishing {
repositories {
maven {
name = "Reposilite"
url = URI("https://reposilite.varilx.de/Varilx")
credentials {
username = "Dario"
password = System.getenv("REPOSILITE_TOKEN")
}
}
}
publications {
register<MavenPublication>("gpr") {
groupId = "$group"
version = version
artifact(tasks.named<ShadowJar>("shadowJar").get())
artifact(tasks.named<Jar>("sourcesJar").get())
}
}
}
tasks.named("publishGprPublicationToReposiliteRepository") {
dependsOn(tasks.named("jar"))
}