Skip to content

Commit c9f3bce

Browse files
committed
fix: include compile dependencies when building the zip
1 parent 439750d commit c9f3bce

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

build.gradle.kts

+12-17
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,12 @@ val assemblePlugin by tasks.registering(Jar::class) {
8383

8484
val copyPlugin by tasks.creating(Sync::class.java) {
8585
dependsOn(assemblePlugin)
86+
fromCompileDependencies()
8687

88+
into(getPluginInstallDir())
89+
}
90+
91+
fun CopySpec.fromCompileDependencies() {
8792
from(assemblePlugin.get().outputs.files)
8893
from("src/main/resources") {
8994
include("extension.json")
@@ -105,8 +110,14 @@ val copyPlugin by tasks.creating(Sync::class.java) {
105110
}
106111
},
107112
)
113+
}
108114

109-
into(getPluginInstallDir())
115+
val pluginZip by tasks.creating(Zip::class) {
116+
dependsOn(assemblePlugin)
117+
118+
fromCompileDependencies()
119+
into(pluginId)
120+
archiveBaseName.set(pluginName)
110121
}
111122

112123
tasks.register("cleanAll", Delete::class.java) {
@@ -134,22 +145,6 @@ private fun getPluginInstallDir(): Path {
134145
return pluginsDir / pluginId
135146
}
136147

137-
val pluginZip by tasks.creating(Zip::class) {
138-
dependsOn(assemblePlugin)
139-
140-
from(assemblePlugin.get().outputs.files)
141-
from("src/main/resources") {
142-
include("extension.json")
143-
include("dependencies.json")
144-
}
145-
from("src/main/resources") {
146-
include("icon.svg")
147-
rename("icon.svg", "pluginIcon.svg")
148-
}
149-
into(pluginId)
150-
archiveBaseName.set(pluginName)
151-
}
152-
153148
val publishPlugin by tasks.creating {
154149
dependsOn(pluginZip)
155150

0 commit comments

Comments
 (0)