generalize publish handling Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/da9bb312 Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/da9bb312 Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/da9bb312
Branch: refs/heads/release1.0.0 Commit: da9bb312d250fad2ba1fc10004058360f825c4fc Parents: 238aac5 Author: Dale LaBossiere <dlab...@us.ibm.com> Authored: Tue Nov 15 11:50:00 2016 -0500 Committer: Dale LaBossiere <dlab...@us.ibm.com> Committed: Tue Nov 15 11:50:00 2016 -0500 ---------------------------------------------------------------------- build.gradle | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/da9bb312/build.gradle ---------------------------------------------------------------------- diff --git a/build.gradle b/build.gradle index a34a27e..cde1d1f 100644 --- a/build.gradle +++ b/build.gradle @@ -628,24 +628,25 @@ subprojects { // support for 'gradle publishToMavenLocal' etc // TODO publishing test.{fvt,svt} and samples ... doesn't seem desirable? e.g., we're excluding test.{fvt,svt} jars from the tgz - if(!project.group.equals("edgent.platform")){ - publishing { - publications { - mavenJava(MavenPublication) { - // specify dependencies like: org.apache.edgent:edgent.api.topology:0.4.0 - groupId = build_group - artifactId = "${project.group}.${project.name}" - artifact sourceJar - if (project.pluginManager.hasPlugin('war')) { - from components.web - } - else { - from components.java + if (project.pluginManager.hasPlugin('publishing')) { + publishing { + publications { + mavenJava(MavenPublication) { + // specify dependencies like: org.apache.edgent:edgent.api.topology:0.4.0 + groupId = build_group + artifactId = "${project.group}.${project.name}" + artifact sourceJar + if (project.pluginManager.hasPlugin('war')) { + from components.web + } + else { + from components.java + } } } } } - } + } task copyScripts(type: Copy) {