-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
567 changed files
with
6,715 additions
and
3,903 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,14 +16,13 @@ jobs: | |
environment: | ||
name: ${{ github.ref_name }} | ||
env: | ||
PROPERTIES_PATH: "android/key.properties" | ||
JAVA_VERSION: "17.x" | ||
FLUTTER_VERSION: "3.13.7" | ||
APP_VERSION_PATH: "app_version.txt" | ||
PUBSPEC_PATH: "pubspec.yaml" | ||
PROPERTIES_PATH: android/key.properties | ||
JAVA_VERSION: 21.x | ||
APP_VERSION_PATH: app_version.txt | ||
PUBSPEC_PATH: pubspec.yaml | ||
defaults: | ||
run: | ||
working-directory: ./uni | ||
working-directory: ./packages/uni_app | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -39,7 +38,7 @@ jobs: | |
git fetch origin develop | ||
git pull origin master | ||
echo "DEVELOP_HASH=$(git rev-parse origin/develop)" >> $GITHUB_ENV | ||
echo "MASTER_HASH=$(git rev-parse origin/master^2)" >> $GITHUB_ENV | ||
echo "MASTER_HASH=$(git rev-parse origin/master^2)" >> $GITHUB_ENV | ||
- name: Get latest version (develop) | ||
if: github.ref != 'refs/heads/master' | ||
|
@@ -49,15 +48,15 @@ jobs: | |
google_service_account_json: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_JSON }} | ||
package_name: ${{ secrets.ANDROID_PACKAGE_NAME }} | ||
track: "beta" | ||
|
||
- name: Get latest production version | ||
uses: LuisDuarte1/[email protected] | ||
id: latest-production-version | ||
with: | ||
google_service_account_json: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_JSON }} | ||
package_name: ${{ secrets.ANDROID_PACKAGE_NAME }} | ||
track: "production" | ||
|
||
- name: Bump beta version | ||
uses: LuisDuarte1/[email protected] | ||
if: github.ref != 'refs/heads/master' | ||
|
@@ -67,7 +66,7 @@ jobs: | |
production_version: ${{ steps.latest-production-version.outputs.latest_version_name }} | ||
staging_version: ${{ steps.latest-beta-version.outputs.latest_version_name }} | ||
bump_type: prerelease | ||
|
||
- name: Bump prod version (from develop) | ||
uses: LuisDuarte1/[email protected] | ||
if: github.ref == 'refs/heads/master' && env.MASTER_HASH == env.DEVELOP_HASH | ||
|
@@ -85,7 +84,7 @@ jobs: | |
current_environment: production | ||
production_version: ${{ steps.latest-production-version.outputs.latest_version_name }} | ||
bump_type: patch | ||
|
||
- name: Combine output and write new version into file | ||
run: | | ||
export NEW_VERSION_NAME=${{ | ||
|
@@ -102,13 +101,17 @@ jobs: | |
with: | ||
commit_message: "Bump app version [no ci]" | ||
|
||
- uses: actions/setup-java@v3 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
java-version: ${{env.JAVA_VERSION}} | ||
distribution: "zulu" | ||
- uses: subosito/flutter-action@v2 | ||
|
||
- name: Set up Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: ${{ env.FLUTTER_VERSION }} | ||
channel: stable | ||
flutter-version-file: packages/uni_app/pubspec.yaml | ||
cache: true | ||
|
||
- name: Download Android keystore | ||
run: echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode > /tmp/key.jks | ||
|
@@ -124,18 +127,18 @@ jobs: | |
- name: Create .env file | ||
run: echo "${{vars.UNI_ENV_FILE}}" > ./assets/env/.env | ||
|
||
- name: Build Android App Bundle | ||
run: | | ||
flutter pub get | ||
flutter build appbundle | ||
- name: Upload App Bundle | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: appbundle | ||
if-no-files-found: error | ||
path: uni/build/app/outputs/bundle/release/app-release.aab | ||
path: packages/uni_app/build/app/outputs/bundle/release/app-release.aab | ||
|
||
deploy_play_store: | ||
name: "Deploy to Google Play Store" | ||
|
@@ -144,7 +147,7 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Get App Bundle | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: appbundle | ||
|
||
|
@@ -174,4 +177,4 @@ jobs: | |
if: github.ref == 'refs/heads/master' | ||
run: | | ||
echo '${{ secrets.NIAEFEUPBOT_PAT }}' | gh auth login --with-token | ||
gh workflow run 'Deploy Action' --ref develop | ||
gh workflow run 'Deploy Action' --ref develop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
include: package:leancode_lint/analysis_options.yaml | ||
|
||
analyzer: | ||
# Exclude auto-generated files from dart analysis | ||
exclude: | ||
- "**.g.dart" | ||
- "**.mocks.dart" | ||
- "**generated/**" | ||
plugins: | ||
- custom_lint |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
plugins { | ||
id "com.android.application" | ||
id "org.jetbrains.kotlin.android" | ||
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 = "1" | ||
} | ||
|
||
def flutterVersionName = localProperties.getProperty("flutter.versionName") | ||
if (flutterVersionName == null) { | ||
flutterVersionName = "1.0" | ||
} | ||
|
||
def keystoreProperties = new Properties() | ||
def keystorePropertiesFile = rootProject.file("key.properties") | ||
if (keystorePropertiesFile.exists()) { | ||
keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) | ||
} | ||
|
||
android { | ||
namespace "pt.up.fe.ni.uni" | ||
|
||
compileSdkVersion 34 | ||
ndkVersion "25.1.8937393" | ||
|
||
compileOptions { | ||
targetCompatibility JavaVersion.VERSION_11 | ||
sourceCompatibility JavaVersion.VERSION_11 | ||
|
||
// This is required by flutter_local_notifications. See its README. | ||
coreLibraryDesugaringEnabled true | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = "11" | ||
} | ||
|
||
sourceSets { | ||
main.java.srcDirs += "src/main/kotlin" | ||
} | ||
|
||
defaultConfig { | ||
applicationId "pt.up.fe.ni.uni" | ||
minSdkVersion 22 | ||
targetSdkVersion 34 | ||
versionCode flutterVersionCode.toInteger() | ||
versionName flutterVersionName | ||
} | ||
|
||
signingConfigs { | ||
release { | ||
keyAlias keystoreProperties["keyAlias"] | ||
keyPassword keystoreProperties["keyPassword"] | ||
storeFile keystoreProperties["storeFile"] ? file(keystoreProperties["storeFile"]) : null | ||
storePassword keystoreProperties["storePassword"] | ||
} | ||
} | ||
|
||
buildTypes { | ||
release { | ||
signingConfig signingConfigs.release | ||
|
||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
} | ||
} | ||
} | ||
|
||
flutter { | ||
source "../.." | ||
} | ||
|
||
dependencies { | ||
// The following 3 lines are a workaround for the Flutter issue. | ||
// Learn more: https://github.com/flutter/flutter/issues/110658 | ||
implementation "androidx.window:window:1.3.0" | ||
implementation "androidx.window:window-java:1.3.0" | ||
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:2.0.4" | ||
} |
Oops, something went wrong.