Skip to content

Commit

Permalink
Upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrysbita committed Nov 24, 2024
1 parent 5593ff5 commit afdfc64
Show file tree
Hide file tree
Showing 38 changed files with 258 additions and 1,013 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,21 @@ jobs:
channel: beta
- name: Build
run: |
FLUTTER_BUILD_NUMBER=$(git rev-list --count HEAD)
GIT_DESC=$(git describe --tags)
if [[ $GIT_DESC =~ v([0-9]+)\.([0-9]+)\.([0-9]+)-([0-9]+)-g[a-f0-9]+ ]]; then
FLUTTER_BUILD_NAME="${BASH_REMATCH[1]}.$((BASH_REMATCH[2]+1)).${BASH_REMATCH[3]}"
else
FLUTTER_BUILD_NAME="0.0.1"
fi
echo $CONFIG_ENV | base64 -d > .env
echo $ANDROID_RELEASE_SIGN_KEY | base64 -d > ./android/app/x.jks
flutter build apk \
--release \
--target-platform=android-arm64 \
--build-name=$FLUTTER_BUILD_NAME \
--build-number=$FLUTTER_BUILD_NUMBER \
--dart-define-from-file=.env
env:
CONFIG_ENV: ${{ secrets.CONFIG_ENV }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ jobs:
flutter build macos \
--release \
--build-name=$FLUTTER_BUILD_NAME \
--build-number=$FLUTTER_BUILD_NUMBER
--build-number=$FLUTTER_BUILD_NUMBER \
--dart-define-from-file=.env
env:
CONFIG_ENV: ${{ secrets.CONFIG_ENV }}
- uses: actions/upload-artifact@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
FLUTTER_BUILD_NUMBER=$(git rev-list --count HEAD)
GIT_DESC=$(git describe --tags)
if [[ $GIT_DESC =~ v([0-9]+)\.([0-9]+)\.([0-9]+)-([0-9]+)-g[a-f0-9]+ ]]; then
FLUTTER_BUILD_NAME="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}.${BASH_REMATCH[3]}"
FLUTTER_BUILD_NAME="${BASH_REMATCH[1]}.$((BASH_REMATCH[2]+1)).${BASH_REMATCH[3]}"
else
FLUTTER_BUILD_NAME="0.0.1"
fi
Expand All @@ -37,8 +37,8 @@ jobs:
--release \
--build-name=$FLUTTER_BUILD_NAME \
--build-number=$FLUTTER_BUILD_NUMBER \
--source-maps \
--dart-define-from-file=.env
--dart-define-from-file=.env \
--source-maps
env:
CONFIG_ENV: ${{ secrets.CONFIG_ENV }}
- uses: actions/upload-artifact@v4
Expand Down
28 changes: 14 additions & 14 deletions .metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,32 @@
# This file should be version controlled and should not be manually edited.

version:
revision: 2e449f06f0a3be076e336ad6b30b0e9ec99dbdfe
channel: alpha
revision: "2e2c358c9b14765c90343af9df11e12c5dfc3e6c"
channel: "beta"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
create_revision: 2e2c358c9b14765c90343af9df11e12c5dfc3e6c
base_revision: 2e2c358c9b14765c90343af9df11e12c5dfc3e6c
- platform: android
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
create_revision: 2e2c358c9b14765c90343af9df11e12c5dfc3e6c
base_revision: 2e2c358c9b14765c90343af9df11e12c5dfc3e6c
- platform: ios
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
create_revision: 2e2c358c9b14765c90343af9df11e12c5dfc3e6c
base_revision: 2e2c358c9b14765c90343af9df11e12c5dfc3e6c
- platform: macos
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
create_revision: 2e2c358c9b14765c90343af9df11e12c5dfc3e6c
base_revision: 2e2c358c9b14765c90343af9df11e12c5dfc3e6c
- platform: web
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
create_revision: 2e2c358c9b14765c90343af9df11e12c5dfc3e6c
base_revision: 2e2c358c9b14765c90343af9df11e12c5dfc3e6c
- platform: windows
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
create_revision: 2e2c358c9b14765c90343af9df11e12c5dfc3e6c
base_revision: 2e2c358c9b14765c90343af9df11e12c5dfc3e6c

# User provided section

Expand Down
3 changes: 0 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
Expand Down
1 change: 0 additions & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ linter:
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
avoid_print: false
prefer_single_quotes: true
prefer_relative_imports: true
# Additional information about this file can be found at
Expand Down
4 changes: 1 addition & 3 deletions android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ gradle-wrapper.jar
GeneratedPluginRegistrant.java

# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
# See https://flutter.dev/to/reference-keystore
key.properties
**/*.keystore
**/*.jks

app/google-services.json
59 changes: 18 additions & 41 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,71 +1,48 @@
plugins {
id "com.android.application"
id "kotlin-android"
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file("local.properties")
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader("UTF-8") { reader ->
localProperties.load(reader)
}
}

def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
if (flutterVersionCode == null) {
flutterVersionCode = "git rev-list HEAD --count".execute().text.trim()
}

def flutterVersionName = localProperties.getProperty("flutter.versionName")
if (flutterVersionName == null) {
flutterVersionName = "git describe --tags".execute().text.trim().substring(1)
}

android {
namespace "io.xdea.xmux"
compileSdk flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
namespace = "io.xdea.xmux"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = "1.8"
}

sourceSets {
main.java.srcDirs += "src/main/kotlin"
jvmTarget = JavaVersion.VERSION_1_8
}

defaultConfig {
applicationId "org.ctbeta.xmux.xmux"
minSdk 23
targetSdk flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
applicationId = "org.ctbeta.xmux.xmux"
minSdk = 23
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}

signingConfigs {
release {
storeFile System.getenv('KEYSTORE_FILE') ? file(System.getenv('KEYSTORE_FILE')) : null
storePassword System.getenv('KEYSTORE_PASSWORD')
keyAlias System.getenv('KEY_ALIAS')
keyPassword System.getenv('KEY_PASSWORD')
storeFile = System.getenv('KEYSTORE_FILE') ? file(System.getenv('KEYSTORE_FILE')) : null
storePassword = System.getenv('KEYSTORE_PASSWORD')
keyAlias = System.getenv('KEY_ALIAS')
keyPassword = System.getenv('KEY_PASSWORD')
}
}

buildTypes {
release {
signingConfig signingConfigs.release
signingConfig = signingConfigs.release
}
}
}

flutter {
source "../.."
source = "../.."
}

dependencies {}
3 changes: 2 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
android:name="io.xdea.xmux.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"
Expand All @@ -36,7 +37,7 @@
android:value="2" />
</application>
<!-- Required to query activities that can process text, see:
https://developer.android.com/training/package-visibility?hl=en and
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. -->
Expand Down
2 changes: 2 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ allprojects {
rootProject.buildDir = "../build"
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(":app")
}

Expand Down
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
org.gradle.jvmargs=-Xmx4G
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
3 changes: 0 additions & 3 deletions devtools_options.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions ios/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,3 @@ Runner/GeneratedPluginRegistrant.*
!default.mode2v3
!default.pbxuser
!default.perspectivev3

GoogleService-Info.plist
7 changes: 7 additions & 0 deletions packages/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://dart.dev/guides/libraries/private-files
# Created by `dart pub`
/*/.dart_tool/

# Avoid committing pubspec.lock for library packages; see
# https://dart.dev/guides/libraries/private-files#pubspeclock.
/*/pubspec.lock
10 changes: 0 additions & 10 deletions packages/aaos/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion packages/aaos/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ dependencies:
dev_dependencies:
build_runner: ^2.0.0
json_serializable: ^6.0.0
lints: ^2.0.0
lints: ^5.0.0
test: ^1.16.0
10 changes: 0 additions & 10 deletions packages/barracuda_campus/.gitignore

This file was deleted.

4 changes: 2 additions & 2 deletions packages/barracuda_campus/lib/barracuda_campus.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'package:html/parser.dart';
import 'package:intl/intl.dart';

class _CookieManager extends CookieManager {
_CookieManager(CookieJar cookieJar) : super(cookieJar);
_CookieManager(super.cookieJar);

@override
void onRequest(RequestOptions options, RequestInterceptorHandler handler) {
Expand Down Expand Up @@ -60,7 +60,7 @@ class BCStudent {
'submit': 'Login',
},
);
} on DioError catch (e) {
} on DioException catch (e) {
if (e.response?.statusCode != 302) rethrow;
final location = e.response?.headers['Location'];
if (location?.first.contains('/student/login') ?? false) {
Expand Down
2 changes: 1 addition & 1 deletion packages/barracuda_campus/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ dependencies:
intl: ^0.19.0

dev_dependencies:
lints: ^2.0.0
lints: ^5.0.0
10 changes: 0 additions & 10 deletions packages/emgs/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions packages/emgs/lib/emgs.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
library emgs;

import 'dart:convert';

import 'package:http/http.dart' as http;
Expand Down
2 changes: 1 addition & 1 deletion packages/emgs/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ dependencies:
dev_dependencies:
build_runner: ^2.0.0
json_serializable: ^6.0.0
lints: ^2.0.0
lints: ^5.0.0
10 changes: 0 additions & 10 deletions packages/maintenance/.gitignore

This file was deleted.

7 changes: 3 additions & 4 deletions packages/maintenance/lib/src/cookie_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,16 @@ class CookieManager extends Interceptor {
}

@override
void onError(DioError err, ErrorInterceptorHandler handler) {
void onError(DioException err, ErrorInterceptorHandler handler) {
if (err.response != null) {
_saveCookies(err.response!)
.then((_) => handler.next(err))
.catchError((e, stackTrace) {
var _err = DioException(
handler.next(DioException(
requestOptions: err.response!.requestOptions,
error: e,
stackTrace: stackTrace,
);
handler.next(_err);
));
});
} else {
handler.next(err);
Expand Down
2 changes: 1 addition & 1 deletion packages/maintenance/lib/src/maintenance.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Maintenance {
followRedirects: true,
),
);
} on DioError catch (e) {
} on DioException catch (e) {
final resp = e.response;
if (resp == null || resp.statusCode != 302) rethrow;
if (resp.statusCode == 302) return;
Expand Down
3 changes: 2 additions & 1 deletion packages/maintenance/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ dependencies:
cookie_jar: ^4.0.0
dio: ^5.0.0
html: ^0.15.0
http_parser: ^4.0.0
intl: ^0.19.0
mobx: ^2.0.0

dev_dependencies:
build_runner: ^2.0.0
lints: ^2.0.0
lints: ^5.0.0
mobx_codegen: ^2.0.0
Loading

0 comments on commit afdfc64

Please sign in to comment.