Skip to content

Commit

Permalink
Use global directory to download wix toolset (#2639)
Browse files Browse the repository at this point in the history
* Use global directory to download wix toolset

Resolves #2592
  • Loading branch information
AlexeyTsvetkov committed Jan 16, 2023
1 parent c372634 commit e2aba37
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion gradle-plugins/compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand All @@ -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") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit e2aba37

Please sign in to comment.