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 configuration cache issues #2607
Conversation
fileOperations.clearDirs(outputDir) | ||
|
||
for (file in skikoRuntimeFiles.files) { | ||
if (file.name.endsWith(".jar", ignoreCase = true)) { | ||
unpackJar(file) | ||
} | ||
} | ||
} | ||
|
||
private fun unpackSkikoRuntime(skikoVersion: String) { | ||
val skikoRuntimeConfig = project.configurations.detachedConfiguration( | ||
project.dependencies.create("org.jetbrains.skiko:skiko-js-wasm-runtime:$skikoVersion") | ||
) | ||
|
||
for (file in skikoRuntimeConfig.resolve()) { | ||
if (file.name.endsWith(".jar", ignoreCase = true)) { | ||
project.copy { copySpec -> | ||
copySpec.from(project.zipTree(file)) | ||
copySpec.into(outputDir) | ||
} | ||
} | ||
private fun unpackJar(file: File) { | ||
fileOperations.copy { copySpec -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this used sync()
instead of copy()
, then there's no need for fileOperations.clearDirs(outputDir)
- Gradle will automatically create task directory properties tagged
@OutputDirectories
- Sync will automatically delete old files
And then the new util file, gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/internal/utils/fileUtils.kt
, isn't needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked on local builds, it works well. But GitHub Actions tests are failed.
fea322c
to
2f1203c
Compare
No description provided.