Skip to content

Commit

Permalink
fix: Avoid re-downloading assets
Browse files Browse the repository at this point in the history
  • Loading branch information
phinner committed Jun 11, 2024
1 parent 841e6b3 commit 457673c
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.assign
import org.gradle.kotlin.dsl.register
import org.gradle.kotlin.dsl.withType

/**
* Base plugin that sets up the standard toxopid tasks for mod/plugin testing.
Expand Down Expand Up @@ -69,6 +70,12 @@ public class ToxopidBasePlugin : Plugin<Project> {
configureServer()
}

project.tasks.withType<GithubAssetDownload> {
onlyIf("Do not re-download if the asset already exists at the default location") {
output.isPresent || !output.asFile.get().exists()
}
}

project.afterEvaluate {
project.configurations.all {
resolutionStrategy.eachDependency {
Expand Down

0 comments on commit 457673c

Please sign in to comment.