From 7e01fefc309547852b787df64ca6a8a6b1ce3614 Mon Sep 17 00:00:00 2001 From: bbilger Date: Wed, 14 Dec 2016 22:52:25 +0100 Subject: [PATCH] fix issue with maven publication => change runtime to compile in generated pom --- build.gradle | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build.gradle b/build.gradle index bc1915f..22744b0 100644 --- a/build.gradle +++ b/build.gradle @@ -152,6 +152,16 @@ subprojects { artifact sourcesJar artifact javadocJar } + // change from runtime to compile time + all { + pom.withXml { + asNode().dependencies.'*'.findAll() { + it.scope.text() == 'runtime' && project.configurations.compile.allDependencies.find { dep -> + dep.name == it.artifactId.text() + } + }.each { it.scope*.value = 'compile'} + } + } } } }