@@ -83,7 +83,12 @@ val assemblePlugin by tasks.registering(Jar::class) {
83
83
84
84
val copyPlugin by tasks.creating(Sync ::class .java) {
85
85
dependsOn(assemblePlugin)
86
+ fromCompileDependencies()
86
87
88
+ into(getPluginInstallDir())
89
+ }
90
+
91
+ fun CopySpec.fromCompileDependencies () {
87
92
from(assemblePlugin.get().outputs.files)
88
93
from(" src/main/resources" ) {
89
94
include(" extension.json" )
@@ -105,8 +110,14 @@ val copyPlugin by tasks.creating(Sync::class.java) {
105
110
}
106
111
},
107
112
)
113
+ }
108
114
109
- into(getPluginInstallDir())
115
+ val pluginZip by tasks.creating(Zip ::class ) {
116
+ dependsOn(assemblePlugin)
117
+
118
+ fromCompileDependencies()
119
+ into(pluginId)
120
+ archiveBaseName.set(pluginName)
110
121
}
111
122
112
123
tasks.register(" cleanAll" , Delete ::class .java) {
@@ -134,22 +145,6 @@ private fun getPluginInstallDir(): Path {
134
145
return pluginsDir / pluginId
135
146
}
136
147
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
-
153
148
val publishPlugin by tasks.creating {
154
149
dependsOn(pluginZip)
155
150
0 commit comments