mirror of
https://github.com/RxReader/tencent_kit.git
synced 2025-07-02 11:06:37 +08:00
Enable alias parsing flutter_project_dir and Update Ci (#92)
This commit is contained in:
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -23,7 +23,7 @@ jobs:
|
||||
- run: clang-format -style=file -i ios/Classes/*.h ios/Classes/*.m --dry-run --Werror
|
||||
- run: flutter --version
|
||||
- run: flutter pub get
|
||||
- run: flutter format --dry-run --set-exit-if-changed .
|
||||
- run: dart format --set-exit-if-changed .
|
||||
- run: flutter pub publish --dry-run
|
||||
- run: flutter analyze lib example/lib
|
||||
- run: cd example; flutter build ios --no-codesign
|
||||
@ -46,7 +46,7 @@ jobs:
|
||||
channel: 'stable'
|
||||
- run: flutter --version
|
||||
- run: flutter pub get
|
||||
- run: flutter format --dry-run --set-exit-if-changed .
|
||||
- run: dart format --set-exit-if-changed .
|
||||
- run: flutter pub publish --dry-run
|
||||
- run: flutter analyze lib example/lib
|
||||
- run: cd example; flutter build apk --debug
|
||||
|
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
||||
echo $CREDENTIALS > $PUB_CACHE/credentials.json
|
||||
- run: flutter --version
|
||||
- run: flutter pub get
|
||||
- run: flutter format --dry-run --set-exit-if-changed .
|
||||
- run: dart format --set-exit-if-changed .
|
||||
- run: echo "y" | flutter pub publish
|
||||
- name: Run pub.dev/update-credentials@shell
|
||||
env:
|
||||
|
@ -8,7 +8,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
version: 1.0.0+100
|
||||
|
||||
environment:
|
||||
sdk: ">=2.17.0 <3.0.0"
|
||||
sdk: ">=2.17.0 <4.0.0"
|
||||
|
||||
# Dependencies specify other packages that your package needs in order to work.
|
||||
# To automatically upgrade your package dependencies to the latest versions
|
||||
|
@ -10,7 +10,15 @@ current_dir = Dir.pwd
|
||||
calling_dir = File.dirname(__FILE__)
|
||||
project_dir = calling_dir.slice(0..(calling_dir.index('/.symlinks')))
|
||||
flutter_project_dir = calling_dir.slice(0..(calling_dir.index('/ios/.symlinks')))
|
||||
cfg = YAML.load_file(File.join(flutter_project_dir, 'pubspec.yaml'))
|
||||
|
||||
psych_version_gte_500 = Gem::Version.new(Psych::VERSION) >= Gem::Version.new('5.0.0')
|
||||
if psych_version_gte_500 == true
|
||||
cfg = YAML.load_file(File.join(flutter_project_dir, 'pubspec.yaml'), aliases: true)
|
||||
else
|
||||
cfg = YAML.load_file(File.join(flutter_project_dir, 'pubspec.yaml'))
|
||||
end
|
||||
|
||||
|
||||
if cfg['tencent_kit'] && cfg['tencent_kit']['app_id']
|
||||
app_id = cfg['tencent_kit']['app_id']
|
||||
universal_link = cfg['tencent_kit']['universal_link']
|
||||
|
@ -7,7 +7,7 @@ repository: https://github.com/RxReader/tencent_kit.git
|
||||
issue_tracker: https://github.com/RxReader/tencent_kit/issues
|
||||
|
||||
environment:
|
||||
sdk: ">=2.17.0 <3.0.0"
|
||||
sdk: ">=2.17.0 <4.0.0"
|
||||
flutter: ">=2.5.0"
|
||||
|
||||
dependencies:
|
||||
|
@ -9,16 +9,19 @@ void main() {
|
||||
TestWidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
setUp(() {
|
||||
channel.setMockMethodCallHandler((MethodCall methodCall) async {
|
||||
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
|
||||
.setMockMethodCallHandler(channel, (MethodCall methodCall) async {
|
||||
switch (methodCall.method) {
|
||||
case 'isQQInstalled':
|
||||
return true;
|
||||
}
|
||||
return null;
|
||||
});
|
||||
});
|
||||
|
||||
tearDown(() {
|
||||
channel.setMockMethodCallHandler(null);
|
||||
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
|
||||
.setMockMethodCallHandler(channel, null);
|
||||
});
|
||||
|
||||
test('isQQInstalled', () async {
|
||||
|
Reference in New Issue
Block a user