gonative-cli 0.7.13 → 0.7.17
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 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 266c15337f1ef121f2c088feb35a31f7045992e4925baec26ed20b11785534f5
         | 
| 4 | 
            +
              data.tar.gz: 7f51fbebfab848d4b6d460637c3489aef0a8fc2113608d7bb8dd5ae8930e3154
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: c803898debbc3f77c285444856a5f708296b6e911fc4e98a2bf17c1a3966b6f7f1fa844cac7f98c198cc721add3cf3e54887be11024160d2213c9143ce055146
         | 
| 7 | 
            +
              data.tar.gz: 21f1d1a60f93e09d5837b0a6a5e9da4259f6c51dc98ff14c62f1615e0c3acb2c20db251858750873ab8b5a9f0921dba7dbf61b02447937b28ca4be3852fa32f0
         | 
| @@ -8,10 +8,11 @@ module GoNative | |
| 8 8 | 
             
                    argument :name, required: true, desc: 'Name of the plugin'
         | 
| 9 9 | 
             
                    option :skip_build, type: :boolean, default: false
         | 
| 10 10 | 
             
                    option :debug, type: :boolean, default: false
         | 
| 11 | 
            +
                    option :archs, default: 'x86_64,arm64'
         | 
| 11 12 |  | 
| 12 | 
            -
                    def call(name:, skip_build:, debug:, **)
         | 
| 13 | 
            +
                    def call(name:, skip_build:, debug:, archs:, **)
         | 
| 13 14 | 
             
                      Plugins::IOS::Verify.call
         | 
| 14 | 
            -
                      Plugins::IOS::BuildFramework.call(name, debug) unless skip_build
         | 
| 15 | 
            +
                      Plugins::IOS::BuildFramework.call(name, archs, debug) unless skip_build
         | 
| 15 16 | 
             
                      Plugins::IOS::Release.call
         | 
| 16 17 | 
             
                    end
         | 
| 17 18 | 
             
                  end
         | 
| @@ -14,10 +14,11 @@ module GoNative | |
| 14 14 |  | 
| 15 15 | 
             
                    BUILD_TEMPLATE_DIRECTORY_PATH = File.expand_path(File.join(__dir__, '../../../..', 'templates', 'build', 'ios'))
         | 
| 16 16 |  | 
| 17 | 
            -
                    attr_reader :plugin_name, :persist_build_dir
         | 
| 17 | 
            +
                    attr_reader :plugin_name, :archs, :persist_build_dir
         | 
| 18 18 |  | 
| 19 | 
            -
                    def initialize(plugin_name, persist_build_dir)
         | 
| 19 | 
            +
                    def initialize(plugin_name, archs, persist_build_dir)
         | 
| 20 20 | 
             
                      @plugin_name = plugin_name
         | 
| 21 | 
            +
                      @archs = archs.gsub(',', ' ')
         | 
| 21 22 | 
             
                      @persist_build_dir = persist_build_dir
         | 
| 22 23 | 
             
                    end
         | 
| 23 24 |  | 
| @@ -42,7 +43,10 @@ module GoNative | |
| 42 43 |  | 
| 43 44 | 
             
                    def create_framework_proj
         | 
| 44 45 | 
             
                      proj = Xcodeproj::Project.new(FileUtils.pwd)
         | 
