mirror of
https://github.com/funkemunky/AntiVPN.git
synced 2026-05-31 01:21:55 +00:00
70 lines
2.0 KiB
Groovy
70 lines
2.0 KiB
Groovy
plugins {
|
|
id 'com.gradleup.shadow'
|
|
id 'xyz.jpenilla.run-velocity'
|
|
}
|
|
|
|
evaluationDependsOn(':Velocity:VelocityPlugin')
|
|
|
|
dependencies {
|
|
compileOnly 'com.velocitypowered:velocity-api:3.4.0-SNAPSHOT'
|
|
compileOnly project(':Velocity:VelocityPlugin')
|
|
implementation project(':Common:loader-utils')
|
|
implementation 'org.bstats:bstats-velocity:2.2.1'
|
|
}
|
|
|
|
tasks.processResources {
|
|
filesMatching('velocity-plugin.json') {
|
|
expand(projectVersion: project.version)
|
|
}
|
|
}
|
|
|
|
shadowJar {
|
|
archiveClassifier.set('')
|
|
|
|
// Include the shaded plugin jar as a single resource file
|
|
from(project(':Velocity:VelocityPlugin').tasks.shadowJar) {
|
|
rename { 'antivpn-velocity.jarinjar' }
|
|
}
|
|
|
|
// Include the shared shaded source jar required by JarInJarClassLoader.
|
|
from(project(':Common:Source').tasks.named('shadowJar')) {
|
|
rename { 'antivpn-source.jarinjar' }
|
|
}
|
|
|
|
relocate 'org.bstats', 'dev.brighten.antivpn.velocity.org.bstats'
|
|
relocate 'org.yaml.snakeyaml', 'dev.brighten.antivpn.shaded.org.yaml.snakeyaml'
|
|
}
|
|
|
|
tasks.named('shadowJar') {
|
|
dependsOn(':Common:Source:shadowJar')
|
|
dependsOn(':Velocity:VelocityPlugin:shadowJar')
|
|
}
|
|
|
|
tasks.build.dependsOn shadowJar
|
|
|
|
tasks.named('runVelocity') {
|
|
velocityVersion('3.4.0-SNAPSHOT')
|
|
runDirectory.set(rootProject.layout.projectDirectory.dir('run/velocity'))
|
|
pluginJars.from(tasks.named('shadowJar'))
|
|
dependsOn(tasks.named('shadowJar'))
|
|
}
|
|
|
|
tasks.register('debugVelocity', xyz.jpenilla.runvelocity.task.RunVelocity) {
|
|
group = 'Run Velocity'
|
|
description = 'Run a local Velocity proxy for plugin debugging on port 5005.'
|
|
velocityVersion('3.4.0-SNAPSHOT')
|
|
runDirectory.set(rootProject.layout.projectDirectory.dir('run/velocity'))
|
|
pluginJars.from(tasks.named('shadowJar'))
|
|
dependsOn(tasks.named('shadowJar'))
|
|
debugOptions {
|
|
enabled = true
|
|
port = 5005
|
|
server = true
|
|
suspend = true
|
|
}
|
|
}
|
|
|
|
jar {
|
|
archiveClassifier.set('raw')
|
|
}
|