Fixed local repo delete/flush logic

master
Robinson 2023-11-27 17:07:56 +01:00
parent 8f92f15533
commit 5ed8a161d6
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C
1 changed files with 3 additions and 3 deletions

View File

@ -253,14 +253,14 @@ class PublishPlugin : Plugin<Project> {
// prune off the "file:"
val localMavenRepo = project.repositories.mavenLocal().url.toString().replaceFirst("file:", "")
// clean-out the repo!!
File(localMavenRepo).deleteRecursively()
val projectName = config.groupId.replace('.', '/')
// output the release URL in the console
val mavenLocation = "$localMavenRepo$projectName/${config.name}/${config.version}/"
// clean-out the repo!!
File(mavenLocation).deleteRecursively()
println("\tPublishing '${publication.groupId}:${publication.artifactId}:${publication.version}' to Maven Local")
publication.artifacts.forEach {