Enable alias parsing flutter_project_dir and Update Ci (#92)

This commit is contained in:
wenchieh
2023-05-24 23:57:53 +08:00
committed by GitHub
parent bbce20d4f8
commit 3a62daf897
6 changed files with 19 additions and 8 deletions

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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']

View File

@ -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:

View File

@ -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 {