Fixed local repo delete/flush logic
This commit is contained in:
parent
8f92f15533
commit
5ed8a161d6
|
@ -253,14 +253,14 @@ class PublishPlugin : Plugin<Project> {
|
||||||
// prune off the "file:"
|
// prune off the "file:"
|
||||||
val localMavenRepo = project.repositories.mavenLocal().url.toString().replaceFirst("file:", "")
|
val localMavenRepo = project.repositories.mavenLocal().url.toString().replaceFirst("file:", "")
|
||||||
|
|
||||||
// clean-out the repo!!
|
|
||||||
File(localMavenRepo).deleteRecursively()
|
|
||||||
|
|
||||||
val projectName = config.groupId.replace('.', '/')
|
val projectName = config.groupId.replace('.', '/')
|
||||||
|
|
||||||
// output the release URL in the console
|
// output the release URL in the console
|
||||||
val mavenLocation = "$localMavenRepo$projectName/${config.name}/${config.version}/"
|
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")
|
println("\tPublishing '${publication.groupId}:${publication.artifactId}:${publication.version}' to Maven Local")
|
||||||
|
|
||||||
publication.artifacts.forEach {
|
publication.artifacts.forEach {
|
||||||
|
|
Loading…
Reference in New Issue