-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
113 lines (98 loc) · 3.04 KB
/
build.gradle
File metadata and controls
113 lines (98 loc) · 3.04 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
105
106
107
108
109
110
111
112
113
plugins {
id("java")
id("maven-publish")
id("com.gradleup.shadow") version "9.0.0-beta4"
id("io.papermc.paperweight.userdev") version "2.0.0-beta.8"
}
group = 'com.github.vermulst'
version = '0.2'
/*allprojects {
def computerName = System.getenv("COMPUTERNAME")
if (computerName != null) {
if (computerName.contentEquals("DESKTOP-K68G3D6")) {
layout.buildDirectory.set(file("D:/Minecraft/1.21_used/plugins"))
} else {
layout.buildDirectory.set(file("C:/Users/20233490/Desktop/1.21"))
}
}
}*/
repositories {
mavenCentral()
maven {
name = "papermc-repo"
url = "https://repo.papermc.io/repository/maven-public/"
}
}
dependencies {
paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")
implementation 'org.xerial:sqlite-jdbc:3.46.1.0'
}
def targetJavaVersion = 21
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
}
tasks.withType(JavaCompile).configureEach {
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
options.release = targetJavaVersion
}
}
processResources {
def props = [version: version]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('paper-plugin.yml') {
expand props
}
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact(tasks.named("shadowJar").get()) { // Correctly refers to the shadowJar task
classifier = null
}
pom {
name.set(project.name)
description.set("An SQLite library")
url.set("https://github.com/vermulst/VSQlite")
developers {
developer {
name.set("vermulst")
}
}
scm {
connection.set("scm:git:https://github.com/vermulst/VSQlite.git")
developerConnection.set("scm:git:ssh://git@github.com:vermulst/VSQlite.git")
url.set("https://github.com/vermulst/VSQlite")
}
}
}
}
repositories {
maven {
url "https://jitpack.io"
}
}
}
tasks.named('shadowJar') {
/*archiveBaseName.set("${project.name}-${project.version}")
archiveClassifier.set('')
archiveVersion.set('')*/
relocate("org.xerial", "me.vermulst.vermulstutils.dependencies.xerial")
finalizedBy('reobfJar'//, 'cleanFolders'
)
}
/*tasks.register('cleanFolders', Delete) {
delete layout.buildDirectory.dir("libs")
delete layout.buildDirectory.dir("classes")
delete layout.buildDirectory.dir("generated")
delete layout.buildDirectory.dir("resources")
delete layout.buildDirectory.dir("tmp")
}*/