File tree Expand file tree Collapse file tree 3 files changed +22
-14
lines changed
plugins/build-plugin/src/main/kotlin/com/powersync/compile Expand file tree Collapse file tree 3 files changed +22
-14
lines changed Original file line number Diff line number Diff line change 11kotlin.code.style =official
22xcodeproj =./iosApp
33android.useAndroidX =true
4+ org.gradle.caching =true
45org.gradle.jvmargs =-Xmx3g
56org.jetbrains.compose.experimental.jscanvas.enabled =true
67org.jetbrains.compose.experimental.macos.enabled =true
Original file line number Diff line number Diff line change @@ -2,21 +2,33 @@ package com.powersync.compile
22
33import org.gradle.api.file.Directory
44import org.gradle.api.file.DirectoryProperty
5+ import org.gradle.api.file.FileTree
56import org.gradle.api.provider.Provider
67import org.gradle.api.tasks.CacheableTask
78import org.gradle.api.tasks.Copy
89import org.gradle.api.tasks.OutputDirectory
910
1011/* *
11- * A cacheable [Copy] task providing typed providers for the emitted [sqlite3C] and [sqlite3H]
12- * files, making them easier to access in other tasks.
12+ * A cacheable [Copy] task providing a typed provider for the output directory.
1313 */
1414@CacheableTask
1515abstract class UnzipSqlite : Copy () {
1616 @get:OutputDirectory
1717 abstract val destination: DirectoryProperty
1818
19- fun intoDirectory (dir : Provider <Directory >) {
19+ fun unzipSqlite (src : FileTree , dir : Provider <Directory >) {
20+ from(
21+ src.matching {
22+ include(" */sqlite3.*" )
23+ exclude {
24+ it.isDirectory
25+ }
26+ eachFile {
27+ this .path = this .name
28+ }
29+ },
30+ )
31+
2032 into(dir)
2133 destination.set(dir)
2234 }
Original file line number Diff line number Diff line change @@ -28,18 +28,13 @@ val downloadSQLiteSources by tasks.registering(Download::class) {
2828}
2929
3030val unzipSQLiteSources by tasks.registering(UnzipSqlite ::class ) {
31- from(
32- zipTree(downloadSQLiteSources.map { it.outputs.files.singleFile }).matching {
33- include(" */sqlite3.*" )
34- exclude {
35- it.isDirectory
36- }
37- eachFile {
38- this .path = this .name
39- }
40- },
31+ val zip = downloadSQLiteSources.map { it.outputs.files.singleFile }
32+ inputs.file(zip)
33+
34+ unzipSqlite(
35+ src = zipTree(zip),
36+ dir = layout.buildDirectory.dir(" downloads/sqlite3" )
4137 )
42- intoDirectory(layout.buildDirectory.dir(" downloads/sqlite3" ))
4338}
4439
4540// Obtain host and platform manager from Kotlin multiplatform plugin. They're supposed to be
You can’t perform that action at this time.
0 commit comments