fastlane-plugin-pod_spec_generator 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 030c121fb95de7ecb68b24fb7fb7de91c087548d9bce3e0d1e3019c2b7cb8585
4
- data.tar.gz: 1b1fed0b388162b44d9ea9730a632aacaf1efdd284f2a8ed23f55be5b5449fcb
3
+ metadata.gz: c8915eaf10d3bcd91de913542f42f246681f84553656797da5f67e9c2e4b57c9
4
+ data.tar.gz: 96442ee5fd4428f701066e87af37f3a948d0026e30363b486034ec8c642c3c65
5
5
  SHA512:
6
- metadata.gz: cc85d77599f2aae2f7086b678c5ae9d53511e7edd3e8c725eb3e7f4d30303a526334c01bf8f0e04789f947fd5a0d61377c784b0379a22887a7a94d4d28070106
7
- data.tar.gz: 21f9cddf3181a6816b68d9bf31ba67479a66ddc5abfbf6c88350f44f71a4525b2f4e355ea1c6c061566dad3d665dc86a0855a9a923f38d8180409e7799bd31c7
6
+ metadata.gz: 2b452a337dde23046e100b3e4cd091c6a02f5782c3d595c0221fb4ab0d5709b2ec77cabc5dae8994dad6fb8dd0a14f08cf54a57440f5937b3688f884ea58b946
7
+ data.tar.gz: 81e66c10f5b5fb7c053610afabba27d0963479805263e99964b983941a5e4ecd100c5c4e76160a531381858995295f0e9f0154b72c427bc88c1a58de03def980
@@ -107,7 +107,3 @@ class Pod::Podfile
107
107
  end
108
108
  end
109
109
  end
110
-
111
- # class Pod::Podfile
112
- # prepend PodFileExtension
113
- # end
@@ -7,9 +7,15 @@ module Fastlane
7
7
 
8
8
  def self.run(params)
9
9
  builder = PodFileBuilder.new
10
- builder.apply_local_spm_fix = params[:apply_local_spm_fix] ? true : false
10
+ builder.apply_local_spm_fix = params[:apply_local_spm_fix]
11
11
  builder.targets = params[:targets]
12
- builder.use_frameworks = params[:use_frameworks] ? true : false
12
+ builder.use_frameworks = params[:use_frameworks]
13
+ if params[:platform]
14
+ builder.platform = params[:platform].reduce([]) do |content, pair|
15
+ content += [":#{pair[0]}", pair[1]]
16
+ end
17
+ end
18
+
13
19
  output = builder.build_pod_file_string
14
20
  File.write("#{params[:folder]}/Podfile", output)
15
21
 
@@ -36,13 +42,15 @@ module Fastlane
36
42
  FastlaneCore::ConfigItem.new(key: :use_frameworks,
37
43
  env_name: "POD_FILE_GENERATOR_VERSION",
38
44
  description: "Version String",
45
+ type: TrueClass,
39
46
  default_value: true,
40
47
  optional: true),
41
48
  FastlaneCore::ConfigItem.new(key: :apply_local_spm_fix,
42
49
  env_name: "POD_LOCAL_SPM",
43
50
  description: "Use local spm",
44
- optional: true,
45
- type: String),
51
+ type: TrueClass,
52
+ default_value: false,
53
+ optional: true),
46
54
  FastlaneCore::ConfigItem.new(key: :targets,
47
55
  description: "Targets",
48
56
  optional: false,
@@ -51,7 +59,13 @@ module Fastlane
51
59
  env_name: "POD_FILE_GENERATOR_FOLDER",
52
60
  description: "Folder for the file String",
53
61
  optional: false,
54
- type: String)
62
+ type: String),
63
+ FastlaneCore::ConfigItem.new(key: :platform,
64
+ env_name: "POD_FILE_GENERATOR_PLATFORM",
65
+ description: "Platform",
66
+ default_value: {ios: "14.0"},
67
+ optional: true,
68
+ type: Hash)
55
69
 
56
70
  ]
57
71
  end
@@ -3,16 +3,19 @@
3
3
  class PodFileBuilder
4
4
  attr_writer :use_frameworks,
5
5
  :targets,
6
- :apply_local_spm_fix
6
+ :apply_local_spm_fix,
7
+ :platform
7
8
 
8
9
  def initialize
9
10
  @use_frameworks = true
10
11
  @targets = []
11
12
  @apply_local_spm_fix = false
13
+ @platform = nil
12
14
  end
13
15
 
14
16
  def build_pod_file_string
15
17
  [use_frameworks_string,
18
+ platform,
16
19
  apply_local_spm_fix_string,
17
20
  targets_string,
18
21
  ].compact
@@ -27,6 +30,10 @@ class PodFileBuilder
27
30
  end
28
31
  end
29
32
 
33
+ def platform
34
+ return nil unless @platform
35
+ "platform #{@platform.join(", ")}"
36
+ end
30
37
  def create_target_string(target)
31
38
  start = "target '#{target[:name]}' do"
32
39
  dependencies = target[:dependencies].map do |dependency|
@@ -42,6 +49,7 @@ class PodFileBuilder
42
49
 
43
50
  def apply_local_spm_fix_string
44
51
  return "plugin 'fastlane-plugin-pod_spec_generator'" if @apply_local_spm_fix
52
+
45
53
  return nil
46
54
  end
47
55
  def use_frameworks_string
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module PodSpecGenerator
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-pod_spec_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Crowe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-30 00:00:00.000000000 Z
11
+ date: 2024-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods