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

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

                Author: ASF GitHub Bot
            Created on: 21/Nov/19 20:26
            Start Date: 21/Nov/19 20:26
    Worklog Time Spent: 10m 
      Work Description: lukecwik 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_r349301305
 
 

 ##########
 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:
   I tried using the `publishMavenJavaPublicationTotestPublicationRepository` 
since that is configured to go to `root_of_project/testPublication` but task 
for some reason also published to Maven local making using it moot.
   
   I could not figure out an alternative which did not mess with the users 
Maven local.
 
----------------------------------------------------------------
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: 347672)
    Time Spent: 1.5h  (was: 1h 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: 1.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