@@ -86,14 +86,22 @@ val localRepoPath = File(
86
86
87
87
tasks.named(" publishToMavenLocal" ) {
88
88
finalizedBy(generateChecksums)
89
- finalizedBy(packageArtifacts)
89
+
90
+ doLast {
91
+ println (" ✅ publishToMavenLocal Success" )
92
+ }
90
93
}
91
94
92
- val generateChecksums = tasks.register(" generateChecksums" ) {
95
+ val generateChecksums by tasks.register(" generateChecksums" ) {
96
+ mustRunAfter(" publishToMavenLocal" )
97
+ finalizedBy(" packageArtifacts" )
98
+
93
99
group = " publishing"
94
100
description = " Generate MD5 и SHA1 for all artifacts in local repository"
95
101
96
102
doLast {
103
+ println (" 🔍 Generating checksums..." )
104
+
97
105
if (! localRepoPath.exists()) {
98
106
error(" ❌ Local repository not found: $localRepoPath " )
99
107
}
@@ -118,11 +126,18 @@ val generateChecksums = tasks.register("generateChecksums") {
118
126
}
119
127
}
120
128
121
- val packageArtifacts = tasks.registering(Zip ::class ) {
129
+ tasks.register<Zip >(" packageArtifacts" ) {
130
+ mustRunAfter(" generateChecksums" )
131
+ dependsOn(" generateChecksums" )
132
+
122
133
group = " publishing"
123
134
description = " Create ZIP-archive with artifacts for Central Publisher Portal"
124
135
136
+
125
137
val localRepo = file(localRepoPath)
138
+ from(localRepo)
139
+
140
+ println (" 📦 Package artifacts..." )
126
141
127
142
if (localRepo.exists().not ()) error(" Local repo not found: $localRepo " )
128
143
@@ -135,6 +150,7 @@ val packageArtifacts = tasks.registering(Zip::class) {
135
150
136
151
archiveFileName.set(" compiler-plugin-${version} .zip" )
137
152
destinationDirectory.set(layout.buildDirectory.dir(" distributions" ))
153
+ println (" ✅ Artifacts are packaged: ${archiveFile.get().asFile} " )
138
154
}
139
155
140
156
fun File.md5Hex (): String = inputStream().use { stream ->
0 commit comments