Encountered when a applyPatches is executed - 'Caching has not been enabled for the task'
I want to use Papewit to write a server similar to Pepper, but I get an error - 'Rub Hasnott Byan Enablid Forttosk'
Gradle buildscript. ` import org.gradle.api.tasks.testing.logging.TestExceptionFormat import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins { java id("io.papermc.paperweight.core") version "1.7.1" }
val paperMavenUrl = "https://repo.papermc.io/repository/maven-public/"
allprojects { apply(plugin = "java")
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
repositories {
run {
mavenCentral()
mavenLocal()
google()
}
run {
maven("https://maven.aliyun.com/repository/public/") {
name = "aliyun"
}
maven("https://mirrors.cloud.tencent.com/nexus/repository/maven-public/") {
name = "tencent"
}
}
}
}
val spigotDecompiler: Configuration by configurations.creating
repositories { mavenLocal() mavenCentral() maven(paperMavenUrl) { content { onlyForConfigurations( configurations.paperclip.name, spigotDecompiler.name, ) } } }
dependencies { paramMappings("net.fabricmc:yarn:1.21.1+build.3:mergedv2") remapper("net.fabricmc:tiny-remapper:0.10.3:fat") decompiler("org.vineflower:vineflower:1.10.1") spigotDecompiler("io.papermc:patched-spigot-fernflower:0.1+build.13") paperclip("io.papermc:paperclip:3.0.3") }
subprojects { tasks.withType<JavaCompile> { options.encoding = Charsets.UTF_8.name() options.release = 21 } tasks.withType<Javadoc> { options.encoding = Charsets.UTF_8.name() } tasks.withType<ProcessResources> { filteringCharset = Charsets.UTF_8.name() } tasks.withType<Test> { testLogging { showStackTraces = true exceptionFormat = TestExceptionFormat.FULL events(TestLogEvent.STANDARD_OUT) } }
repositories {
mavenCentral()
maven(paperMavenUrl)
}
}
paperweight { minecraftVersion = providers.gradleProperty("mcVersion") serverProject = project(":luakion-server")
paramMappingsRepo = paperMavenUrl
remapRepo.set("https://maven.fabricmc.net/")
decompileRepo.set("https://maven.quiltmc.org/")
craftBukkit {
fernFlowerJar = layout.file(spigotDecompiler.elements.map { it.single().asFile })
}
workDir.set(layout.projectDirectory.file("work").asFile)
paper {
spigotApiPatchDir.set(layout.projectDirectory.dir("patches/api"))
spigotServerPatchDir.set(layout.projectDirectory.dir("patches/server"))
mappingsPatch.set(layout.projectDirectory.file("build-data/mappings-patch.tiny"))
reobfMappingsPatch.set(layout.projectDirectory.file("build-data/reobf-mappings-patch.tiny"))
reobfPackagesToFix.addAll(
"com.mojang",
"net.minecraft",
"org.bukkit.craftbukkit",
"org.spigotmc",
)
}
}
tasks.generateDevelopmentBundle { apiCoordinates.set("me.luakionmc.luakion:luakion-api") libraryRepositories.addAll( "https://repo.maven.apache.org/maven2/", paperMavenUrl, ) } `
log ` The client will now receive all logging from the daemon (pid: 5508). The daemon log file: C:\Users\15738.gradle\daemon\8.8\daemon-5508.out.log Starting 23rd build in daemon [uptime: 58 mins 50.865 secs, performance: 100%, GC rate: 0.00/s, heap usage: 0% of 512 MiB, non-heap usage: 41% of 384 MiB] Using 8 worker leases. Watching the file system is configured to be disabled File system watching is inactive Starting Build Transforming foojay-resolver-0.8.0.jar (org.gradle.toolchains:foojay-resolver:0.8.0) with InstrumentationAnalysisTransform Transforming gson-2.10.1.jar (com.google.code.gson:gson:2.10.1) with InstrumentationAnalysisTransform Transforming foojay-resolver-0.8.0.jar (org.gradle.toolchains:foojay-resolver:0.8.0) with InstrumentationAnalysisTransform Transforming foojay-resolver-0.8.0.jar (org.gradle.toolchains:foojay-resolver:0.8.0) with MergeInstrumentationAnalysisTransform Transforming gson-2.10.1.jar (com.google.code.gson:gson:2.10.1) with InstrumentationAnalysisTransform Transforming gson-2.10.1.jar (com.google.code.gson:gson:2.10.1) with MergeInstrumentationAnalysisTransform Transforming foojay-resolver-0.8.0.jar (org.gradle.toolchains:foojay-resolver:0.8.0) with ExternalDependencyInstrumentingArtifactTransform Transforming gson-2.10.1.jar (com.google.code.gson:gson:2.10.1) with ExternalDependencyInstrumentingArtifactTransform Settings evaluated using settings file 'D:\luakion\settings.gradle.kts'. Using local directory build cache for the root build (location = C:\Users\15738.gradle\caches\build-cache-1, removeUnusedEntriesAfter = 7 days). Projects loaded. Root project using build file 'D:\luakion\build.gradle.kts'. Included projects: [root project 'luakion', project ':luakion-api', project ':luakion-server']
Configure project : Evaluating root project 'luakion' using build file 'D:\luakion\build.gradle.kts'. Transforming paperweight-core-1.7.1.jar (io.papermc.paperweight:paperweight-core:1.7.1) with InstrumentationAnalysisTransform Transforming paperweight-core-1.7.1.jar (io.papermc.paperweight:paperweight-core:1.7.1) with InstrumentationAnalysisTransform Transforming paperweight-core-1.7.1.jar (io.papermc.paperweight:paperweight-core:1.7.1) with MergeInstrumentationAnalysisTransform Transforming paperweight-core-1.7.1.jar (io.papermc.paperweight:paperweight-core:1.7.1) with ExternalDependencyInstrumentingArtifactTransform paperweight-core v1.7.1 (running on 'Windows 11')
Configure project :luakion-api Evaluating project ':luakion-api' using build file 'D:\luakion\Luakion-API\build.gradle'.
Configure project :luakion-server Evaluating project ':luakion-server' using build file 'D:\luakion\Luakion-Server\build.gradle'. All projects evaluated. Task name matched 'applyPatches' Selected primary task 'applyPatches' from project : Tasks to be executed: [task ':initSubmodules', task ':patchSpigotApiPatches', task ':patchSpigotApi', task ':applyApiPatches', task ':downloadMcManifest', task ':downloadMcVersionManifest', task ':downloadServerJar', task ':extractFromBundler', task ':addAdditionalSpigotMappings', task ':downloadMappings', task ':filterVanillaJar', task ':generateMappings', task ':generateSpigotMappings', task ':spigotRemapJar', task ':cleanupMappings', task ':patchMappings', task ':cleanupSourceMappings', task ':remapJar', task ':fixJar', task ':patchCraftBukkitPatches', task ':filterSpigotExcludes', task ':spigotDecompileJar', task ':patchCraftBukkit', task ':patchSpigotServerPatches', task ':patchSpigotServer', task ':patchSpigot', task ':downloadSpigotDependencies', task ':collectAtsFromPatches', task ':mergePaperAts', task ':remapSpigotSources', task ':remapGeneratedAt', task ':remapSpigotAt', task ':mergeGeneratedAts', task ':mergeAdditionalAts', task ':applyMergedAt', task ':copyResources', task ':decompileJar', task ':downloadMcLibrariesSources', task ':applyServerPatches', task ':applyPatches'] Tasks that were excluded: [] Resolve mutations for :initSubmodules (Thread[#813,Execution worker,5,main]) started. :initSubmodules (Thread[#813,Execution worker,5,main]) started.
Task :initSubmodules Caching disabled for task ':initSubmodules' because: Task is untracked because: Git tracks the state Task ':initSubmodules' is not up-to-date because: Task is untracked because: Git tracks the state Resolve mutations for :patchSpigotApiPatches (Thread[#813,Execution worker,5,main]) started. :patchSpigotApiPatches (Thread[#813,Execution worker,5,main]) started.
Task :patchSpigotApiPatches UP-TO-DATE Build cache key for task ':patchSpigotApiPatches' is c7199b60103b28e09af5d0fb2bfcbb96 Skipping task ':patchSpigotApiPatches' as it is up-to-date. Resolve mutations for :patchSpigotApi (Thread[#813,Execution worker,5,main]) started. :patchSpigotApi (Thread[#813,Execution worker,5,main]) started.
Task :patchSpigotApi Caching disabled for task ':patchSpigotApi' because: Caching has not been enabled for the task Task ':patchSpigotApi' is not up-to-date because: Task has failed previously.
Task :patchSpigotApi FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.8/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. 3 actionable tasks: 2 executed, 1 up-to-date
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':patchSpigotApi'.
io.papermc.paperweight.PaperweightException: Command finished with 128 exit code: git -c commit.gpgsign=false -c core.safecrlf=false fetch upstream --prune
- Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights. Get more help at https://help.gradle.org.
BUILD FAILED in 9s `
the caching is not an issue, the issue is that git failed somehow
io.papermc.paperweight.PaperweightException: Command finished with 128 exit code: git -c commit.gpgsign=false -c core.safecrlf=false fetch upstream --prune
I can't really advise there at the current time, however. make sure that everything is in a git repo, etc
But everything is in the git repository and it still gives an error.
Then you'd need to work out why git failed
closing due to inactivity and this code path not existing in v2