Skip to content

Commit

Permalink
Don't log Git output for rebuilds by default either (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla authored Dec 6, 2023
1 parent b356b4d commit f154896
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ open class AllTasks(
baseRef.set("base")

patchDir.set(extension.paper.spigotApiPatchDir)
printOutput.set(project.printRebuildPatchesOutput())
}

val rebuildServerPatches by tasks.registering<RebuildGitPatches> {
Expand All @@ -149,6 +150,7 @@ open class AllTasks(
baseRef.set("base")

patchDir.set(extension.paper.spigotServerPatchDir)
printOutput.set(project.printRebuildPatchesOutput())
}

@Suppress("unused")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import org.gradle.api.Task
const val PAPERWEIGHT_EXTENSION = "paperweight"
const val PAPERWEIGHT_DEBUG = "paperweight.debug"
const val PAPERWEIGHT_PRINT_APPLY_PATCHES_OUTPUT = "paperweight.printBaseExecutionApplyPatchesOutput"
const val PAPERWEIGHT_PRINT_REBUILD_PATCHES_OUTPUT = "paperweight.printRebuildPatchesOutput"

const val MC_LIBRARY_URL = "https://libraries.minecraft.net/"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ fun Project.printApplyPatchesOutput(): Provider<Boolean> {
}
}

fun Project.printRebuildPatchesOutput(): Provider<Boolean> {
return providers.gradleProperty(PAPERWEIGHT_PRINT_REBUILD_PATCHES_OUTPUT)
.map { it.toBoolean() }
.orElse(false)
}

val redirectThreadCount: AtomicLong = AtomicLong(0)

fun redirect(input: InputStream, out: OutputStream): CompletableFuture<Unit> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ class PaperweightPatcher : Plugin<Project> {
patchDir.convention(config.patchDir)
inputDir.convention(config.outputDir)
baseRef.convention("base")
printOutput.set(project.printRebuildPatchesOutput())
}

rebuildPatches {
Expand Down

0 comments on commit f154896

Please sign in to comment.