Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/dev/3.10.7 #255

Merged
merged 8 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ jobs:
with:
flutter-version: '3.24.x'
channel: 'stable'
- name: Decrypt dev configs
run: sh ./scripts/decrypt_dev_configs.sh
env:
DEV_CONFIGS_PASSPHRASE: ${{ secrets.DEV_CONFIGS_PASSPHRASE }}
- name: Install Flutter dependencies
run: flutter pub get
- run: flutter build appbundle --release
Expand Down Expand Up @@ -73,6 +77,12 @@ jobs:
with:
flutter-version: '3.24.x'
channel: 'stable'
- name: Decrypt dev configs
run: sh ./scripts/decrypt_dev_configs.sh
env:
DEV_CONFIGS_PASSPHRASE: ${{ secrets.DEV_CONFIGS_PASSPHRASE }}
- name: Install flutterfire_cli
run: dart pub global activate flutterfire_cli
- run: flutter pub get
- run: flutter build ios --release --no-codesign
- uses: ruby/setup-ruby@v1
Expand Down Expand Up @@ -132,6 +142,10 @@ jobs:
with:
flutter-version: '3.24.x'
channel: 'stable'
- name: Decrypt dev configs
run: sh ./scripts/decrypt_dev_configs.sh
env:
DEV_CONFIGS_PASSPHRASE: ${{ secrets.DEV_CONFIGS_PASSPHRASE }}
- name: Enable windows
run: flutter config --enable-windows-desktop
- run: flutter doctor -v
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ jobs:
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
- name: Decrypt dev configs
run: sh ./scripts/decrypt_dev_configs.sh
env:
DEV_CONFIGS_PASSPHRASE: ${{ secrets.DEV_CONFIGS_PASSPHRASE }}
- run: flutter pub get
- name: Analyze files
run: flutter analyze .
Expand All @@ -51,6 +55,10 @@ jobs:
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
- name: Decrypt dev configs
run: sh ./scripts/decrypt_dev_configs.sh
env:
DEV_CONFIGS_PASSPHRASE: ${{ secrets.DEV_CONFIGS_PASSPHRASE }}
- run: flutter pub get
- name: Build Android app bundle
run: flutter build appbundle --release
Expand Down Expand Up @@ -78,7 +86,13 @@ jobs:
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
- name: Decrypt dev configs
run: sh ./scripts/decrypt_dev_configs.sh
env:
DEV_CONFIGS_PASSPHRASE: ${{ secrets.DEV_CONFIGS_PASSPHRASE }}
- run: flutter pub get
- name: Install flutterfire_cli
run: dart pub global activate flutterfire_cli
- name: Build iOS
run: flutter build ios --release --no-codesign

Expand Down Expand Up @@ -128,6 +142,10 @@ jobs:
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
- name: Decrypt dev configs
run: sh ./scripts/decrypt_dev_configs.sh
env:
DEV_CONFIGS_PASSPHRASE: ${{ secrets.DEV_CONFIGS_PASSPHRASE }}
- name: Intall requird Dependencies
run: sudo apt -y install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev
- name: Enable linux
Expand All @@ -150,6 +168,10 @@ jobs:
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
- name: Decrypt dev configs
run: sh ./scripts/decrypt_dev_configs.sh
env:
DEV_CONFIGS_PASSPHRASE: ${{ secrets.DEV_CONFIGS_PASSPHRASE }}
- name: Enable windows
run: flutter config --enable-windows-desktop
- run: flutter doctor -v
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ google-services.json
key.jks
service_account_key.json
android/android_keys.zip
dev_configs.zip
lib/firebase_options.dart

.vscode/

Expand Down
41 changes: 39 additions & 2 deletions .metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,42 @@
# This file should be version controlled and should not be manually edited.

version:
revision: c7ea3ca377e909469c68f2ab878a5bc53d3cf66b
channel: beta
revision: "5874a72aa4c779a02553007c47dacbefba2374dc"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
- platform: android
create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
- platform: ios
create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
- platform: linux
create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
- platform: macos
create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
- platform: web
create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
- platform: windows
create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

