diff --git a/.github/config/pre_changelog_hook.js b/.github/config/pre_changelog_hook.js index 8e36848..614e23e 100644 --- a/.github/config/pre_changelog_hook.js +++ b/.github/config/pre_changelog_hook.js @@ -21,6 +21,9 @@ exports.preVersionGeneration = (version) => { const new_gem_info = gem_info.replace(/VERSION\s*=\s*.*/g, `VERSION = '${version}'.freeze`); core.info(`Updated gem info: ${new_gem_info}`); fs.writeFileSync(gem_info_file, new_gem_info); + + const launchOption = { cwd: GITHUB_WORKSPACE }; + childProcess.execSync('bundle exec rake demo', launchOption); return version; } diff --git a/Gemfile b/Gemfile index 4be0127..a8777c8 100644 --- a/Gemfile +++ b/Gemfile @@ -12,4 +12,5 @@ group :development do gem 'bacon' gem 'mocha-on-bacon' gem 'prettybacon' + gem 'solargraph' end diff --git a/Gemfile.lock b/Gemfile.lock index 4da3251..ff4fa84 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - cocoapods-embed-flutter (0.5.1) + cocoapods-embed-flutter (0.5.2) cocoapods fileutils yaml @@ -22,8 +22,11 @@ GEM algoliasearch (1.27.5) httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) + ast (2.4.2) atomos (0.1.3) + backport (1.2.0) bacon (1.2.0) + benchmark (0.2.0) claide (1.1.0) cocoapods (1.11.2) addressable (~> 2.8) @@ -66,6 +69,8 @@ GEM concurrent-ruby (1.1.9) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) + diff-lcs (1.5.0) + e2mmap (0.1.0) escape (0.0.4) ethon (0.15.0) ffi (>= 1.15.0) @@ -107,8 +112,13 @@ GEM httpclient (2.8.3) i18n (1.10.0) concurrent-ruby (~> 1.0) + jaro_winkler (1.5.4) json (2.6.1) jwt (2.3.0) + kramdown (2.3.1) + rexml + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) minitest (5.15.0) mocha (1.13.0) mocha-on-bacon (0.2.3) @@ -120,25 +130,68 @@ GEM nanaimo (0.3.0) nap (1.1.0) netrc (0.11.0) + nokogiri (1.13.3-arm64-darwin) + racc (~> 1.4) + nokogiri (1.13.3-x86_64-darwin) + racc (~> 1.4) oauth2 (1.4.9) faraday (>= 0.17.3, < 3.0) jwt (>= 1.0, < 3.0) multi_json (~> 1.3) multi_xml (~> 0.5) rack (>= 1.2, < 3) + parallel (1.21.0) + parser (3.1.1.0) + ast (~> 2.4.1) prettybacon (0.0.2) bacon (~> 1.2) public_suffix (4.0.6) + racc (1.6.0) rack (2.2.3) + rainbow (3.1.1) rake (13.0.6) + regexp_parser (2.2.1) + reverse_markdown (2.1.1) + nokogiri rexml (3.2.5) + rubocop (1.26.0) + parallel (~> 1.10) + parser (>= 3.1.0.0) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml + rubocop-ast (>= 1.16.0, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 1.4.0, < 3.0) + rubocop-ast (1.16.0) + parser (>= 3.1.1.0) ruby-macho (2.5.1) + ruby-progressbar (1.11.0) ruby2_keywords (0.0.5) + solargraph (0.44.3) + backport (~> 1.2) + benchmark + bundler (>= 1.17.2) + diff-lcs (~> 1.4) + e2mmap + jaro_winkler (~> 1.5) + kramdown (~> 2.3) + kramdown-parser-gfm (~> 1.1) + parser (~> 3.0) + reverse_markdown (>= 1.0.5, < 3) + rubocop (>= 0.52) + thor (~> 1.0) + tilt (~> 2.0) + yard (~> 0.9, >= 0.9.24) + thor (1.2.1) thread_safe (0.3.6) + tilt (2.0.10) typhoeus (1.4.0) ethon (>= 0.9.0) tzinfo (2.0.4) concurrent-ruby (~> 1.0) + unicode-display_width (2.1.0) + webrick (1.7.0) xcodeproj (1.21.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) @@ -147,6 +200,8 @@ GEM nanaimo (~> 0.3.0) rexml (~> 3.2.4) yaml (0.2.0) + yard (0.9.27) + webrick (~> 1.7.0) zeitwerk (2.5.4) PLATFORMS @@ -165,6 +220,7 @@ DEPENDENCIES mocha-on-bacon prettybacon rake + solargraph BUNDLED WITH 2.3.7 diff --git a/README.md b/README.md index 956cab8..a497a04 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,11 @@ pub 'flutter_module', :git => 'https://github.com/gowalla/flutter_module.git', : pub 'flutter_module', :git => 'https://github.com/gowalla/flutter_module.git', :commit => '082f8319af' ``` +## Limitations + +- You won't be able to add more than one flutter module to a single target. Currently flutter only supports one module per target. +- No caching is done for external sources, every time you run `pod install` flutter module will be downloaded each time. + ## Links | Link | Description | diff --git a/Rakefile b/Rakefile index 47c4207..745e819 100644 --- a/Rakefile +++ b/Rakefile @@ -12,7 +12,7 @@ end desc 'Setup example project' task :demo do system('bundle install', exception: true) - Bundler.with_clean_env do + Bundler.with_unbundled_env do Dir.chdir('example/ios_app') do |path| system('bundle install', exception: true) system('bundle exec pod install', exception: true) diff --git a/cocoapods-embed-flutter.gemspec b/cocoapods-embed-flutter.gemspec index d598585..75c5bc9 100644 --- a/cocoapods-embed-flutter.gemspec +++ b/cocoapods-embed-flutter.gemspec @@ -9,28 +9,29 @@ Gem::Specification.new do |spec| spec.name = 'cocoapods-embed-flutter' spec.version = CocoapodsEmbedFlutter::VERSION - spec.authors = ['Soumya Ranjan Mahunt'] - spec.email = ['devsoumyamahunt@gmail.com'] - spec.description = %q{Embed flutter modules in iOS projects.} - spec.summary = <<-DESC - Straight forward way of declaring flutter modules as dependency for targets, - just like cocoapods does with pods. - DESC spec.homepage = repo_url spec.license = 'MIT' + spec.authors = ['Soumya Ranjan Mahunt'] + spec.email = ['devsoumyamahunt@gmail.com'] + spec.summary = %q{Embed flutter modules in iOS projects.} + spec.description = <<-EOF + Straight forward way of declaring flutter modules as dependency for targets, + just like cocoapods does with pods. + EOF - spec.files = `git ls-files`.split($/) + spec.files = `git ls-files`.split($/).grep_v(%r{^(example|.github)/}) spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ['lib'] - spec.add_dependency 'yaml' - spec.add_dependency 'fileutils' - spec.add_dependency 'cocoapods' + spec.add_runtime_dependency 'yaml' + spec.add_runtime_dependency 'fileutils' + spec.add_runtime_dependency 'cocoapods' spec.add_development_dependency 'bundler' spec.add_development_dependency 'rake' + spec.required_ruby_version = '>= 2.6' spec.metadata = { 'bug_tracker_uri' => "#{repo_url}/issues", 'changelog_uri' => "#{repo_url}/blob/main/CHANGELOG.md", diff --git a/example/ios_app/Gemfile.lock b/example/ios_app/Gemfile.lock index 462ff84..4c30168 100644 --- a/example/ios_app/Gemfile.lock +++ b/example/ios_app/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - cocoapods-embed-flutter (0.5.1) + cocoapods-embed-flutter (0.5.2) cocoapods fileutils yaml @@ -24,10 +24,10 @@ GEM json (>= 1.5.1) atomos (0.1.3) claide (1.1.0) - cocoapods (1.11.2) + cocoapods (1.11.3) addressable (~> 2.8) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.11.2) + cocoapods-core (= 1.11.3) cocoapods-deintegrate (>= 1.0.3, < 2.0) cocoapods-downloader (>= 1.4.0, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0) @@ -42,7 +42,7 @@ GEM nap (~> 1.0) ruby-macho (>= 1.0, < 3.0) xcodeproj (>= 1.21.0, < 2.0) - cocoapods-core (1.11.2) + cocoapods-core (1.11.3) activesupport (>= 5.0, < 7) addressable (~> 2.8) algoliasearch (~> 1.0) diff --git a/example/ios_app/Podfile.lock b/example/ios_app/Podfile.lock index 37d0f88..c2fd642 100644 --- a/example/ios_app/Podfile.lock +++ b/example/ios_app/Podfile.lock @@ -25,4 +25,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 63b6421f4bf00554065d89d2308ed2deb78332fc -COCOAPODS: 1.11.2 +COCOAPODS: 1.11.3