Skip to content

Commit

Permalink
Include version in downloaded assets
Browse files Browse the repository at this point in the history
download-task doesn't handle cached files with changed URLs well[1], so
include the version in the saved file.

1. michel-kraemer/gradle-download-task#349
  • Loading branch information
dbnicholson committed Sep 23, 2023
1 parent 4d01e2d commit 766ec94
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ val appsBundleDirectory: Directory = layout.projectDirectory.dir("src/main/pytho

val downloadAppsBundleTask = tasks.register<Download>("downloadAppsBundle") {
src("https://github.com/endlessm/kolibri-explore-plugin/releases/download/v${exploreVersion}/apps-bundle.zip")
dest(layout.buildDirectory.file("download/apps-bundle.zip"))
dest(layout.buildDirectory.file("download/apps-bundle-${exploreVersion}.zip"))
onlyIfModified(true)
useETag(true)
}
Expand All @@ -127,7 +127,7 @@ val cleanAppsBundleTask = tasks.register<Delete>("cleanAppsBundle") {
// Download and extract loading-screen.zip into the build assets directory.
val downloadLoadingScreenTask = tasks.register<Download>("downloadLoadingScreen") {
src("https://github.com/endlessm/kolibri-explore-plugin/releases/download/v${exploreVersion}/loading-screen.zip")
dest(layout.buildDirectory.file("download/loading-screen.zip"))
dest(layout.buildDirectory.file("download/loading-screen-${exploreVersion}.zip"))
onlyIfModified(true)
useETag(true)
}
Expand Down Expand Up @@ -159,7 +159,7 @@ val collectionsDirectory: Directory = layout.projectDirectory.dir("src/main/pyth

val downloadCollectionsTask = tasks.register<Download>("downloadCollections") {
src("https://github.com/endlessm/endless-key-collections/releases/download/v${collectionsVersion}/collections.zip")
dest(layout.buildDirectory.file("download/collections.zip"))
dest(layout.buildDirectory.file("download/collections-${collectionsVersion}.zip"))
onlyIfModified(true)
useETag(true)
}
Expand Down

0 comments on commit 766ec94

Please sign in to comment.