11plugins {
2- id " java-library"
3- id " idea"
4- }
5-
6- base {
7- java. toolchain. languageVersion = JavaLanguageVersion . of(21 )
8- compileJava. options. encoding = compileTestJava. options. encoding = javadoc. options. encoding = " UTF-8"
9-
10- group = project. maven_group ?: rootProject. maven_group
11- archivesName = project. maven_name ?: rootProject. maven_name
12- version = project. maven_version ?: rootProject. maven_version
13- }
14-
15- configurations {
16- include
17-
18- implementation. extendsFrom include
19- api. extendsFrom include
2+ id " viaproxy.plugin-conventions"
203}
214
225repositories {
23- mavenCentral()
24- maven {
25- name = " ViaVersion"
26- url = " https://repo.viaversion.com"
27- }
28- maven {
29- name = " Lenni0451"
30- url = " https://maven.lenni0451.net/everything"
31- }
326 maven {
337 name = " DirtPowered Releases"
348 url = " https://repo.mzga.dev/releases"
@@ -48,59 +22,7 @@ repositories {
4822}
4923
5024dependencies {
51- implementation " net.raphimc:ViaProxy:3.3.7 "
25+ implementation " net.raphimc:ViaProxy:3.4.1 "
5226
5327 include " dev.mzga:Beta2Release:1.0.6-SNAPSHOT"
5428}
55-
56- processResources {
57- inputs. property " version" , project. version
58-
59- filesMatching(" viaproxy.yml" ) {
60- expand " version" : project. version
61- }
62- }
63-
64- jar {
65- dependsOn configurations. include
66- from {
67- duplicatesStrategy = DuplicatesStrategy . EXCLUDE
68- configurations. include. collect {
69- zipTree(it)
70- }
71- } {
72- exclude " META-INF/*.RSA" , " META-INF/*.SF" , " META-INF/*.DSA" , " io/netty/" , " org/apache/logging/"
73- }
74-
75- from(" LICENSE" ) {
76- rename { " ${ it} _${ project.name ?: rootProject.name} " }
77- }
78- }
79-
80- idea {
81- module {
82- [" run" ]. each {
83- excludeDirs << file(" $it " )
84- }
85- }
86- }
87-
88- tasks. register(" runViaProxy" , JavaExec ) {
89- dependsOn tasks. jar
90-
91- mainClass = " net.raphimc.viaproxy.ViaProxy"
92- classpath = sourceSets. main. compileClasspath
93- workingDir = file(" run" )
94- jvmArgs = [" -DskipUpdateCheck" ]
95-
96- doFirst {
97- def pluginsDir = file(" $workingDir /plugins" )
98- pluginsDir. mkdirs()
99- file(" $pluginsDir /${ project.name} .jar" ). bytes = tasks. jar. archiveFile. get(). asFile. bytes
100- }
101-
102- doLast {
103- file(" $workingDir /plugins/${ project.name} .jar" ). delete()
104- file(" $workingDir /logs" ). deleteDir()
105- }
106- }
0 commit comments