Skip to content

Commit

Permalink
🐛 fix: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
niuhuan committed Sep 6, 2024
1 parent 81f9b6c commit 4b6db53
Show file tree
Hide file tree
Showing 6 changed files with 403 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -299,21 +299,29 @@ jobs:
- name: Upgrade deps version (flutter3 non-mac)
if: steps.check_asset.outputs.skip_build != 'true' && startsWith(matrix.config.host, 'macos-') == false && startsWith(matrix.config.flutter_version, '3.22.3')
run: |
sed -i "s/uri_to_file: ^0.2.0/uri_to_file:\n git:\n url: 'https:\/\/github.com\/niuhuan\/uri-to-file-fix.git'\n ref: 'fix'\n/g" pubspec.yaml
sed -i "s/uni_links: ^0.5.1/uni_links3: ^0.5.3/g" pubspec.yaml
sed -i "s/permission_handler: ^10.1.0/permission_handler: ^11.3.1/g" pubspec.yaml
sed -i "s/image_picker: ^0.8.6/image_picker: ^1.1.2/g" pubspec.yaml
sed -i "s/image_cropper: ^1.5.0/image_cropper: ^8.0.2/g" pubspec.yaml
sed -i "s/flutter_datetime_picker: ^1.5.1/flutter_datetime_picker_plus: ^2.2.0/g" pubspec.yaml
sed -i "s/filesystem_picker: ^3.0.0-beta.1/filesystem_picker: ^4.1.0/g" pubspec.yaml
sed -i "s/flutter_styled_toast: ^2.0.0/flutter_styled_toast: ^2.2.1/g" pubspec.yaml
sed -i "s/intl: ^0.17.0/intl: ^0.19.0/g" pubspec.yaml
sed -i "s/flutter_datetime_picker/flutter_datetime_picker_plus/g" lib/screens/RegisterScreen.dart
sed -i "s/file_picker: ^5.2.1/file_picker: ^8.1.2/g" pubspec.yaml
sed -i "s/photo_view: ^0.13.0/photo_view: ^0.15.0/g" pubspec.yaml
sed -i "s/dividerColor: Colors.grey.shade200/DividerThemeData(color: Colors.grey.shade200)/g" lib/basic/config/Themes.dart
sed -i "s/url_launcher: ^6.0.9/url_launcher: ^6.3.0/g" pubspec.yaml
sed -i "s/dividerColor: Colors.grey.shade200/dividerTheme: DividerThemeData(color: Colors.grey.shade200)/g" lib/basic/config/Themes.dart
sed -i "s/AppBarTheme(/AppBarTheme(titleTextStyle: const TextStyle(color: Colors.white),/g" lib/basic/config/Themes.dart
find lib -type f -name "*.dart" -exec sed -i "s/.headline4/.headlineMedium/g" {} \;
find lib -type f -name "*.dart" -exec sed -i "s/.bodyText1/.bodyMedium/g" {} \;
find lib -type f -name "*.dart" -exec sed -i "s/ImageStreamCompleter load(/ImageStreamCompleter loadImage(/g" {} \;
find lib -type f -name "*.dart" -exec sed -i "s/DecoderCallback decode/ImageDecoderCallback decode/g" {} \;
find lib -type f -name "*.dart" -exec sed -i "s/PaintingBinding.instance\!.instantiateImageCodec/ui.instantiateImageCodec/g" {} \;
find lib -type f -name "*.dart" -exec sed -i "s/as ui show Codec/as ui/g" {} \;
find lib -type f -name "*.dart" -exec sed -i "s/uni_links\/uni_links.dart/uni_links3\/uni_links3.dart/g" {} \;
find lib -type f -name "*.dart" -exec sed -i "s/File? croppedFile/CroppedFile? croppedFile/g" {} \;
flutter pub upgrade
flutter pub get
cp -rf compatible/* ./
Expand All @@ -322,6 +330,11 @@ jobs:
if: steps.check_asset.outputs.skip_build != 'true' && startsWith(matrix.config.host, 'macos-') && startsWith(matrix.config.flutter_version, '3.22.3')
run: |
brew install gnu-sed
gsed -i "s/uri_to_file: ^0.2.0/uri_to_file:\n git:\n url: 'https:\/\/github.com\/niuhuan\/uri-to-file-fix.git'\n ref: 'fix'\n/g" pubspec.yaml
gsed -i "s/uni_links: ^0.5.1/uni_links3: ^0.5.3/g" pubspec.yaml
gsed -i "s/permission_handler: ^10.1.0/permission_handler: ^11.3.1/g" pubspec.yaml
gsed -i "s/image_picker: ^0.8.6/image_picker: ^1.1.2/g" pubspec.yaml
gsed -i "s/image_cropper: ^1.5.0/image_cropper: ^8.0.2/g" pubspec.yaml
gsed -i "s/flutter_datetime_picker: ^1.5.1/flutter_datetime_picker_plus: ^2.2.0/g" pubspec.yaml
gsed -i "s/intl: ^0.17.0/intl: ^0.19.0/g" pubspec.yaml
gsed -i "s/filesystem_picker: ^3.0.0-beta.1/filesystem_picker: ^4.1.0/g" pubspec.yaml
Expand All @@ -330,14 +343,17 @@ jobs:
gsed -i "s/flutter_datetime_picker/flutter_datetime_picker_plus/g" lib/screens/RegisterScreen.dart
gsed -i "s/file_picker: ^5.2.1/file_picker: ^8.1.2/g" pubspec.yaml
gsed -i "s/photo_view: ^0.13.0/photo_view: ^0.15.0/g" pubspec.yaml
gsed -i "s/dividerColor: Colors.grey.shade200/DividerThemeData(color: Colors.grey.shade200)/g" lib/basic/config/Themes.dart
gsed -i "s/url_launcher: ^6.0.9/url_launcher: ^6.3.0/g" pubspec.yaml
gsed -i "s/dividerColor: Colors.grey.shade200/dividerTheme: DividerThemeData(color: Colors.grey.shade200)/g" lib/basic/config/Themes.dart
gsed -i "s/AppBarTheme(/AppBarTheme(titleTextStyle: const TextStyle(color: Colors.white),/g" lib/basic/config/Themes.dart
find lib -type f -name "*.dart" -exec gsed -i "s/.headline4/.headlineMedium/g" {} \;
find lib -type f -name "*.dart" -exec gsed -i "s/.bodyText1/.bodyMedium/g" {} \;
find lib -type f -name "*.dart" -exec gsed -i "s/ImageStreamCompleter load(/ImageStreamCompleter loadImage(/g" {} \;
find lib -type f -name "*.dart" -exec gsed -i "s/DecoderCallback decode/ImageDecoderCallback decode/g" {} \;
find lib -type f -name "*.dart" -exec gsed -i "s/PaintingBinding.instance\!.instantiateImageCodec/ui.instantiateImageCodec/g" {} \;
find lib -type f -name "*.dart" -exec gsed -i "s/as ui show Codec/as ui/g" {} \;
find lib -type f -name "*.dart" -exec gsed -i "s/uni_links\/uni_links.dart/uni_links3\/uni_links.dart/g" {} \;
find lib -type f -name "*.dart" -exec gsed -i "s/File? croppedFile/CroppedFile? croppedFile/g" {} \;
flutter pub upgrade
flutter pub get
Expand Down
13 changes: 13 additions & 0 deletions compatible/android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
gradle/wrapper/gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java

# Remember to never publicly share your keystore.
# See https://flutter.dev/to/reference-keystore
key.properties
**/*.keystore
**/*.jks
9 changes: 9 additions & 0 deletions compatible/android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_INTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</manifest>
116 changes: 116 additions & 0 deletions compatible/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_INTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />

<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https" />
</intent>
</queries>

<application
android:label="pikapika"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:taskAffinity=""
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
<data android:scheme="http" />
<data android:host="pika" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="pika" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<data
android:host="*"
android:mimeType="*/*"
android:scheme="content"></data>
<data android:pathPattern=".*\.pkz"></data>
<data android:pathPattern=".*\..*\.pkz"></data>
<data android:pathPattern=".*\..*\..*\.pkz"></data>
<data android:pathPattern=".*\..*\..*\..*\.pkz"></data>
<data android:pathPattern=".*\..*\..*\..*\..*\.pkz"></data>
<data android:pathPattern=".*\..*\..*\..*\..*\..*\.pkz"></data>
<data android:pathPattern=".*\.pki"></data>
<data android:pathPattern=".*\..*\.pki"></data>
<data android:pathPattern=".*\..*\..*\.pki"></data>
<data android:pathPattern=".*\..*\..*\..*\.pki"></data>
<data android:pathPattern=".*\..*\..*\..*\..*\.pki"></data>
<data android:pathPattern=".*\..*\..*\..*\..*\..*\.pki"></data>
<data
android:host="*"
android:mimeType="*/*"
android:scheme="file"></data>
<data android:pathPattern=".*\.pkz"></data>
<data android:pathPattern=".*\..*\.pkz"></data>
<data android:pathPattern=".*\..*\..*\.pkz"></data>
<data android:pathPattern=".*\..*\..*\..*\.pkz"></data>
<data android:pathPattern=".*\..*\..*\..*\..*\.pkz"></data>
<data android:pathPattern=".*\..*\..*\..*\..*\..*\.pkz"></data>
<data android:pathPattern=".*\.pki"></data>
<data android:pathPattern=".*\..*\.pki"></data>
<data android:pathPattern=".*\..*\..*\.pki"></data>
<data android:pathPattern=".*\..*\..*\..*\.pki"></data>
<data android:pathPattern=".*\..*\..*\..*\..*\.pki"></data>
<data android:pathPattern=".*\..*\..*\..*\..*\..*\.pki"></data>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<!-- image_cropper -->
<activity
android:name="com.yalantis.ucrop.UCropActivity"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
</application>
<!-- Required to query activities that can process text, see:
https://developer.android.com/training/package-visibility and
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain"/>
</intent>
</queries>
</manifest>
6 changes: 6 additions & 0 deletions compatible/android/app/src/profile/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
Loading

0 comments on commit 4b6db53

Please sign in to comment.