From f58be0c8ca8a20dc7e47c3a27e32caf2a951a83f Mon Sep 17 00:00:00 2001 From: Scott Frederick Date: Fri, 16 Nov 2018 17:20:43 -0600 Subject: [PATCH] Cleanup build. --- .../build.gradle | 1 - .../publish-maven.gradle | 65 ------------------- spring-cloud-core/build.gradle | 10 +-- 3 files changed, 2 insertions(+), 74 deletions(-) delete mode 100644 spring-cloud-cloudfoundry-connector/publish-maven.gradle diff --git a/spring-cloud-cloudfoundry-connector/build.gradle b/spring-cloud-cloudfoundry-connector/build.gradle index 213e55f9..dad5cd48 100644 --- a/spring-cloud-cloudfoundry-connector/build.gradle +++ b/spring-cloud-cloudfoundry-connector/build.gradle @@ -10,7 +10,6 @@ buildscript { } apply plugin: 'com.github.johnrengelman.shadow' -apply from: "publish-maven.gradle" dependencies { compile project(':spring-cloud-core') diff --git a/spring-cloud-cloudfoundry-connector/publish-maven.gradle b/spring-cloud-cloudfoundry-connector/publish-maven.gradle deleted file mode 100644 index 632359ef..00000000 --- a/spring-cloud-cloudfoundry-connector/publish-maven.gradle +++ /dev/null @@ -1,65 +0,0 @@ -apply plugin: "maven" - -ext.optionalDeps = [] -ext.providedDeps = [] - -ext.optional = { optionalDeps << it } -ext.provided = { providedDeps << it } - -install { - repositories.mavenInstaller { - customizePom(pom, project) - } -} - -def customizePom(pom, gradleProject) { - pom.whenConfigured { generatedPom -> - // respect "optional" and "provided" dependencies - gradleProject.optionalDeps.each { dep -> - generatedPom.dependencies.findAll { it.artifactId == dep.name }*.optional = true - } - gradleProject.providedDeps.each { dep -> - generatedPom.dependencies.findAll { it.artifactId == dep.name }*.scope = "provided" - } - - // eliminate test-scoped dependencies (no need in maven central poms) - generatedPom.dependencies.removeAll { dep -> - dep.scope == "test" - } - - // Remove jackson dependencies, since we shade them in - generatedPom.dependencies.removeAll { dep -> - dep.groupId == "com.fasterxml.jackson.core" - } - - // add all items necessary for maven central publication - generatedPom.project { - name = gradleProject.description - description = gradleProject.description - url = "https://github.com/spring-projects/spring-cloud" - organization { - name = "Spring IO" - url = "http://projects.spring.io/spring-cloud" - } - licenses { - license { - name "The Apache Software License, Version 2.0" - url "http://www.apache.org/licenses/LICENSE-2.0.txt" - distribution "repo" - } - } - scm { - url = "https://github.com/spring-projects/spring-cloud" - connection = "scm:git:git://github.com/spring-projects/spring-cloud" - developerConnection = "scm:git:git://github.com/spring-projects/spring-cloud" - } - developers { - developer { - id = "ramnivas" - name = "Ramnivas Laddad" - email = "" - } - } - } - } -} \ No newline at end of file diff --git a/spring-cloud-core/build.gradle b/spring-cloud-core/build.gradle index c9a5298b..0a647c65 100644 --- a/spring-cloud-core/build.gradle +++ b/spring-cloud-core/build.gradle @@ -2,7 +2,6 @@ description = 'Spring-Cloud Core' configurations { tests - published.extendsFrom tests, archives } task testJar(type: Jar) { @@ -14,11 +13,6 @@ testJar.dependsOn testClasses build.dependsOn testJar artifacts { - tests testJar + tests testJar + archives testJar } - -install { - configuration = configurations.published -} - -//tasks.findByPath("artifactoryPublish")?.publishConfigs ('published') \ No newline at end of file