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 1
1
kotlin.code.style =official
2
2
xcodeproj =./iosApp
3
3
android.useAndroidX =true
4
+ org.gradle.caching =true
4
5
org.gradle.jvmargs =-Xmx3g
5
6
org.jetbrains.compose.experimental.jscanvas.enabled =true
6
7
org.jetbrains.compose.experimental.macos.enabled =true
Original file line number Diff line number Diff line change @@ -2,21 +2,33 @@ package com.powersync.compile
2
2
3
3
import org.gradle.api.file.Directory
4
4
import org.gradle.api.file.DirectoryProperty
5
+ import org.gradle.api.file.FileTree
5
6
import org.gradle.api.provider.Provider
6
7
import org.gradle.api.tasks.CacheableTask
7
8
import org.gradle.api.tasks.Copy
8
9
import org.gradle.api.tasks.OutputDirectory
9
10
10
11
/* *
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.
13
13
*/
14
14
@CacheableTask
15
15
abstract class UnzipSqlite : Copy () {
16
16
@get:OutputDirectory
17
17
abstract val destination: DirectoryProperty
18
18
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
+
20
32
into(dir)
21
33
destination.set(dir)
22
34
}
Original file line number Diff line number Diff line change @@ -28,18 +28,13 @@ val downloadSQLiteSources by tasks.registering(Download::class) {
28
28
}
29
29
30
30
val 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" )
41
37
)
42
- intoDirectory(layout.buildDirectory.dir(" downloads/sqlite3" ))
43
38
}
44
39
45
40
// 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