Skip to content

Commit 8ed38ab

Browse files
committed
impl: zip task like in the sample plugin
- the existing pluginZip implementation which is now renamed to pluginPrettyZip is producing an artifact suited for manual local deployment. The structure differ from the sample in the following ways: - zip name is: coder-toolbox-0.1.0.zip instead of com.coder.toolbox-0.1.0.zip - the zip contains a root folder named com.coder.toolbox that can be easily deployed in Toolbox plugin location - with this patch, pluginZip is copying what the Toolbox sample does.
1 parent b1fd0f8 commit 8ed38ab

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

build.gradle.kts

+12-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,10 @@ fun CopySpec.fromCompileDependencies() {
155155
)
156156
}
157157

158-
val pluginZip by tasks.creating(Zip::class) {
158+
/**
159+
* Useful when doing manual local install.
160+
*/
161+
val pluginPrettyZip by tasks.creating(Zip::class) {
159162
archiveBaseName.set(properties("name"))
160163
dependsOn(tasks.jar)
161164
dependsOn(tasks.getByName("generateLicenseReport"))
@@ -164,6 +167,14 @@ val pluginZip by tasks.creating(Zip::class) {
164167
into(extension.id) // folder like com.coder.toolbox
165168
}
166169

170+
val pluginZip by tasks.creating(Zip::class) {
171+
dependsOn(tasks.jar)
172+
dependsOn(tasks.getByName("generateLicenseReport"))
173+
174+
fromCompileDependencies()
175+
archiveBaseName.set(extension.id)
176+
}
177+
167178
tasks.register("cleanAll", Delete::class.java) {
168179
dependsOn(tasks.clean)
169180
delete(getPluginInstallDir())

0 commit comments

Comments
 (0)