Use global directory to download wix toolset (#2639)

* Use global directory to download wix toolset

Resolves #2592
This commit is contained in:
Alexey Tsvetkov
2023-01-16 18:50:10 +01:00
committed by GitHub
parent c3726347ef
commit e2aba37e62
2 changed files with 6 additions and 4 deletions

View File

@@ -64,7 +64,7 @@ dependencies {
testImplementation(kotlin("gradle-plugin-api"))
// include relocated download task to avoid potential runtime conflicts
embedded("de.undercouch:gradle-download-task:4.1.1")
embedded("de.undercouch:gradle-download-task:5.3.0")
embedded("org.jetbrains.kotlinx:kotlinx-serialization-json:${BuildProperties.serializationVersion}")
embedded("org.jetbrains.kotlinx:kotlinx-serialization-core:${BuildProperties.serializationVersion}")
@@ -79,6 +79,7 @@ val shadow = tasks.named<ShadowJar>("shadowJar") {
archiveClassifier.set("shadow")
configurations = listOf(embeddedDependencies)
exclude("META-INF/gradle-plugins/de.undercouch.download.properties")
exclude("META-INF/versions/**")
}
val jar = tasks.named<Jar>("jar") {

View File

@@ -34,9 +34,10 @@ internal fun JvmApplicationContext.configureWix() {
if (project.findProperty(DOWNLOAD_WIX_PROPERTY) == "false") return
val root = project.rootProject
val wixDir = root.buildDir.resolve("wixToolset")
val zipFile = wixDir.resolve("wix311.zip")
val unzipDir = wixDir.resolve("unpacked")
val wixDir = project.gradle.gradleUserHomeDir.resolve("compose-jb")
val fileName = "wix311"
val zipFile = wixDir.resolve("$fileName.zip")
val unzipDir = root.projectDir.resolve(fileName)
val download = root.tasks.maybeCreate(DOWNLOAD_WIX_TOOLSET_TASK_NAME, Download::class.java).apply {
onlyIf { !zipFile.isFile }
src("https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip")