souyuz 0.7.2 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b64f8f3f0b47ac83077bade70b976957f9c3c8cd
4
- data.tar.gz: c2de1d9f237a7fdfbad03beaedafe8e915b965c9
2
+ SHA256:
3
+ metadata.gz: cfcbc75e52ece5af9c4eb049045525f607d7d3454189ad822727b6750185a659
4
+ data.tar.gz: 62b4b6f607e33b87b6253c67e96f55f39cdb0d0638ec05c2e27a7942543861a8
5
5
  SHA512:
6
- metadata.gz: 680c049a707309caa92e76cc5eb8ee1940e4725855f371c3ac97b437c6c1b5f8d90a0e55d9288b880172826c06a8f363cbd426d36a41d669eb40d0e4223310b3
7
- data.tar.gz: a3b0b09e13c0919182ea485822f7e46a83f608b4c9d43553024f5a228ba45b8fb4c7ec4de0d4c8dbe5e8172acd9ba9493b0840abf592928fe3c6e0a665dd73ba
6
+ metadata.gz: b445291e8406244c2f99e150fe402766111847ade4e32a308343bc5ffa120c0794d4e10ea57a083d43a27eceaa156942f54bd89f66aa009d06b5998d64b53507
7
+ data.tar.gz: eef32d0a9beb2f68852ddfefa0ef9c480067de86a57cd404a640297c2fb0b4c0561048f893b87b02aeb36ad325a8adcb9826fa0fa2873a4ac25ae4d39c871011
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Souyuz
2
2
 
