File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1+ File pubspec = new File (project. projectDir. parentFile, ' pubspec.yaml' )
2+ String yaml = pubspec. text
3+ java.util.regex.Matcher versionMatcher = java.util.regex.Pattern . compile(" ^version:\\ s*['|\" ]?([^\\ n|'|\" ]*)['|\" ]?\$ " , java.util.regex.Pattern . MULTILINE ). matcher(yaml)
4+ versionMatcher. find()
5+ String library_version = versionMatcher. group(1 ). replaceAll(" \\ +" , " -" )
16
27group ' com.fluttercandies.photo_manager'
3- version ' 1.0-SNAPSHOT '
8+ version library_version
49
510buildscript {
611 ext. kotlin_version = ' 1.9.23'
Original file line number Diff line number Diff line change 1+ pubspec = YAML . load_file ( File . join ( '..' , 'pubspec.yaml' ) )
2+ library_version = pubspec [ 'version' ] . gsub ( '+' , '-' )
3+
14Pod ::Spec . new do |s |
25 s . name = 'photo_manager'
3- s . version = '2.0.0'
6+ s . version = library_version
47 s . summary = 'Photo management APIs for Flutter.'
58 s . description = <<-DESC
69A Flutter plugin that provides assets abstraction management APIs.
You can’t perform that action at this time.
0 commit comments