Skip to content

Commit 80a47a6

Browse files
committed
Enable gradle configuration cache
1 parent d827e7b commit 80a47a6

File tree

6 files changed

+24
-15
lines changed

6 files changed

+24
-15
lines changed

Agent/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id "java"
33
id "base.base-conventions"
44
id "base.application-conventions"
5-
id "net.lenni0451.repackager" version "1.0.0"
5+
id "net.lenni0451.repackager" version "1.0.1"
66
}
77

88
dependencies {

build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@ plugins {
33
}
44

55
dependencies {
6-
implementation "net.raphimc:ViaProxy:3.4.2-SNAPSHOT"
6+
implementation("net.raphimc:ViaProxy:3.4.1") {
7+
transitive = false
8+
}
79
}

buildSrc/src/main/groovy/base.base-conventions.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ tasks.withType(JavaCompile).configureEach {
2323

2424
tasks.withType(Javadoc).configureEach {
2525
it.options.encoding = "UTF-8"
26+
it.options.addStringOption("Xdoclint:none", "-quiet")
2627
}

buildSrc/src/main/groovy/viaproxy.plugin-conventions.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ repositories {
1515
processResources {
1616
inputs.property("version", project.version)
1717

18+
def projectVersion = project.version
1819
filesMatching("viaproxy.yml") {
19-
expand("version": project.version)
20+
expand("version": projectVersion)
2021
}
2122
}

buildSrc/src/main/groovy/viaproxy.run-with-viaproxy-task.gradle

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,26 @@ plugins {
22
id "base.exclude-run-folder"
33
}
44

5-
tasks.register("runViaProxy", JavaExec) {
5+
def prepareTask = tasks.register("prepareViaProxyFiles", Copy) {
66
dependsOn(tasks.jar)
77

8+
def projectName = project.name
9+
from(tasks.jar.archiveFile)
10+
into(file("run/plugins"))
11+
rename { "${projectName}.jar" }
12+
}
13+
14+
def cleanupTask = tasks.register("cleanupViaProxyFiles", Delete) {
15+
delete(file("run/plugins/${project.name}.jar"))
16+
delete(file("run/logs"))
17+
}
18+
19+
tasks.register("runViaProxy", JavaExec) {
20+
dependsOn(prepareTask)
21+
finalizedBy(cleanupTask)
22+
823
mainClass = "net.raphimc.viaproxy.ViaProxy"
924
classpath = sourceSets.main.compileClasspath
1025
workingDir = file("run")
1126
jvmArgs = ["-DskipUpdateCheck"]
12-
13-
doFirst {
14-
def pluginsDir = file("$workingDir/plugins")
15-
pluginsDir.mkdirs()
16-
file("$pluginsDir/${project.name}.jar").bytes = tasks.jar.archiveFile.get().asFile.bytes
17-
}
18-
19-
doLast {
20-
file("$workingDir/plugins/${project.name}.jar").delete()
21-
file("$workingDir/logs").deleteDir()
22-
}
2327
}

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
org.gradle.daemon=true
22
org.gradle.parallel=true
3+
org.gradle.configuration-cache=true
34

45
java_version=17
56
maven_group=net.raphimc

0 commit comments

Comments
 (0)