souyuz 0.8.1 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -2
- data/lib/souyuz/detect_values.rb +15 -0
- data/lib/souyuz/generators/apk_sign_command_generator.rb +47 -0
- data/lib/souyuz/generators/build_command_generator.rb +8 -8
- data/lib/souyuz/generators/zipalign_command_generator.rb +45 -0
- data/lib/souyuz/options.rb +5 -1
- data/lib/souyuz/runner.rb +10 -10
- data/lib/souyuz/version.rb +1 -1
- data/lib/souyuz.rb +2 -2
- metadata +7 -8
- data/lib/souyuz/generators/android_zipalign_command_generator.rb +0 -55
- data/lib/souyuz/generators/java_sign_command_generator.rb +0 -51
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8182d1d45cfe1912e724c4e7b57bbf5dc6619a77eea97cbe1a2e0e6586b6991a
|
4
|
+
data.tar.gz: da6ac32d2b8a6b53995af55e624b303ab739ff6790fa9dcc8591b040a7a5cae3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6f3a8b49153b55ca2cc1a89ba0a21ae3e69b23dabcca15d7e14c79adc7563cd712b8806b998d24896ab03f324b0180e18b4cc10ec05c7f194a0fa0e442a9102
|
7
|
+
data.tar.gz: ea0fdc1fba410eb7bae843fd57e141780976e0b4b923b0afed5feb00b03778003c9520c10ace969dbb27e7f8ebd41c7bb4af00b7e5a85ef408055eb511f6b808
|
data/README.md
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
# Souyuz
|
2
2
|
|
3
|
-
[![Build Status](https://travis-ci.org/voydz/souyuz.svg?branch=master)](https://travis-ci.org/voydz/souyuz)
|
4
|
-
|
5
3
|
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.
|
6
4
|
|
7
5
|
*NOTE: While souyuz should continue working with your existing configuration just fine, consider using the Fastlane plugin.*
|
data/lib/souyuz/detect_values.rb
CHANGED
@@ -24,6 +24,7 @@ module Souyuz
|
|
24
24
|
|
25
25
|
detect_output_path doc_csproj
|
26
26
|
detect_manifest doc_csproj
|
27
|
+
detect_build_tools
|
27
28
|
detect_info_plist
|
28
29
|
detect_assembly_name doc_csproj # we can only do that for android *after* we detected the android manitfest
|
29
30
|
|
@@ -78,6 +79,20 @@ module Souyuz
|
|
78
79
|
Souyuz.config[:manifest_path] = abs_project_path doc_node.text
|
79
80
|
end
|
80
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
|
+
|
81
96
|
def self.detect_info_plist
|
82
97
|
return if Souyuz.config[:plist_path] or Souyuz.config[:platform] != Platform::IOS
|
83
98
|
|
@@ -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}-signed"
|
8
|
+
|
9
|
+
parts = prefix
|
10
|
+
parts << detect_apksigner_executable
|
11
|
+
parts += options
|
12
|
+
parts << Souyuz.cache[:aligned_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
|
@@ -25,26 +25,26 @@ module Souyuz
|
|
25
25
|
config = Souyuz.config
|
26
26
|
|
27
27
|
options = []
|
28
|
-
options << "/p:Configuration=#{config[:build_configuration]}" if config[:build_configuration]
|
29
28
|
options << config[:extra_build_options] if config[:extra_build_options]
|
30
|
-
options << "
|
31
|
-
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
32
|
if config[:solution_path]
|
33
33
|
solution_dir = File.dirname(config[:solution_path])
|
34
|
-
options << "
|
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| "
|
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 << "
|
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
|
@@ -0,0 +1,45 @@
|
|
1
|
+
module Souyuz
|
2
|
+
# Responsible for building the zipalign command
|
3
|
+
class ZipalignCommandGenerator
|
4
|
+
class << self
|
5
|
+
def generate
|
6
|
+
build_apk_path = Souyuz.cache[:build_apk_path]
|
7
|
+
Souyuz.cache[:aligned_apk_path] = "#{build_apk_path}-aligned"
|
8
|
+
|
9
|
+
parts = prefix
|
10
|
+
parts << zipalign_apk
|
11
|
+
parts += options
|
12
|
+
parts << build_apk_path
|
13
|
+
parts << Souyuz.cache[:aligned_apk_path]
|
14
|
+
parts += pipe
|
15
|
+
|
16
|
+
parts
|
17
|
+
end
|
18
|
+
|
19
|
+
def zipalign_apk
|
20
|
+
zipalign = File.join(Souyuz.config[:buildtools_path], 'zipalign')
|
21
|
+
|
22
|
+
zipalign
|
23
|
+
end
|
24
|
+
|
25
|
+
def options
|
26
|
+
options = []
|
27
|
+
options << "-v" if $verbose
|
28
|
+
options << "-f"
|
29
|
+
options << "4"
|
30
|
+
|
31
|
+
options
|
32
|
+
end
|
33
|
+
|
34
|
+
def prefix
|
35
|
+
[""]
|
36
|
+
end
|
37
|
+
|
38
|
+
def pipe
|
39
|
+
pipe = []
|
40
|
+
|
41
|
+
pipe
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
data/lib/souyuz/options.rb
CHANGED
@@ -58,6 +58,10 @@ module Souyuz
|
|
58
58
|
env_name: "SOUYUZ_ANDROID_MANIFEST_PATH",
|
59
59
|
description: "Path to the android manifest (xml) file",
|
60
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),
|
61
65
|
FastlaneCore::ConfigItem.new(key: :plist_path,
|
62
66
|
env_name: "SOUYUZ_IOS_PLIST_PATH",
|
63
67
|
description: "Path to the iOS plist file",
|
@@ -77,7 +81,7 @@ module Souyuz
|
|
77
81
|
FastlaneCore::ConfigItem.new(key: :keystore_tsa,
|
78
82
|
default_value: 'http://timestamp.digicert.com',
|
79
83
|
env_name: "SOUYUZ_ANDROID_KEYSTORE_TSA",
|
80
|
-
description: "TSA for
|
84
|
+
description: "TSA for apksigner",
|
81
85
|
optional: true)
|
82
86
|
]
|
83
87
|
end
|
data/lib/souyuz/runner.rb
CHANGED
@@ -15,9 +15,7 @@ module Souyuz
|
|
15
15
|
elsif Souyuz.project.android?
|
16
16
|
path = apk_file
|
17
17
|
if config[:keystore_path] && config[:keystore_alias]
|
18
|
-
|
19
|
-
|
20
|
-
jarsign_and_zipalign
|
18
|
+
apksign_and_zipalign
|
21
19
|
end
|
22
20
|
|
23
21
|
path
|
@@ -44,18 +42,20 @@ module Souyuz
|
|
44
42
|
"#{build_path}/#{assembly_name}.apk"
|
45
43
|
end
|
46
44
|
|
47
|
-
def
|
48
|
-
|
45
|
+
def apksign_and_zipalign
|
46
|
+
UI.success "Start signing process..."
|
47
|
+
|
48
|
+
command = ZipalignCommandGenerator.generate
|
49
49
|
FastlaneCore::CommandExecutor.execute(command: command,
|
50
|
-
print_all:
|
50
|
+
print_all: true,
|
51
51
|
print_command: !Souyuz.config[:silent])
|
52
52
|
|
53
|
-
|
54
|
-
|
55
|
-
command = AndroidZipalignCommandGenerator.generate
|
53
|
+
command = ApkSignCommandGenerator.generate
|
56
54
|
FastlaneCore::CommandExecutor.execute(command: command,
|
57
|
-
print_all:
|
55
|
+
print_all: false,
|
58
56
|
print_command: !Souyuz.config[:silent])
|
57
|
+
|
58
|
+
UI.success "Successfully signed apk #{Souyuz.cache[:build_apk_path]}"
|
59
59
|
end
|
60
60
|
|
61
61
|
#
|
data/lib/souyuz/version.rb
CHANGED
data/lib/souyuz.rb
CHANGED
@@ -2,8 +2,8 @@ require 'souyuz/version'
|
|
2
2
|
require 'souyuz/platform'
|
3
3
|
require 'souyuz/manager'
|
4
4
|
require 'souyuz/generators/build_command_generator'
|
5
|
-
require 'souyuz/generators/
|
6
|
-
require 'souyuz/generators/
|
5
|
+
require 'souyuz/generators/zipalign_command_generator'
|
6
|
+
require 'souyuz/generators/apk_sign_command_generator'
|
7
7
|
require 'souyuz/generators/zip_dsym_command_generator'
|
8
8
|
require 'souyuz/runner'
|
9
9
|
require 'souyuz/options'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: souyuz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Rudat
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastlane
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
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:
|
26
|
+
version: 1.103.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: highline
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -135,10 +135,10 @@ files:
|
|
135
135
|
- lib/souyuz.rb
|
136
136
|
- lib/souyuz/commands_generator.rb
|
137
137
|
- lib/souyuz/detect_values.rb
|
138
|
-
- lib/souyuz/generators/
|
138
|
+
- lib/souyuz/generators/apk_sign_command_generator.rb
|
139
139
|
- lib/souyuz/generators/build_command_generator.rb
|
140
|
-
- lib/souyuz/generators/java_sign_command_generator.rb
|
141
140
|
- lib/souyuz/generators/zip_dsym_command_generator.rb
|
141
|
+
- lib/souyuz/generators/zipalign_command_generator.rb
|
142
142
|
- lib/souyuz/manager.rb
|
143
143
|
- lib/souyuz/msbuild/project.rb
|
144
144
|
- lib/souyuz/msbuild/solution.rb
|
@@ -166,8 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
166
166
|
- !ruby/object:Gem::Version
|
167
167
|
version: '0'
|
168
168
|
requirements: []
|
169
|
-
|
170
|
-
rubygems_version: 2.7.6
|
169
|
+
rubygems_version: 3.0.3
|
171
170
|
signing_key:
|
172
171
|
specification_version: 4
|
173
172
|
summary: A fastlane component to make Xamarin builds a breeze
|
@@ -1,55 +0,0 @@
|
|
1
|
-
module Souyuz
|
2
|
-
# Responsible for building the zipalign command
|
3
|
-
class AndroidZipalignCommandGenerator
|
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 detect_build_tools
|
17
|
-
UI.user_error! "Please ensure that the Android SDK is installed and the ANDROID_HOME variable is set correctly" unless ENV['ANDROID_HOME']
|
18
|
-
|
19
|
-
# determine latest buildtool version
|
20
|
-
buildtools = File.join(ENV['ANDROID_HOME'], 'build-tools')
|
21
|
-
version = Dir.entries(buildtools).sort.last
|
22
|
-
|
23
|
-
UI.success "Using Buildtools Version: #{version}..."
|
24
|
-
|
25
|
-
[buildtools, version]
|
26
|
-
end
|
27
|
-
|
28
|
-
def zipalign_apk
|
29
|
-
buildtools, version = detect_build_tools
|
30
|
-
zipalign = ENV['ANDROID_HOME'] ? File.join(buildtools, version, 'zipalign') : 'zipalign'
|
31
|
-
|
32
|
-
zipalign
|
33
|
-
end
|
34
|
-
|
35
|
-
def options
|
36
|
-
options = []
|
37
|
-
options << "-v" if $verbose
|
38
|
-
options << "-f"
|
39
|
-
options << "4"
|
40
|
-
|
41
|
-
options
|
42
|
-
end
|
43
|
-
|
44
|
-
def prefix
|
45
|
-
[""]
|
46
|
-
end
|
47
|
-
|
48
|
-
def pipe
|
49
|
-
pipe = []
|
50
|
-
|
51
|
-
pipe
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
@@ -1,51 +0,0 @@
|
|
1
|
-
module Souyuz
|
2
|
-
# Responsible for building the jarsigner command
|
3
|
-
class JavaSignCommandGenerator
|
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_jarsigner_executable
|
11
|
-
parts += options
|
12
|
-
parts << build_apk_path
|
13
|
-
parts << Souyuz.config[:keystore_alias]
|
14
|
-
parts += pipe
|
15
|
-
|
16
|
-
parts
|
17
|
-
end
|
18
|
-
|
19
|
-
def prefix
|
20
|
-
[""]
|
21
|
-
end
|
22
|
-
|
23
|
-
def detect_jarsigner_executable
|
24
|
-
jarsigner = ENV['JAVA_HOME'] ? File.join(ENV['JAVA_HOME'], 'bin', 'jarsigner') : 'jarsigner'
|
25
|
-
|
26
|
-
jarsigner
|
27
|
-
end
|
28
|
-
|
29
|
-
def options
|
30
|
-
config = Souyuz.config
|
31
|
-
|
32
|
-
options = []
|
33
|
-
options << "-verbose" if $verbose
|
34
|
-
options << "-sigalg MD5withRSA"
|
35
|
-
options << "-digestalg SHA1"
|
36
|
-
options << "-storepass \"#{config[:keystore_password]}\""
|
37
|
-
options << "-keystore \"#{config[:keystore_path]}\""
|
38
|
-
options << "-tsa #{config[:keystore_tsa]}"
|
39
|
-
options << "-signedjar \"#{Souyuz.cache[:signed_apk_path]}\""
|
40
|
-
|
41
|
-
options
|
42
|
-
end
|
43
|
-
|
44
|
-
def pipe
|
45
|
-
pipe = []
|
46
|
-
|
47
|
-
pipe
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|