fastlane-plugin-xcsize 1.0.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 300893845f17cc41c7da2d6f4e36bf0770953052363a9ecd423cf495275ffd66
4
+ data.tar.gz: b27fff9260c59372e46e8d4f1a6f9d7c09fb8300ba8deb9d162abc9eaead9ee6
5
+ SHA512:
6
+ metadata.gz: fd1d586b2400380ca4fb6bdd5fc77979c857814de7560a422abae818d83e826b9205f1b4320e4c624f22ea6d7e6829a8c04a82d759578b4d8f648114f47e4d71
7
+ data.tar.gz: 983b781b7d1947fb1f0bc556c2713854b53d1079c423dc462d4cb808caa05e0314d0fbbe69e6d586c3ee2df1438ac9fa7457c9c2e4b440d495edabb4ddfdab9a
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Alexey Alter-Pesotskiy
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,21 @@
1
+ # XCSize
2
+
3
+ A fastlane plugin to profile iOS and macOS app and framework sizes from linkmap files, providing detailed breakdowns and insights.
4
+
5
+ ## Getting Started
6
+
7
+ To get started with `xcsize`, add it to your project by running:
8
+
9
+ ```bash
10
+ fastlane add_plugin xcsize
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```ruby
16
+ lane :test do
17
+ xcsize(linkmap: 'path/to/your/app.linkmap')
18
+
19
+ xcsize_diff(old_linkmap: 'path/to/your/old.linkmap', new_linkmap: 'path/to/your/new.linkmap')
20
+ end
21
+ ```
@@ -0,0 +1,56 @@
1
+ module Fastlane
2
+ module Actions
3
+ class XcsizeAction < Action
4
+ def self.run(params)
5
+ Actions.verify_gem!('xcsize')
6
+
7
+ require 'xcsize'
8
+
9
+ options = {}
10
+ params.all_keys.each { |k| options[k] = params[k] }
11
+
12
+ ::Xcsize::Profiler.new(options).profile
13
+ end
14
+
15
+ def self.description
16
+ 'Profile iOS and macOS binary size using linkmap.'
17
+ end
18
+
19
+ def self.authors
20
+ ['Alexey Alter-Pesotskiy']
21
+ end
22
+
23
+ def self.available_options
24
+ [
25
+ FastlaneCore::ConfigItem.new(
26
+ key: :linkmap,
27
+ description: 'Set linkmap path',
28
+ is_string: true,
29
+ optional: false
30
+ ),
31
+ FastlaneCore::ConfigItem.new(
32
+ key: :threshold,
33
+ description: 'Set minimum size threshold in bytes',
34
+ is_string: false,
35
+ optional: false
36
+ )
37
+ ]
38
+ end
39
+
40
+ def self.example_code
41
+ [
42
+ 'report = xcsize(
43
+ linkmap: "path/to/your/app.linkmap",
44
+ threshold: 1024
45
+ )
46
+ p report[:total_size]
47
+ p report[:details]'
48
+ ]
49
+ end
50
+
51
+ def self.is_supported?(platform)
52
+ [:ios, :mac].include?(platform)
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,65 @@
1
+ module Fastlane
2
+ module Actions
3
+ class XcsizeDiffAction < Action
4
+ def self.run(params)
5
+ Actions.verify_gem!('xcsize')
6
+
7
+ require 'xcsize'
8
+
9
+ options = {}
10
+ params.all_keys.each { |k| options[k] = params[k] }
11
+
12
+ ::Xcsize::Comparator.new(options).compare
13
+ end
14
+
15
+ def self.description
16
+ 'Compare two iOS and macOS binary sizes using linkmaps.'
17
+ end
18
+
19
+ def self.authors
20
+ ['Alexey Alter-Pesotskiy']
21
+ end
22
+
23
+ def self.available_options
24
+ [
25
+ FastlaneCore::ConfigItem.new(
26
+ key: :old_linkmap,
27
+ description: 'Set old linkmap path',
28
+ is_string: true,
29
+ optional: false
30
+ ),
31
+ FastlaneCore::ConfigItem.new(
32
+ key: :new_linkmap,
33
+ description: 'Set new linkmap path',
34
+ is_string: true,
35
+ optional: false
36
+ ),
37
+ FastlaneCore::ConfigItem.new(
38
+ key: :threshold,
39
+ description: 'Set minimum size difference threshold in bytes',
40
+ is_string: false,
41
+ optional: false
42
+ )
43
+ ]
44
+ end
45
+
46
+ def self.example_code
47
+ [
48
+ 'report = xcsize_diff(
49
+ old_linkmap: "path/to/your/old.linkmap",
50
+ new_linkmap: "path/to/your/new.linkmap",
51
+ threshold: 1024
52
+ )
53
+ p report[:old_total_size]
54
+ p report[:new_total_size]
55
+ p report[:difference]
56
+ p report[:details]'
57
+ ]
58
+ end
59
+
60
+ def self.is_supported?(platform)
61
+ [:ios, :mac].include?(platform)
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,5 @@
1
+ module Fastlane
2
+ module Xcsize
3
+ VERSION = "1.0.0"
4
+ end
5
+ end
@@ -0,0 +1,16 @@
1
+ require 'fastlane/plugin/xcsize/version'
2
+
3
+ module Fastlane
4
+ module Xcsize
5
+ # Return all .rb files inside the "actions" directory
6
+ def self.all_classes
7
+ Dir[File.expand_path('**/{actions}/*.rb', File.dirname(__FILE__))]
8
+ end
9
+ end
10
+ end
11
+
12
+ # By default we want to import all available actions and helpers
13
+ # A plugin can contain any number of actions and plugins
14
+ Fastlane::Xcsize.all_classes.each do |current|
15
+ require current
16
+ end
metadata ADDED
@@ -0,0 +1,68 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fastlane-plugin-xcsize
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Alexey Alter-Pesotskiy
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2025-10-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: xcsize
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '='
18
+ - !ruby/object:Gem::Version
19
+ version: 1.0.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 1.0.0
27
+ description: A fastlane plugin to profile iOS and macOS app and framework sizes from
28
+ linkmap files, providing detailed breakdowns and insights.
29
+ email: alex@testableapple.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - LICENSE
35
+ - README.md
36
+ - lib/fastlane/plugin/xcsize.rb
37
+ - lib/fastlane/plugin/xcsize/actions/xcsize_action.rb
38
+ - lib/fastlane/plugin/xcsize/actions/xcsize_diff_action.rb
39
+ - lib/fastlane/plugin/xcsize/version.rb
40
+ homepage: https://github.com/testableapple/fastlane-plugin-xcsize
41
+ licenses:
42
+ - MIT
43
+ metadata:
44
+ allowed_push_host: https://rubygems.org
45
+ homepage_uri: https://github.com/testableapple/fastlane-plugin-xcsize
46
+ source_code_uri: https://github.com/testableapple/fastlane-plugin-xcsize
47
+ changelog_uri: https://github.com/testableapple/fastlane-plugin-xcsize/blob/main/CHANGELOG.md
48
+ rubygems_mfa_required: 'true'
49
+ post_install_message:
50
+ rdoc_options: []
51
+ require_paths:
52
+ - lib
53
+ required_ruby_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: '2.4'
58
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ requirements: []
64
+ rubygems_version: 3.5.11
65
+ signing_key:
66
+ specification_version: 4
67
+ summary: Measure iOS and macOS app and framework sizes using linkmaps
68
+ test_files: []