Skip to content

Commit da74de0

Browse files
committed
feat: we resolved problem temporary
1 parent f15fad0 commit da74de0

3 files changed

Lines changed: 27 additions & 20 deletions

File tree

build.gradle.kts

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
import de.undercouch.gradle.tasks.download.Download
2+
import de.undercouch.gradle.tasks.download.Verify
3+
14
plugins {
25
`java-library`
36
`maven-publish`
47
alias(libs.plugins.shadow)
58
alias(libs.plugins.runPaper)
69
alias(libs.plugins.lombok)
10+
alias(libs.plugins.download)
711
}
812

913
val targetJavaVersion = 17
@@ -31,12 +35,12 @@ dependencies {
3135
compileOnly(libs.worldeditCore)
3236
compileOnly(libs.placeholderApi)
3337
compileOnly(libs.worldguardBukkit)
34-
compileOnly(libs.crackshot)
3538
compileOnly(libs.playerSettings)
3639
compileOnly(libs.kdStatusReloaded)
3740
compileOnly(libs.essentialsx)
3841
compileOnly(libs.nameChangeAutomation)
3942
compileOnly(libs.luckpermsApi)
43+
compileOnly(fileTree("libs/"))
4044

4145
implementation(libs.hikaricp)
4246
implementation(libs.mysqlConnectorJ)
@@ -60,28 +64,26 @@ java {
6064
}
6165
}
6266

63-
tasks {
64-
jar {
65-
dependsOn(shadowJar)
66-
}
67-
68-
compileJava {
69-
options.encoding = "UTF-8"
70-
}
67+
val libsDir = layout.projectDirectory.dir("libs")
68+
val crackShotJar = libsDir.file("Crackshot.jar")
7169

72-
javadoc {
73-
options.encoding = "UTF-8"
74-
}
70+
tasks {
71+
val downloadFile =
72+
register<Download>("downloadFile") {
73+
src("https://mediafilez.forgecdn.net/files/3151/915/CrackShot.jar")
74+
dest(crackShotJar)
75+
overwrite(false)
76+
}
7577

76-
shadowJar {
77-
mergeServiceFiles()
78-
enableAutoRelocation = true
79-
relocationPrefix = "net.azisaba.lgw.leongunwar.libs"
80-
}
81-
}
78+
val verifyFile =
79+
register<Verify>("verifyFile") {
80+
src(crackShotJar)
81+
algorithm("SHA-256")
82+
checksum("8bb80635778a88521ca6d1ab8ce42bfec67174953967abf849dd231be16c7963")
83+
dependsOn(downloadFile)
84+
}
8285

83-
tasks {
84-
build {
86+
jar {
8587
dependsOn(shadowJar)
8688
}
8789

@@ -133,6 +135,8 @@ tasks {
133135
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible) {
134136
options.release.set(targetJavaVersion)
135137
}
138+
139+
dependsOn(verifyFile)
136140
}
137141

138142
javadoc {

gradle/libs.versions.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
shadow = "9.1.0"
77
runPaper = "3.0.0"
88
lombok = "8.14.2"
9+
download = "5.6.0"
910

1011
# library
1112
paperApi = "1.16.5-R0.1-SNAPSHOT"
@@ -31,6 +32,7 @@ junit = "5.13.4"
3132
shadow = { id = "com.gradleup.shadow", version.ref = "shadow" }
3233
runPaper = { id = "xyz.jpenilla.run-paper", version.ref = "runPaper" }
3334
lombok = { id = "io.freefair.lombok", version.ref = "lombok" }
35+
download = { id = "de.undercouch.download", version.ref = "download" }
3436

3537
[libraries]
3638
# system

libs/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.jar

0 commit comments

Comments
 (0)