cocoapods-flutter-dt 0.0.4 → 0.0.6
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: 272b96287602bf74de8764fe7a9a8bd25d19a9765d13b1ee9cacb65df507211f
|
4
|
+
data.tar.gz: 1f15b5aed10853f4749b8d061357418b08a883b77294c2e02d32715aaecfc74b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80fcfc8eb5d20c396feb7c4c9f0010dfadc2c03d88e45b770d90d86fcd603c1dbe3f23530118b7f48ec1ba5f03bdba26e047c8e21028b904c46f59e97236d6dc
|
7
|
+
data.tar.gz: bdbbd63f84837080c46479e16ed7a69dd323c28d701726244f3ea0d84cd0c782ce7cce30bfce0bac8df4a825eb631529347fe96d0015d6d09efa87137300ccd2
|
data/README.md
CHANGED
@@ -1,23 +1,24 @@
|
|
1
1
|
# cocoapods-flutter
|
2
2
|
|
3
|
-
|
3
|
+
Cocoapods plugin for Flutter project integration.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
7
|
**Precondition**
|
8
|
-
|
8
|
+
|
9
|
+
Before you use `cocoapods-flutter`, make sure binary server is ready. I provide you a simple binary server. Click link below and redirect to another repository.
|
9
10
|
|
10
11
|
[BinaryServer](https://github.com/NicolasKim/binary_server.git)
|
11
|
-
|
12
|
+
|
12
13
|
|
13
14
|
**Gem install**
|
14
15
|
|
15
16
|
```
|
16
|
-
$ gem install cocoapods-flutter
|
17
|
+
$ gem install cocoapods-flutter-dt
|
17
18
|
```
|
18
19
|
Or download source code build gem on your own
|
19
20
|
```
|
20
|
-
$ gem install cocoapods-flutter.gem
|
21
|
+
$ gem install cocoapods-flutter-dt.gem
|
21
22
|
```
|
22
23
|
|
23
24
|
**Config environment**
|
@@ -26,28 +27,63 @@ $ export FLUTTER_BINARY_SERVER_BASEURL=https://www.example.com
|
|
26
27
|
```
|
27
28
|
Here is simple [binary server](https://github.com/NicolasKim/binary_server.git)
|
28
29
|
|
30
|
+
|
29
31
|
## Usage
|
32
|
+
|
33
|
+
|
34
|
+
### Archive
|
35
|
+
|
36
|
+
```shell script
|
37
|
+
$ cd flutter project
|
38
|
+
$ pod flutter archive package_name 0.0.1 --repo=cocoapods --wrapper=flutterw --sources=https://github.com/private_spec_repo.git,https://github.com/Cocoapods/Specs.git
|
39
|
+
```
|
40
|
+
|
41
|
+
|
42
|
+
There is more options
|
43
|
+
```shell script
|
44
|
+
$ pod flutter archive --help
|
45
|
+
--repo podspec repo
|
46
|
+
--sources podspec sources
|
47
|
+
--upgrade pub upgrade
|
48
|
+
--wrapper Default is flutter
|
49
|
+
--flutterversion FlutterSDK version
|
50
|
+
--buildrun run build-runner
|
51
|
+
```
|
52
|
+
If you need to customize the .ios/Podfile, you can create a file name of 'local_podfile', the tool will use this file in first priority.
|
53
|
+
|
54
|
+
### Use
|
55
|
+
|
30
56
|
In Podfile
|
57
|
+
```
|
58
|
+
plugin 'cocoapods-flutter-dt'
|
59
|
+
```
|
31
60
|
|
32
61
|
|
62
|
+
#### Case 1
|
63
|
+
Use binary of flutter, In this case, tool will download code from binary server.
|
64
|
+
```ruby
|
65
|
+
flutter_pod 'package_name', '0.0.1', :mode=>'debug/release'
|
66
|
+
```
|
33
67
|
|
34
|
-
|
68
|
+
#### Case 2
|
69
|
+
Use local flutter project, compile dart code every time when you build native code
|
35
70
|
```ruby
|
36
|
-
flutter_pod 'package_name', '0.0.1'
|
71
|
+
flutter_pod 'package_name', '0.0.1',:mode=>'debug/release', :path=>'local path of pubspec file'
|
37
72
|
```
|
38
73
|
|
39
|
-
**package_name**
|
40
|
-
Name of package
|
41
|
-
**:sdk_version**
|
42
|
-
Flutter sdk version,default is 1.12.13
|
43
|
-
**:mode**
|
44
|
-
Download binary package of version of debug/release from binary server. On mode debug, of course you can attach, and on mode release, yeah it is just release.
|
45
74
|
|
46
|
-
|
75
|
+
#### Case 3
|
76
|
+
Pull flutter project from git repository. In this case, the tool will pull the flutter project into native project root directory and create framework when you pod install or update
|
47
77
|
```ruby
|
48
|
-
flutter_pod '
|
78
|
+
flutter_pod 'package_name', '0.0.1', :mode=>'debug/release', :git=>{
|
79
|
+
|
80
|
+
:url=>'http://github.com/flutter/package_name.git',
|
81
|
+
|
82
|
+
:ref=>'master',
|
83
|
+
|
84
|
+
:wrapper => 'flutterw'
|
85
|
+
|
86
|
+
}
|
49
87
|
```
|
50
|
-
**:path**
|
51
|
-
Local path of module
|
52
88
|
|
53
89
|
and `pod install`
|
data/cocoapods-flutter.gemspec
CHANGED
@@ -8,9 +8,9 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = CocoapodsFlutter::VERSION
|
9
9
|
spec.authors = ['Dreamtracer']
|
10
10
|
spec.email = ['jinqiucheng1006@live.cn']
|
11
|
-
spec.description = %q{
|
12
|
-
spec.summary = %q{
|
13
|
-
spec.homepage = 'https://github.com/
|
11
|
+
spec.description = %q{Flutter archive tool}
|
12
|
+
spec.summary = %q{Simple way to archive and use}
|
13
|
+
spec.homepage = 'https://github.com/NicolasKim/cocoapods-flutter-dt.git'
|
14
14
|
spec.license = 'MIT'
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
@@ -48,7 +48,12 @@ class Archiver
|
|
48
48
|
def archive
|
49
49
|
|
50
50
|
@pub_upgrade ? pub_upgrade : pub_get
|
51
|
-
|
51
|
+
if local_podfile_exists?
|
52
|
+
use_local_podfile
|
53
|
+
else
|
54
|
+
setup_pod_sources
|
55
|
+
end
|
56
|
+
|
52
57
|
if @build_run
|
53
58
|
excute_build_run
|
54
59
|
end
|
@@ -118,6 +123,11 @@ class Archiver
|
|
118
123
|
end
|
119
124
|
end
|
120
125
|
|
126
|
+
def local_podfile_exists?
|
127
|
+
local_podfile_dir = @working_dir + '/local_podfile'
|
128
|
+
File.exist? local_podfile_dir
|
129
|
+
end
|
130
|
+
|
121
131
|
def setup_pod_sources
|
122
132
|
Pod::UserInterface.info 'Setup pod sources...'
|
123
133
|
origin_pod_file_root_dir = @working_dir + '/.ios'
|
@@ -166,6 +176,16 @@ class Archiver
|
|
166
176
|
|
167
177
|
end
|
168
178
|
|
179
|
+
def use_local_podfile
|
180
|
+
origin_pod_file_root_dir = @working_dir + '/.ios'
|
181
|
+
origin_pod_file_dir = origin_pod_file_root_dir+ '/Podfile'
|
182
|
+
if File.exist? origin_pod_file_dir
|
183
|
+
File.delete(origin_pod_file_dir)
|
184
|
+
end
|
185
|
+
local_podfile_dir = @working_dir + '/local_podfile'
|
186
|
+
FileUtils.copy_file local_podfile_dir, origin_pod_file_dir
|
187
|
+
end
|
188
|
+
|
169
189
|
def excute_build_run
|
170
190
|
if CommandRunner.run(@flutter_wrapper, 'packages','pub','run','build_runner','build','--delete-conflicting-outputs') == false
|
171
191
|
raise "run build_runner fail"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-flutter-dt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "\bDreamtracer"
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|
@@ -108,7 +108,7 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
-
description:
|
111
|
+
description: Flutter archive tool
|
112
112
|
email:
|
113
113
|
- jinqiucheng1006@live.cn
|
114
114
|
executables: []
|
@@ -142,11 +142,11 @@ files:
|
|
142
142
|
- lib/cocoapods_plugin.rb
|
143
143
|
- spec/command/flutter_spec.rb
|
144
144
|
- spec/spec_helper.rb
|
145
|
-
homepage: https://github.com/
|
145
|
+
homepage: https://github.com/NicolasKim/cocoapods-flutter-dt.git
|
146
146
|
licenses:
|
147
147
|
- MIT
|
148
148
|
metadata: {}
|
149
|
-
post_install_message:
|
149
|
+
post_install_message:
|
150
150
|
rdoc_options: []
|
151
151
|
require_paths:
|
152
152
|
- lib
|
@@ -162,9 +162,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
162
162
|
version: '0'
|
163
163
|
requirements: []
|
164
164
|
rubygems_version: 3.0.6
|
165
|
-
signing_key:
|
165
|
+
signing_key:
|
166
166
|
specification_version: 4
|
167
|
-
summary:
|
167
|
+
summary: Simple way to archive and use
|
168
168
|
test_files:
|
169
169
|
- spec/command/flutter_spec.rb
|
170
170
|
- spec/spec_helper.rb
|