Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix eager tryGetSkikoRuntimeIfNeeded #4918

Merged
merged 2 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private fun registerConfigurePreviewTask(
) { previewTask ->
runtimeFiles.configureUsageBy(previewTask) { (runtimeJars, _) ->
previewClasspath = runtimeJars
skikoRuntime = tryGetSkikoRuntimeIfNeeded()
skikoRuntime.set(project.provider { tryGetSkikoRuntimeIfNeeded() })
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ abstract class AbstractConfigureDesktopPreviewTask : AbstractComposeDesktopTask(
internal lateinit var previewClasspath: FileCollection

@get:InputFiles
internal lateinit var skikoRuntime: FileCollection
internal abstract val skikoRuntime: Property<FileCollection>

@get:Internal
internal val javaHome: Property<String> = objects.notNullProperty<String>().apply {
Expand Down Expand Up @@ -58,10 +58,12 @@ abstract class AbstractConfigureDesktopPreviewTask : AbstractComposeDesktopTask(
javaExecutable = javaExecutable(javaHome.get()),
hostClasspath = hostClasspath.files.asSequence().pathString()
)

val skikoRuntimeFiles = skikoRuntime.get()
val previewClasspathString =
(previewClasspath.files.asSequence() +
uiTooling.files.asSequence() +
skikoRuntime.files.asSequence()
skikoRuntimeFiles.files.asSequence()
).pathString()

val gradleLogger = logger
Expand Down
Loading