@@ -86,14 +86,22 @@ val localRepoPath = File(
8686
8787tasks.named(" publishToMavenLocal" ) {
8888 finalizedBy(generateChecksums)
89- finalizedBy(packageArtifacts)
89+
90+ doLast {
91+ println (" ✅ publishToMavenLocal Success" )
92+ }
9093}
9194
92- val generateChecksums = tasks.register(" generateChecksums" ) {
95+ val generateChecksums by tasks.register(" generateChecksums" ) {
96+ mustRunAfter(" publishToMavenLocal" )
97+ finalizedBy(" packageArtifacts" )
98+
9399 group = " publishing"
94100 description = " Generate MD5 и SHA1 for all artifacts in local repository"
95101
96102 doLast {
103+ println (" 🔍 Generating checksums..." )
104+
97105 if (! localRepoPath.exists()) {
98106 error(" ❌ Local repository not found: $localRepoPath " )
99107 }
@@ -118,11 +126,18 @@ val generateChecksums = tasks.register("generateChecksums") {
118126 }
119127}
120128
121- val packageArtifacts = tasks.registering(Zip ::class ) {
129+ tasks.register<Zip >(" packageArtifacts" ) {
130+ mustRunAfter(" generateChecksums" )
131+ dependsOn(" generateChecksums" )
132+
122133 group = " publishing"
123134 description = " Create ZIP-archive with artifacts for Central Publisher Portal"
124135
136+
125137 val localRepo = file(localRepoPath)
138+ from(localRepo)
139+
140+ println (" 📦 Package artifacts..." )
126141
127142 if (localRepo.exists().not ()) error(" Local repo not found: $localRepo " )
128143
@@ -135,6 +150,7 @@ val packageArtifacts = tasks.registering(Zip::class) {
135150
136151 archiveFileName.set(" compiler-plugin-${version} .zip" )
137152 destinationDirectory.set(layout.buildDirectory.dir(" distributions" ))
153+ println (" ✅ Artifacts are packaged: ${archiveFile.get().asFile} " )
138154}
139155
140156fun File.md5Hex (): String = inputStream().use { stream ->
0 commit comments