def upload_binary_data(apk_path)
      apk_version_code = nil
      if apk_path
        UI.message("Preparing apk at path '#{apk_path}' for upload...")
        apk_version_code = client.upload_apk(apk_path)
        UI.user_error!("Could not upload #{apk_path}") unless apk_version_code

        if Supply.config[:obb_main_references_version] && Supply.config[:obb_main_file_size]
          update_obb(apk_version_code,
                     'main',
                     Supply.config[:obb_main_references_version],
                     Supply.config[:obb_main_file_size])
        end

        if Supply.config[:obb_patch_references_version] && Supply.config[:obb_patch_file_size]
          update_obb(apk_version_code,
                     'patch',
                     Supply.config[:obb_patch_references_version],
                     Supply.config[:obb_patch_file_size])
        end

        upload_obbs(apk_path, apk_version_code)

        if metadata_path
          all_languages.each do |language|
            next if language.start_with?('.') # e.g. . or .. or hidden folders
            upload_changelog(language, apk_version_code)
          end
        end
      else
        UI.message("No apk file found, you can pass the path to your apk using the `apk` option")
      end
      apk_version_code
    end
def upload_binary_data(apk_path)
      apk_version_code = nil
      if apk_path
        UI.message("Preparing apk at path '#{apk_path}' for upload...")
        apk_version_code = client.upload_apk(apk_path)
        UI.user_error!("Could not upload #{apk_path}") unless apk_version_code

        if Supply.config[:obb_main_references_version] && Supply.config[:obb_main_file_size]
          update_obb(apk_version_code,
                     'main',
                     Supply.config[:obb_main_references_version],
                     Supply.config[:obb_main_file_size])
        end

        if Supply.config[:obb_patch_references_version] && Supply.config[:obb_patch_file_size]
          update_obb(apk_version_code,
                     'patch',
                     Supply.config[:obb_patch_references_version],
                     Supply.config[:obb_patch_file_size])
        end

        upload_obbs(apk_path, apk_version_code)

        if metadata_path
          all_languages.each do |language|
            next if language.start_with?('.') # e.g. . or .. or hidden folders
            upload_changelog(language, apk_version_code)
          end
        end
      else
        UI.message("No apk file found, you can pass the path to your apk using the `apk` option")
      end
      apk_version_code
    end
Upload binary apk and obb and corresponding change logs with client

 @param [String] apk_path
    Path of the apk file to upload.

 @return [Integer] The apk version code returned after uploading, or nil if there was a problem