- [X] [Android](https://play.google.com/store/apps/details?id=com.kuas.ap&hl=zh_TW)
- [X] [iOS](https://itunes.apple.com/us/app/id1439751462)
- [X] [Web](https://nkust-ap-flutter.web.app)
- [X] [Windows(Beta)](https://github.com/NKUST-ITC/NKUST-AP-Flutter/releases/download/v3.8.5/nkust_ap_windows.zip)
- [X] [MacOS](https://itunes.apple.com/us/app/id1439751462)
- [X] [Linux(Beta)](https://snapcraft.io/nkust-ap)
- [ ] [Web](https://nkust-ap-flutter.web.app)
- [X] [Windows(目前無法使用因為目前 TFLite 套件不支援 桌面版)](https://github.com/NKUST-ITC/NKUST-AP-Flutter/releases/download/v3.8.5/nkust_ap_windows.zip)
- [X] [MacOS(目前無法使用因為目前 TFLite 套件不支援 桌面版)](https://itunes.apple.com/us/app/id1439751462)
- [X] [Linux(目前無法使用因為目前 TFLite 套件不支援 桌面版)](https://snapcraft.io/nkust-ap)

### Web 版本自7月起因為學校阻擋高請求IP,改為客戶端爬蟲,因此暫時無法使用

Expand All @@ -30,7 +30,22 @@
- [NKUST API](https://github.com/NKUST-ITC/NKUST-AP-API) :
高科校務通後端HTTP RESTful API,代為App處理所有爬蟲問題

## 步驟
## 開發事前需求

### 開發需安裝工具

- GPG

### 解密開發所需檔案

`$DEV_CONFIGS_PASSPHRASE` 替換成正確的密碼

```bash
gpg --quiet --batch --yes --decrypt --passphrase="$DEV_CONFIGS_PASSPHRASE" \
--output dev_configs.zip dev_configs.zip.gpg && sh scripts/unzip_dev_configs.sh
```

## 如何貢獻
1. `Fork` 此專案到你的 GitHub 帳號.
2. 挑選一個你想解決的 [issue](https://github.com/NKUST-ITC/NKUST-AP-Flutter/issues).
3. 創建一個分支(Branch)以該問題命名.
Expand Down
4 changes: 4 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ android {
buildTypes {
release {
signingConfig signingConfigs.release
ndk {
debugSymbolLevel 'FULL'
}
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@ pluginManagement {
excludeGroupByRegex "com\\.google\\.android\\.gms"
}
}
gradlePluginPortal()
}
}

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
id "com.google.gms.google-services" version "4.3.15" apply false
id "com.google.firebase.crashlytics" version "2.8.1" apply false
id "com.google.gms.google-services" version "4.4.0" apply false
id "com.google.firebase.crashlytics" version "2.9.9" apply false
}

include ":app"
Binary file added dev_configs.zip.gpg
Binary file not shown.
41 changes: 40 additions & 1 deletion firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,44 @@
"**/.*",
"**/node_modules/**"
]
},
"flutter": {
"platforms": {
"android": {
"default": {
"projectId": "nkust-ap-flutter",
"appId": "1:141403473068:android:05ebdd62590fb72e",
"fileOutput": "android/app/google-services.json"
}
},
"ios": {
"default": {
"projectId": "nkust-ap-flutter",
"appId": "1:141403473068:ios:65aa63de8e144164",
"uploadDebugSymbols": true,
"fileOutput": "ios/Runner/GoogleService-Info.plist"
}
},
"macos": {
"default": {
"projectId": "nkust-ap-flutter",
"appId": "1:141403473068:ios:568f2386591e74bbf34b09",
"uploadDebugSymbols": true,
"fileOutput": "macos/Runner/GoogleService-Info.plist"
}
},
"dart": {
"lib/firebase_options.dart": {
"projectId": "nkust-ap-flutter",
"configurations": {
"android": "1:141403473068:android:05ebdd62590fb72e",
"ios": "1:141403473068:ios:65aa63de8e144164",
"macos": "1:141403473068:ios:568f2386591e74bbf34b09",
"web": "1:141403473068:web:2804dce650446efef34b09",
"windows": "1:141403473068:web:d71d06f2e8822143f34b09"
}
}
}
}
}
}
}
Loading
Loading