@@ -767,6 +767,22 @@ namespace :java do
767
767
desc 'Generate Java documentation'
768
768
task docs : :javadocs
769
769
770
+ desc 'Update Maven dependencies'
771
+ task :dependencies do
772
+ file_path = 'java/maven_deps.bzl'
773
+ content = File . read ( file_path )
774
+
775
+ Bazel . execute ( 'run' , [ ] , '@maven//:outdated' ) do |output |
776
+ versions = output . scan ( /(\S +) \[ \S + -> (\S +)\] / ) . to_h
777
+ versions . each do |artifact , version |
778
+ next if artifact . match? ( 'graphql' )
779
+ content . gsub! ( /#{ artifact } :\d +\. \d +[^\\ "]+/ , "#{ artifact } :#{ version } " )
780
+ end
781
+ end
782
+
783
+ File . write ( file_path , content )
784
+ end
785
+
770
786
desc 'Update Java version'
771
787
task :version , [ :version ] do |_task , arguments |
772
788
old_version = java_version
@@ -847,6 +863,7 @@ namespace :all do
847
863
args = arguments [ :channel ] ? [ '--' , "--chrome_channel=#{ arguments [ :channel ] . capitalize } " ] : [ ]
848
864
Bazel . execute ( 'run' , args , '//scripts:pinned_browsers' )
849
865
Bazel . execute ( 'run' , args , '//scripts:update_cdp' )
866
+ Rake ::Task [ 'java:dependencies' ] . invoke
850
867
Rake ::Task [ 'authors' ] . invoke
851
868
Rake ::Task [ 'copyright:update' ] . invoke
852
869
end
0 commit comments