From e5316d078af1493d4e9510d5d80757fdcc71f495 Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Fri, 15 Jun 2018 15:10:25 +0300 Subject: Setup maven publishing to local directory --- build.gradle | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/build.gradle b/build.gradle index e13af2b6..d282aeb0 100644 --- a/build.gradle +++ b/build.gradle @@ -100,4 +100,29 @@ def ideaRT() { return zipTree(project.configurations.ideaIC.singleFile).matching ({ include("lib/idea_rt.jar") }) +} + +def repoLocation = uri(file("$buildDir/dist-maven")) + +allprojects { + + task publishToDistMaven { + group "publishing" + description "Publishes all Maven publications to Maven repository 'distMaven'." + dependsOn tasks.withType(PublishToMavenRepository).matching { + it.repository == publishing.repositories.distMaven + } + } + + plugins.withType(MavenPublishPlugin) { + publishing { + repositories { + maven { + name 'distMaven' + url repoLocation + } + } + } + + } } \ No newline at end of file -- cgit