From 754c76fdc635521d5b1548dddd6ae7a601a0abaf Mon Sep 17 00:00:00 2001 From: Arthur Little <1690572+littleaj@users.noreply.github.com> Date: Thu, 18 Oct 2018 15:09:43 -0700 Subject: [PATCH] Fix grpc dependencies (#761) * exclude protobuf dependencies from pom * fix the test dependencies * fixed test scope dependencies --- azure-application-insights-spring-boot-starter/build.gradle | 2 +- core/build.gradle | 5 +++-- logging/logging.gradle | 2 +- web/build.gradle | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/azure-application-insights-spring-boot-starter/build.gradle b/azure-application-insights-spring-boot-starter/build.gradle index 1851636c5da..0470aab25e6 100644 --- a/azure-application-insights-spring-boot-starter/build.gradle +++ b/azure-application-insights-spring-boot-starter/build.gradle @@ -111,5 +111,5 @@ projectPomDescription = "This is the Spring Boot starter of " + project.msftAppI whenPomConfigured = { p -> def agentArtifactId = project(":agent").jar.baseName - p.dependencies = p.dependencies.findAll { dep -> dep.artifactId != agentArtifactId } + p.dependencies = p.dependencies.findAll { dep -> dep.scope == "test" || dep.artifactId != agentArtifactId } } diff --git a/core/build.gradle b/core/build.gradle index 081f0da9425..dbe23d80619 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -168,9 +168,10 @@ projectPomDescription = "This is the core module of " + project.msftAppInsightsJ whenPomConfigured = { p -> def agentArtifactId = project(":agent").jar.baseName p.dependencies = p.dependencies.findAll { dep -> - dep.artifactId != agentArtifactId && + dep.scope == "test" || dep.artifactId != agentArtifactId && !(dep.groupId in ['org.apache.http', 'eu.infomas', 'org.apache.commons', 'commons-io', - 'com.google.guava', 'com.google.code.gson', 'org.apache.httpcomponents']) + 'com.google.guava', 'com.google.code.gson', 'org.apache.httpcomponents', + 'io.grpc', 'com.google.protobuf']) } } diff --git a/logging/logging.gradle b/logging/logging.gradle index 5f4863681ee..d514c1aebd9 100644 --- a/logging/logging.gradle +++ b/logging/logging.gradle @@ -61,7 +61,7 @@ findbugs.sourceSets = [sourceSets.main] // region Publishing properties whenPomConfigured = { p -> - p.dependencies = p.dependencies.findAll { dep -> dep.artifactId != "junit" && dep.artifactId != "mockito-all" } + p.dependencies = p.dependencies.findAll { dep -> dep.scope == "test" || dep.artifactId != "junit" && dep.artifactId != "mockito-all" } } // endregion Publishing properties diff --git a/web/build.gradle b/web/build.gradle index bdb5cb9e470..37c20c5c8d2 100644 --- a/web/build.gradle +++ b/web/build.gradle @@ -68,7 +68,7 @@ projectPomDescription = "This is the web module of " + project.msftAppInsightsJa whenPomConfigured = { p -> def agentArtifactId = project(":agent").jar.baseName p.dependencies = p.dependencies.findAll { dep -> - dep.artifactId != agentArtifactId && + dep.scope == "test" || dep.artifactId != agentArtifactId && !(dep.groupId in ['org.apache.http', 'org.apache.commons', 'commons-io', 'org.apache.httpcomponents']) }