[ 
https://issues.apache.org/jira/browse/BEAM-7278?focusedWorklogId=347482&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-347482
 ]

ASF GitHub Bot logged work on BEAM-7278:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 21/Nov/19 16:00
            Start Date: 21/Nov/19 16:00
    Worklog Time Spent: 10m 
      Work Description: suztomo commented on pull request #10184: [BEAM-7278, 
BEAM-2530] Add support for using a Java linkage testing tool to aid upgrading 
dependencies.
URL: https://github.com/apache/beam/pull/10184#discussion_r349171129
 
 

 ##########
 File path: build.gradle
 ##########
 @@ -294,3 +294,41 @@ release {
     pushToRemote = ''
   }
 }
+
+// Reports linkage errors across multiple Apache Beam artifact ids.
+//
+// To use (from the root of project):
+//    ./gradlew -Ppublishing 
-PjavaLinkageArtifacts=artifactId1,artifactId2,... :checkJavaLinkage
+//
+// For example:
+//    ./gradlew -Ppublishing 
-PjavaLinkageArtifacts=beam-sdks-java-core,beam-sdks-java-io-jdbc 
:checkJavaLinkage
+//
+// Note that this task publishes artifacts into your local Maven repository.
+if (project.hasProperty('javaLinkageArtifactIds')) {
+  if (!project.hasProperty('publishing')) {
+    throw new GradleException('You can only check linkage of Java artifacts if 
you specify -Ppublishing on the command line as well.')
+  }
+
+  configurations { linkageCheckerJava }
+  dependencies {
+    linkageCheckerJava "com.google.cloud.tools:dependencies:1.0.1"
+  }
+
+  // We need to evaluate all the projects first so that we can find depend on 
all the
+  // publishMavenJavaPublicationToMavenLocal tasks below.
+  for (p in rootProject.subprojects) {
+    if (!p.path.equals(project.path)) {
+      evaluationDependsOn(p.path)
+    }
+  }
+
+  project.task('checkJavaLinkage', type: JavaExec) {
+    dependsOn 
project.getTasksByName('publishMavenJavaPublicationToMavenLocal', true /* 
recursively */)
 
 Review comment:
   Nice. I was wondering how to bridge Gradle build to Maven local repo. Good 
to know this task.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 347482)
    Time Spent: 0.5h  (was: 20m)

> Upgrade some Beam dependencies
> ------------------------------
>
>                 Key: BEAM-7278
>                 URL: https://issues.apache.org/jira/browse/BEAM-7278
>             Project: Beam
>          Issue Type: Task
>          Components: dependencies
>            Reporter: Etienne Chauchot
>            Assignee: Mujuzi Moses
>            Priority: Critical
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Some dependencies need to be upgraded.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to