[ https://issues.apache.org/jira/browse/BEAM-7278?focusedWorklogId=347651&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-347651 ]
ASF GitHub Bot logged work on BEAM-7278: ---------------------------------------- Author: ASF GitHub Bot Created on: 21/Nov/19 19:44 Start Date: 21/Nov/19 19:44 Worklog Time Spent: 10m Work Description: kennknowles 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_r349283337 ########## 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 -PjavaLinkageArtifactIds=artifactId1,artifactId2,... :checkJavaLinkage +// +// For example: +// ./gradlew -Ppublishing -PjavaLinkageArtifactIds=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 */) + classpath = project.configurations.linkageCheckerJava + main = 'com.google.cloud.tools.opensource.classpath.LinkageCheckerMain' + args '-a', project.javaLinkageArtifactIds.split(',').collect({"${project.ext.mavenGroupId}:${it}:${project.version}"}).join(',') + doLast { + println "NOTE: This task published artifacts into your local Maven repository. You may want to remove them manually." Review comment: But how will they identify the ones that were published? ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 347651) Time Spent: 1h 10m (was: 1h) > 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: 1h 10m > Remaining Estimate: 0h > > Some dependencies need to be upgraded. -- This message was sent by Atlassian Jira (v8.3.4#803005)