| 45 | 
            -
                      target = proj.new_target(:framework, | 
| 46 | 
            +
                      target = proj.new_target(:framework,
         | 
| 47 | 
            +
                                               "#{plugin_name}",
         | 
| 48 | 
            +
                                               :ios,
         | 
| 49 | 
            +
                                               deployment_target)
         | 
| 46 50 | 
             
                      main_group = proj.new_group(plugin_name, plugin_name)
         | 
| 47 51 | 
             
                      classes_group = main_group.new_group('Classes', 'Classes')
         | 
| 48 52 | 
             
                      references = Dir.glob("../#{plugin_name}/Classes/**").map{ |file| classes_group.new_file("../../#{file}") }
         | 
| @@ -54,10 +58,13 @@ module GoNative | |
| 54 58 | 
             
                    end
         | 
| 55 59 |  | 
| 56 60 | 
             
                    def move_template_files
         | 
| 57 | 
            -
                      spec = Pod::Specification.from_file("../#{plugin_name}.podspec")
         | 
| 58 61 | 
             
                      plugin_dependencies = spec.dependencies.map{|d| ["pod '#{d.name}'", "'#{d.requirement}'"].compact.join(', ') } * "\n\t"
         | 
| 59 62 | 
             
                      FileUtils.cp_r("#{BUILD_TEMPLATE_DIRECTORY_PATH}/.", '.')
         | 
| 60 | 
            -
                      Utils::TemplateInflator.new(plugin_name: plugin_name, | 
| 63 | 
            +
                      Utils::TemplateInflator.new(plugin_name: plugin_name,
         | 
| 64 | 
            +
                                                  plugin_dependencies: plugin_dependencies,
         | 
| 65 | 
            +
                                                  archs: archs,
         | 
| 66 | 
            +
                                                  deployment_target: deployment_target
         | 
| 67 | 
            +
                      ).call
         | 
| 61 68 | 
             
                    end
         | 
| 62 69 |  | 
| 63 70 | 
             
                    def run_pod_install
         | 
| @@ -76,8 +83,17 @@ module GoNative | |
| 76 83 | 
             
                    end
         | 
| 77 84 |  | 
| 78 85 | 
             
                    def move_framework_file
         | 
| 86 | 
            +
                      FileUtils.rm_rf('../XCFramework')
         | 
| 79 87 | 
             
                      FileUtils.mv("XCFramework", '..', force: true)
         | 
| 80 88 | 
             
                    end
         | 
| 89 | 
            +
                    
         | 
| 90 | 
            +
                    def deployment_target
         | 
| 91 | 
            +
                      spec.deployment_target('ios') || '11.0'
         | 
| 92 | 
            +
                    end
         | 
| 93 | 
            +
                    
         | 
| 94 | 
            +
                    def spec
         | 
| 95 | 
            +
                      @spec ||= Pod::Specification.from_file("../#{plugin_name}.podspec")
         | 
| 96 | 
            +
                    end
         | 
| 81 97 | 
             
                  end
         | 
| 82 98 | 
             
                end
         | 
| 83 99 | 
             
              end
         | 
    
        data/lib/gonative/version.rb
    CHANGED
    
    
| @@ -21,7 +21,7 @@ mkdir "${FRAMEWORK_FOLDER_NAME}" | |
| 21 21 | 
             
            echo "Created ${FRAMEWORK_FOLDER_NAME}"
         | 
| 22 22 | 
             
            echo "Archiving ${FRAMEWORK_NAME}"
         | 
| 23 23 |  | 
| 24 | 
            -
            xcodebuild -workspace "#{plugin_name}.xcworkspace" archive ONLY_ACTIVE_ARCH=NO -scheme ${BUILD_SCHEME} -destination="generic/platform=iOS Simulator" -archivePath "${SIMULATOR_ARCHIVE_PATH}" -sdk iphonesimulator SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES
         | 
| 24 | 
            +
            xcodebuild -workspace "#{plugin_name}.xcworkspace" archive ONLY_ACTIVE_ARCH=NO ARCHS="#{archs}" -scheme ${BUILD_SCHEME} -destination="generic/platform=iOS Simulator" -archivePath "${SIMULATOR_ARCHIVE_PATH}" -sdk iphonesimulator SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES
         | 
| 25 25 |  | 
| 26 26 | 
             
            xcodebuild archive -workspace "#{plugin_name}.xcworkspace" -scheme ${BUILD_SCHEME} -destination="generic/platform=iOS" -archivePath "${IOS_DEVICE_ARCHIVE_PATH}" -sdk iphoneos SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES
         | 
| 27 27 |  |