3
+ [![Build Status](https://travis-ci.org/voydz/souyuz.svg?branch=master)](https://travis-ci.org/voydz/souyuz)
4
+
3
5
  A fastlane component to make Xamarin builds a breeze. Souyuz is now avaialbe as an **Fastlane plugin** see [fastlane-plugin-souyuz](fastlane-plugin-souyuz) for details.
4
6
 
5
7
  *NOTE: While souyuz should continue working with your existing configuration just fine, consider using the Fastlane plugin.*
@@ -25,4 +27,4 @@ souyuz(
25
27
 
26
28
  ## Licensing
27
29
 
28
- Souyuz is licensed under the MIT License. See [LICENSE](LICENSE) for the full license text.
30
+ Souyuz is licensed under the MIT License. See [LICENSE](LICENSE) for the full license text.
data/bin/souyuz CHANGED
@@ -3,4 +3,4 @@ $LOAD_PATH.push File.expand_path("../../lib", __FILE__)
3
3
 
4
4
  require "souyuz"
5
5
  require "souyuz/commands_generator"
6
- Souyuz::CommandsGenerator.start
6
+ Souyuz::CommandsGenerator.start
@@ -1,4 +1,3 @@
1
- # -*- encoding : utf-8 -*-
2
1
  require "commander"
3
2
  require "fastlane"
4
3
 
@@ -1,4 +1,3 @@
1
- # -*- encoding : utf-8 -*-
2
1
  require 'nokogiri'
3
2
 
4
3
  module Souyuz
@@ -9,7 +8,7 @@ module Souyuz
9
8
  def self.set_additional_default_values
10
9
  config = Souyuz.config
11
10
 
12
- # TODO detect_platform automatically for :platform config
11
+ # TODO: detect_platform automatically for :platform config
13
12
 
14
13
  # set correct implicit build platform for android
15
14
  if config[:platform] == Platform::ANDROID
@@ -25,6 +24,7 @@ module Souyuz
25
24
 
26
25
  detect_output_path doc_csproj
27
26
  detect_manifest doc_csproj
27
+ detect_build_tools
28
28
  detect_info_plist
29
29
  detect_assembly_name doc_csproj # we can only do that for android *after* we detected the android manitfest
30
30
 
@@ -35,16 +35,8 @@ module Souyuz
35
35
 
36
36
  def self.detect_solution
37
37
  return if Souyuz.config[:solution_path]
38
- itr = 0
39
- query = '*.sln'
40
-
41
- begin
42
- files = Dir.glob(query)
43
- query = "../#{query}"
44
- itr += 1
45
- end until files.any? or itr > 3
46
38
 
47
- sln = files.first # pick first file as solution
39
+ sln = find_file('*.sln', 3) # search for solution
48
40
  UI.user_error! 'Not able to find solution file automatically, try to specify it via `solution_path` parameter.' unless sln
49
41
 
50
42
  Souyuz.config[:solution_path] = abs_path sln
@@ -55,7 +47,7 @@ module Souyuz
55
47
 
56
48
  path = Souyuz.config[:solution_path]
57
49
  projects = Msbuild::SolutionParser.parse(path)
58
- .get_platform Souyuz.config[:platform]
50
+ .get_platform Souyuz.config[:platform]
59
51
 
60
52
  UI.user_error! "Not able to find any project in solution, that matches the platform `#{Souyuz.config[:platform]}`." unless projects.any?
61
53
 
@@ -87,18 +79,24 @@ module Souyuz
87
79
  Souyuz.config[:manifest_path] = abs_project_path doc_node.text
88
80
  end
89
81
 
82
+ def self.detect_build_tools
83
+ return if Souyuz.config[:buildtools_path]
84
+
85
+ UI.user_error! "Please ensure that the Android SDK is installed and the ANDROID_HOME variable is set correctly" unless ENV['ANDROID_HOME']
86
+
87
+ # determine latest buildtool version
88
+ buildtools = File.join(ENV['ANDROID_HOME'], 'build-tools')
89
+ version = Dir.entries(buildtools).sort.last
90
+
91
+ UI.success "Using Buildtools Version: #{version}..."
92
+
93
+ Souyuz.config[:buildtools_path] = File.join(buildtools, version)
94
+ end
95
+
90
96
  def self.detect_info_plist
91
97
  return if Souyuz.config[:plist_path] or Souyuz.config[:platform] != Platform::IOS
92
- itr = 0
93
- query = '../Info.plist'
94
-
95
- begin
96
- files = Dir.glob(query)
97
- query = "*/#{query}"
98
- itr += 1
99
- end until files.any? or itr > 1
100
98
 
101
- plist_path = files.first # pick first file as solution
99
+ plist_path = find_file('Info.plist', 1) # search for plist
102
100
  UI.user_error! 'Not able to find Info.plist automatically, try to specify it via `plist_path` parameter.' unless plist_path
103
101
 
104
102
  Souyuz.config[:plist_path] = abs_project_path plist_path
@@ -107,7 +105,7 @@ module Souyuz
107
105
  def self.detect_assembly_name(doc_csproj)
108
106
  return if Souyuz.config[:assembly_name]
109
107
 
110
- if [ Platform::IOS, Platform::OSX ].include? Souyuz.config[:platform]
108
+ if [Platform::IOS, Platform::OSX].include? Souyuz.config[:platform]
111
109
  Souyuz.config[:assembly_name] = doc_csproj.css('PropertyGroup > AssemblyName').text
112
110
  elsif Souyuz.config[:platform] == Platform::ANDROID
113
111
  doc = get_parser_handle Souyuz.config[:manifest_path] # explicitly for this call, no cache needed
@@ -115,11 +113,25 @@ module Souyuz
115
113
  end
116
114
  end
117
115
 
118
- private
116
+ private_class_method
117
+
118
+ def self.find_file(query, depth)
119
+ itr = 0
120
+ files = []
121
+
122
+ loop do
123
+ files = Dir.glob(query)
124
+ query = "../#{query}"
125
+ itr += 1
126
+ break if files.any? or itr > depth
127
+ end
128
+
129
+ return files.first # pick first file
130
+ end
119
131
 
120
132
  def self.get_parser_handle(filename)
121
- f = File::open(filename)
122
- doc = Nokogiri::XML(f)
133
+ f = File.open(filename)
134
+ doc = Nokogiri::XML(f)
123
135
  f.close
124
136
 
125
137
  return doc
@@ -143,5 +155,5 @@ module Souyuz
143
155
  path = File.expand_path(path) # absolute dir
144
156
  path
145
157
  end
146
- end
158
+ end
147
159
  end
@@ -0,0 +1,47 @@
1
+ module Souyuz
2
+ # Responsible for building the apksigner command
3
+ class ApkSignCommandGenerator
4
+ class << self
5
+ def generate
6
+ build_apk_path = Souyuz.cache[:build_apk_path]
7
+ Souyuz.cache[:signed_apk_path] = "#{build_apk_path}-unaligned"
8
+
9
+ parts = prefix
10
+ parts << detect_apksigner_executable
11
+ parts += options
12
+ parts << build_apk_path
13
+ parts += pipe
14
+
15
+ parts
16
+ end
17
+
18
+ def prefix
19
+ [""]
20
+ end
21
+
22
+ def detect_apksigner_executable
23
+ apksigner = File.join(Souyuz.config[:buildtools_path], 'apksigner')
24
+
25
+ apksigner
26
+ end
27
+
28
+ def options
29
+ options = []
30
+ options << "sign" if $verbose
31
+ options << "--verbose" if $verbose
32
+ options << "--ks \"#{Souyuz.config[:keystore_path]}\""
33
+ options << "--ks-pass \"#{Souyuz.config[:keystore_password]}\""
34
+ options << "--ks-key-alias \"#{Souyuz.config[:keystore_alias]}\""
35
+ options << "--out \"#{Souyuz.cache[:signed_apk_path]}\""
36
+
37
+ options
38
+ end
39
+
40
+ def pipe
41
+ pipe = []
42
+
43
+ pipe
44
+ end
45
+ end
46
+ end
47
+ end
@@ -1,4 +1,3 @@
1
- # -*- encoding : utf-8 -*-
2
1
  module Souyuz
3
2
  # Responsible for building the fully working build command
4
3
  class BuildCommandGenerator
@@ -15,7 +14,7 @@ module Souyuz
15
14
  end
16
15
 
17
16
  def prefix
18
- ["set -o pipefail &&"]
17
+ [""]
19
18
  end
20
19
 
21
20
  def compiler_bin
@@ -26,25 +25,26 @@ module Souyuz
26
25
  config = Souyuz.config
27
26
 
28
27
  options = []
29
- options << "/p:Configuration=#{config[:build_configuration]}" if config[:build_configuration]
30
- options << "/p:Platform=#{config[:build_platform]}" if Souyuz.project.ios? and config[:build_platform]
31
- options << "/p:BuildIpa=true" if Souyuz.project.ios?
32
- if (config[:solution_path])
28
+ options << config[:extra_build_options] if config[:extra_build_options]
29
+ options << "-p:Configuration=#{config[:build_configuration]}" if config[:build_configuration]
30
+ options << "-p:Platform=#{config[:build_platform]}" if Souyuz.project.ios? and config[:build_platform]
31
+ options << "-p:BuildIpa=true" if Souyuz.project.ios?
32
+ if config[:solution_path]
33
33
  solution_dir = File.dirname(config[:solution_path])
34
- options << "/p:SolutionDir=#{solution_dir}/"
34
+ options << "-p:SolutionDir=#{solution_dir}/"
35
35
  end
36
36
 
37
37
  options
38
38
  end
39
39
 
40
40
  def build_targets
41
- Souyuz.config[:build_target].map! { |t| "/t:#{t}" }
41
+ Souyuz.config[:build_target].map! { |t| "-t:#{t}" }
42
42
  end
43
43
 
44
44
  def targets
45
45
  targets = []
46
46
  targets += build_targets
47
- targets << "/t:SignAndroidPackage" if Souyuz.project.android?
47
+ targets << "-t:SignAndroidPackage" if Souyuz.project.android?
48
48
 
49
49
  targets
50
50
  end
@@ -52,8 +52,8 @@ module Souyuz
52
52
  def project
53
53
  path = []
54
54
 
55
- path << Souyuz.config[:project_path] if Souyuz.project.android?
56
- path << Souyuz.config[:solution_path] if Souyuz.project.ios? or Souyuz.project.osx?
55
+ path << Souyuz.config[:project_path] # if Souyuz.project.android?
56
+ # path << Souyuz.config[:solution_path] if Souyuz.project.ios? or Souyuz.project.osx?
57
57
 
58
58
  path
59
59
  end
@@ -1,4 +1,3 @@
1
- # -*- encoding : utf-8 -*-
2
1
  module Souyuz
3
2
  # Responsible for building the zip dsym command
4
3
  class ZipDsymCommandGenerator
@@ -13,7 +12,7 @@ module Souyuz
13
12
  end
14
13
 
15
14
  def prefix
16
- ["set -o pipefail &&"]
15
+ [""]
17
16
  end
18
17
 
19
18
  def detect_zip_executable
@@ -0,0 +1,42 @@
1
+ module Souyuz
2
+ # Responsible for building the zipalign command
3
+ class ZipalignCommandGenerator
4
+ class << self
5
+ def generate
6
+ parts = prefix
7
+ parts << zipalign_apk
8
+ parts += options
9
+ parts << Souyuz.cache[:signed_apk_path]
10
+ parts << Souyuz.cache[:build_apk_path]
11
+ parts += pipe
12
+
13
+ parts
14
+ end
15
+
16
+ def zipalign_apk
17
+ zipalign = File.join(Souyuz.config[:buildtools_path], 'zipalign')
18
+
19
+ zipalign
20
+ end
21
+
22
+ def options
23
+ options = []
24
+ options << "-v" if $verbose
25
+ options << "-f"
26
+ options << "4"
27
+
28
+ options
29
+ end
30
+
31
+ def prefix
32
+ [""]
33
+ end
34
+
35
+ def pipe
36
+ pipe = []
37
+
38
+ pipe
39
+ end
40
+ end
41
+ end
42
+ end
@@ -1,4 +1,3 @@
1
- # -*- encoding : utf-8 -*-
2
1
  require "fastlane"
3
2
 
4
3
  module Souyuz
@@ -1,4 +1,3 @@
1
- # -*- encoding : utf-8 -*-
2
1
  module Souyuz
3
2
  module Msbuild
4
3
  class Project
@@ -30,14 +29,14 @@ module Souyuz
30
29
 
31
30
  def is_platform?(platform)
32
31
  return case platform
33
- when Souyuz::Platform::IOS
32
+ when Souyuz::Platform::IOS
34
33
  then self.project_name.downcase.include? 'ios'
35
- when Souyuz::Platform::OSX
34
+ when Souyuz::Platform::OSX
36
35
  then self.project_name.downcase.include? 'mac'
37
- when Souyuz::Platform::ANDROID
36
+ when Souyuz::Platform::ANDROID
38
37
  then self.project_name.downcase.include? 'droid'
39
- else false
40
- end
38
+ else false
39
+ end
41
40
  end
42
41
  end
43
42
  end
@@ -1,4 +1,3 @@
1
- # -*- encoding : utf-8 -*-
2
1
  module Souyuz
3
2
  module Msbuild
4
3
  class Solution
@@ -1,15 +1,14 @@
1
- # -*- encoding : utf-8 -*-
2
1
  module Souyuz
3
2
  module Msbuild
4
3
  class SolutionParser
5
4
  def self.parse(filename)
6
5
  solution = Solution.new
7
6
 
8
- File::open(filename) do |f|
7
+ File.open(filename) do |f|
9
8
  f.read.split("\n").each do |line|
10
- if line.start_with? "Project"
9
+ if line.start_with? "Project"
11
10
  options = parse_line line
12
- solution.add_project Project.new(options) #maybe we should not use the project class for this
11
+ solution.add_project Project.new(options) # maybe we should not use the project class for this
13
12
  end
14
13
  end
15
14
  end
@@ -1,4 +1,3 @@
1
- # -*- encoding : utf-8 -*-
2
1
  require "fastlane"
3
2
 
4
3
  module Souyuz
@@ -25,8 +24,12 @@ module Souyuz
25
24
  FastlaneCore::ConfigItem.new(key: :build_target,
26
25
  env_name: "SOUYUZ_BUILD_TARGET",
27
26
  description: "Build targets to build",
28
- default_value: [ 'Build' ],
27
+ default_value: ['Build'],
29
28
  type: Array),
29
+ FastlaneCore::ConfigItem.new(key: :extra_build_options,
30
+ env_name: "SOUYUZ_EXTRA_BUILD_OPTIONS",
31
+ description: "Extra options to pass to `msbuild`. Example: `/p:MYOPTION=true`",
32
+ optional: true),
30
33
  FastlaneCore::ConfigItem.new(key: :output_path,
31
34
  env_name: "SOUYUZ_BUILD_OUTPUT_PATH",
32
35
  description: "Build output path",
@@ -55,6 +58,10 @@ module Souyuz
55
58
  env_name: "SOUYUZ_ANDROID_MANIFEST_PATH",
56
59
  description: "Path to the android manifest (xml) file",
57
60
  optional: true),
61
+ FastlaneCore::ConfigItem.new(key: :buildtools_path,
62
+ env_name: "SOUYUZ_ANDROID_BUILDTOOLS_PATH",
63
+ description: "Path to the android build tools",
64
+ optional: true),
58
65
  FastlaneCore::ConfigItem.new(key: :plist_path,
59
66
  env_name: "SOUYUZ_IOS_PLIST_PATH",
60
67
  description: "Path to the iOS plist file",
@@ -74,8 +81,8 @@ module Souyuz
74
81
  FastlaneCore::ConfigItem.new(key: :keystore_tsa,
75
82
  default_value: 'http://timestamp.digicert.com',
76
83
  env_name: "SOUYUZ_ANDROID_KEYSTORE_TSA",
77
- description: "TSA for jarsigner",
78
- optional: true),
84
+ description: "TSA for apksigner",
85
+ optional: true)
79
86
  ]
80
87
  end
81
88
  end
@@ -1,4 +1,3 @@
1
- # -*- encoding : utf-8 -*-
2
1
  module Souyuz
3
2
  module Platform
4
3
  IOS = 'ios'
data/lib/souyuz/runner.rb CHANGED
@@ -1,4 +1,3 @@
1
- # -*- encoding : utf-8 -*-
2
1
  require 'fastlane'
3
2
 
4
3
  module Souyuz
@@ -15,10 +14,8 @@ module Souyuz
15
14
  path
16
15
  elsif Souyuz.project.android?
17
16
  path = apk_file
18
- if (config[:keystore_path] && config[:keystore_alias])
19
- UI.success "Jar it, sign it, zip it..."
20
-
21
- jarsign_and_zipalign
17
+ if config[:keystore_path] && config[:keystore_alias]
18
+ apksign_and_zipalign
22
19
  end
23
20
 
24
21
  path
@@ -45,18 +42,20 @@ module Souyuz
45
42
  "#{build_path}/#{assembly_name}.apk"
46
43
  end
47
44
 
48
- def jarsign_and_zipalign
49
- command = JavaSignCommandGenerator.generate
45
+ def apksign_and_zipalign
46
+ UI.success "Start signing process..."
47
+
48
+ command = ZipalignCommandGenerator.generate
50
49
  FastlaneCore::CommandExecutor.execute(command: command,
51
- print_all: false,
50
+ print_all: true,
52
51
  print_command: !Souyuz.config[:silent])
53
52
 
54
- UI.success "Successfully signed apk #{Souyuz.cache[:build_apk_path]}"
55
-
56
- command = AndroidZipalignCommandGenerator.generate
53
+ command = ApkSignCommandGenerator.generate
57
54
  FastlaneCore::CommandExecutor.execute(command: command,
58
- print_all: true,
55
+ print_all: false,
59
56
  print_command: !Souyuz.config[:silent])
57
+
58
+ UI.success "Successfully signed apk #{Souyuz.cache[:build_apk_path]}"
60
59
  end
61
60
 
62
61
  #
@@ -70,7 +69,7 @@ module Souyuz
70
69
  # in the upcomming switch we determin the output path of iOS ipa files
71
70
  # those change in the Xamarin.iOS Cycle 9 release
72
71
  # see https://developer.xamarin.com/releases/ios/xamarin.ios_10/xamarin.ios_10.4/
73
- if File.exists? "#{build_path}/#{assembly_name}.ipa"
72
+ if File.exist? "#{build_path}/#{assembly_name}.ipa"
74
73
  # after Xamarin.iOS Cycle 9
75
74
  package_path = build_path
76
75
  else
@@ -92,13 +91,13 @@ module Souyuz
92
91
  assembly_name = Souyuz.project.options[:assembly_name]
93
92
 
94
93
  build_dsym_path = "#{build_path}/#{assembly_name}.app.dSYM"
95
- if not File.exists? build_dsym_path
94
+ unless File.exist? build_dsym_path
96
95
  UI.success "Did not found dSYM at #{build_dsym_path}, skipping..."
97
96
  return
98
97
  end
99
98
 
100
99
  Souyuz.cache[:build_dsym_path] = build_dsym_path
101
-
100
+
102
101
  command = ZipDsymCommandGenerator.generate
103
102
  FastlaneCore::CommandExecutor.execute(command: command,
104
103
  print_all: true,
@@ -106,7 +105,7 @@ module Souyuz
106
105
 
107
106
  # move dsym aside ipa
108
107
  dsym_path = "#{dsym_path}.zip"
109
- if File.exists? dsym_path
108
+ if File.exist? dsym_path
110
109
  FileUtils.mv(dsym_path, "#{package_path}/#{File.basename dsym_path}")
111
110
  end
112
111
  end
@@ -1,5 +1,5 @@
1
- # -*- encoding : utf-8 -*-
1
+
2
2
  module Souyuz
3
- VERSION = "0.7.2"
3
+ VERSION = "0.10.0"
4
4
  DESCRIPTION = "A fastlane component to make Xamarin builds a breeze"
5
5
  end
data/lib/souyuz.rb CHANGED
@@ -1,10 +1,9 @@
1
- # -*- encoding : utf-8 -*-
2
1
  require 'souyuz/version'
3
2
  require 'souyuz/platform'
4
3
  require 'souyuz/manager'
5
4
  require 'souyuz/generators/build_command_generator'
6
- require 'souyuz/generators/android_zipalign_command_generator'
7
- require 'souyuz/generators/java_sign_command_generator'
5
+ require 'souyuz/generators/zipalign_command_generator'
6
+ require 'souyuz/generators/apk_sign_command_generator'
8
7
  require 'souyuz/generators/zip_dsym_command_generator'
9
8
  require 'souyuz/runner'
10
9
  require 'souyuz/options'
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: souyuz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Rudat
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-05 00:00:00.000000000 Z
11
+ date: 2021-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: nokogiri
14
+ name: fastlane
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.7'
19
+ version: 1.103.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.7'
26
+ version: 1.103.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: highline
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -39,19 +39,19 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.7'
41
41
  - !ruby/object:Gem::Dependency
42
- name: fastlane
42
+ name: nokogiri
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.103.0
47
+ version: '1.7'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.103.0
54
+ version: '1.7'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: pry
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -84,30 +84,16 @@ dependencies:
84
84
  name: rubocop
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: magic_encoding
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
87
+ - - '='
102
88
  - !ruby/object:Gem::Version
103
- version: '0'
89
+ version: 0.49.1
104
90
  type: :development
105
91
  prerelease: false
106
92
  version_requirements: !ruby/object:Gem::Requirement
107
93
  requirements:
108
- - - ">="
94
+ - - '='
109
95
  - !ruby/object:Gem::Version
110
- version: '0'
96
+ version: 0.49.1
111
97
  - !ruby/object:Gem::Dependency
112
98
  name: bundler
113
99
  requirement: !ruby/object:Gem::Requirement
@@ -149,10 +135,10 @@ files:
149
135
  - lib/souyuz.rb
150
136
  - lib/souyuz/commands_generator.rb
151
137
  - lib/souyuz/detect_values.rb
152
- - lib/souyuz/generators/android_zipalign_command_generator.rb
138
+ - lib/souyuz/generators/apk_sign_command_generator.rb
153
139
  - lib/souyuz/generators/build_command_generator.rb
154
- - lib/souyuz/generators/java_sign_command_generator.rb
155
140
  - lib/souyuz/generators/zip_dsym_command_generator.rb
141
+ - lib/souyuz/generators/zipalign_command_generator.rb
156
142
  - lib/souyuz/manager.rb
157
143
  - lib/souyuz/msbuild/project.rb
158
144
  - lib/souyuz/msbuild/solution.rb
@@ -173,15 +159,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
173
159
  requirements:
174
160
  - - ">="
175
161
  - !ruby/object:Gem::Version
176
- version: 2.0.0
162
+ version: 2.2.0
177
163
  required_rubygems_version: !ruby/object:Gem::Requirement
178
164
  requirements:
179
165
  - - ">="
180
166
  - !ruby/object:Gem::Version
181
167
  version: '0'
182
168
  requirements: []
183
- rubyforge_project:
184
- rubygems_version: 2.5.0
169
+ rubygems_version: 3.0.3
185
170
  signing_key:
186
171
  specification_version: 4
187
172
  summary: A fastlane component to make Xamarin builds a breeze
@@ -1,59 +0,0 @@
1
- # -*- encoding : utf-8 -*-
2
- module Souyuz
3
- # Responsible for building the zipalign command
4
- class AndroidZipalignCommandGenerator
5
- class << self
6
- def generate
7
- build_apk_path = Souyuz.cache[:build_apk_path]
8
- aligned_apk = "#{build_apk_path}-signed"
9
-
10
- parts = prefix
11
- parts << zipalign_apk
12
- parts += options
13
- parts << Souyuz.cache[:signed_apk_path]
14
- parts << Souyuz.cache[:build_apk_path]
15
- parts += pipe
16
-
17
- parts
18
- end
19
-
20
- def detect_build_tools
21
- # determine latest buildtool version
22
- buildtools = File.join(ENV['ANDROID_HOME'], 'build-tools')
23
- version = Dir.entries(buildtools).sort.last
24
-
25
- UI.success "Using Buildtools Version: #{version}..."
26
-
27
- [buildtools, version]
28
- end
29
-
30
- def zipalign_apk
31
- buildtools, version = detect_build_tools
32
- zipalign = ENV['ANDROID_HOME'] ? File.join(buildtools, version, 'zipalign') : 'zipalign'
33
-
34
- zipalign
35
- end
36
-
37
- def options
38
- config = Souyuz.config
39
-
40
- options = []
41
- options << "-v" if $verbose
42
- options << "-f"
43
- options << "4"
44
-
45
- options
46
- end
47
-
48
- def prefix
49
- ["set -o pipefail &&"]
50
- end
51
-
52
- def pipe
53
- pipe = []
54
-
55
- pipe
56
- end
57
- end
58
- end
59
- end
@@ -1,52 +0,0 @@
1
- # -*- encoding : utf-8 -*-
2
- module Souyuz
3
- # Responsible for building the jarsigner command
4
- class JavaSignCommandGenerator
5
- class << self
6
- def generate
7
- build_apk_path = Souyuz.cache[:build_apk_path]
8
- Souyuz.cache[:signed_apk_path] = "#{build_apk_path}-unaligned"
9
-
10
- parts = prefix
11
- parts << detect_jarsigner_executable
12
- parts += options
13
- parts << build_apk_path
14
- parts << Souyuz.config[:keystore_alias]
15
- parts += pipe
16
-
17
- parts
18
- end
19
-
20
- def prefix
21
- ["set -o pipefail &&"]
22
- end
23
-
24
- def detect_jarsigner_executable
25
- jarsigner = ENV['JAVA_HOME'] ? File.join(ENV['JAVA_HOME'], 'bin', 'jarsigner') : 'jarsigner'
26
-
27
- jarsigner
28
- end
29
-
30
- def options
31
- config = Souyuz.config
32
-
33
- options = []
34
- options << "-verbose" if $verbose
35
- options << "-sigalg MD5withRSA"
36
- options << "-digestalg SHA1"
37
- options << "-storepass \"#{config[:keystore_password]}\""
38
- options << "-keystore \"#{config[:keystore_path]}\""
39
- options << "-tsa #{config[:keystore_tsa]}"
40
- options << "-signedjar \"#{Souyuz.cache[:signed_apk_path]}\""
41
-
42
- options
43
- end
44
-
45
- def pipe
46
- pipe = []
47
-
48
- pipe
49
- end
50
- end
51
- end
52
- end