souyuz 0.9.1 → 0.10.3
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/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 +4 -4
- 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: 1e220206e25541589dda5230b47d77324e2dca9e90a617901c6d902a30501ae3
|
4
|
+
data.tar.gz: 8cb0863e48ab03d84e03b3e941dfec830473ef677f9636e4c4386d0e411e0227
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edce7ce36c5f520b68a8f86344a6b1dcfea67c14c9b5426a529724caa85ccd6f19e75a29c4e1db7a27c303228b7532f4e89a80425bcc1f94439a99e3f7a6e660
|
7
|
+
data.tar.gz: b9d36c35beecb77c8f53cce3db76bb57f718f1ae21a97ea663724f000344a0fa261decf3795b17db756cb11be1a3020bf3b6e2c6dffd7d0224c8f2512d4f7e87
|
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"
|
31
|
+
options << "--verbose" if $verbose
|
32
|
+
options << "--ks \"#{Souyuz.config[:keystore_path]}\""
|
33
|
+
options << "--ks-pass \"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
|
@@ -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.3
|
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
|
@@ -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
|
@@ -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
|