Skip to content

Commit

Permalink
Merge branch 'develop' into refactor/request-dep-widget-bus-stop-card
Browse files Browse the repository at this point in the history
  • Loading branch information
rubuy-74 committed Nov 17, 2023
2 parents 4921814 + 6f4a810 commit 69e2354
Show file tree
Hide file tree
Showing 137 changed files with 2,453 additions and 817 deletions.
32 changes: 24 additions & 8 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
on:
push:
branches: [ master, develop ]
branches: [master, develop]

jobs:
bump_version:
permissions:
actions: "write"
name: "Bump pubspec version"
runs-on: ubuntu-latest
env:
Expand All @@ -14,12 +16,19 @@ jobs:
with:
token: ${{ secrets.NIAEFEUPBOT_PAT }}

- name: Get develop hash
if: github.ref == 'refs/heads/master'
run: |
git fetch origin develop
current_hash=$(git rev-parse origin/develop)
echo "DEVELOPHASH=$current_hash" >> $GITHUB_ENV
- name: Bump flutter patch version
if: github.ref == 'refs/heads/develop'
if: github.ref == 'refs/heads/develop' || github.sha != env.DEVELOPHASH
run: perl -i -pe 's/^(\d+\.\d+\.)(\d+)(\+)(\d+)$/$1.($2+1).($3).($4+1)/e' ${{ env.APP_VERSION_PATH }}

- name: Bump flutter minor version
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/master' && github.sha == env.DEVELOPHASH
run: perl -i -pe 's/^(\d+)(\.)(\d+)(\.)(\d+)(\+)(\d+)$/$1.($2).($3+1).($4).(0).($6).($7+1)/e' ${{ env.APP_VERSION_PATH }}

- name: Copy app version to pubspec
Expand All @@ -29,18 +38,25 @@ jobs:
with:
commit_message: "Bump app version [no ci]"

- name: Propagate master version bump to develop
- name: Propagate master version bump to develop if master version is aad
if: github.ref == 'refs/heads/master'
run: git push --force-with-lease origin HEAD:develop
run: |
git fetch origin develop
if [[ $(git diff --quiet HEAD~1 origin/develop) ]]; then
echo "Master version does not match develop version"
else
echo "Master version matches develop version"
git push --force-with-lease origin HEAD:develop
fi
build:
name: "Build App Bundle"
runs-on: ubuntu-latest
needs: [bump_version]
env:
PROPERTIES_PATH: "android/key.properties"
JAVA_VERSION: "11.x"
FLUTTER_VERSION: "3.10.6"
JAVA_VERSION: "17.x"
FLUTTER_VERSION: "3.13.7"
defaults:
run:
working-directory: ./uni
Expand All @@ -49,7 +65,7 @@ jobs:
- uses: actions/setup-java@v3
with:
java-version: ${{env.JAVA_VERSION}}
distribution: 'zulu'
distribution: "zulu"
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/format_lint_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
branches: [master, develop]

env:
FLUTTER_VERSION: 3.10.6
JAVA_VERSION: 11.x
FLUTTER_VERSION: 3.13.7
JAVA_VERSION: 17.x

jobs:
format:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
.pub/
build/
*.bin
uni/pubspec.lock
.flutter-plugins*

# IDE files
Expand Down
2 changes: 0 additions & 2 deletions uni/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Miscellaneous
*.class
*.lock
*.log
*.pyc
*.swp
Expand Down Expand Up @@ -100,7 +99,6 @@ unlinked_spec.ds
**/ios/Flutter/flutter_export_environment.sh
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*
**/ios/Podfile

# macOS
**/Flutter/ephemeral/
Expand Down
8 changes: 6 additions & 2 deletions uni/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ if (keystorePropertiesFile.exists()) {
}

android {
compileSdkVersion 33 // default is flutter.compileSdkVersion
if (project.android.hasProperty("namespace")) {
namespace "pt.up.fe.ni.uni"
}

compileSdkVersion 34 // default is flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

compileOptions {
Expand All @@ -51,7 +55,7 @@ android {
defaultConfig {
applicationId "pt.up.fe.ni.uni"
minSdkVersion 21 // default is flutter.minSdkVersion
targetSdkVersion 33 // default is flutter.targetSdkVersion
targetSdkVersion 34 // default is flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
4 changes: 2 additions & 2 deletions uni/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
buildscript {
ext.kotlin_version = '1.7.21'
ext.android_plugin_version = '7.2.0'
ext.kotlin_version = '1.9.0'
ext.android_plugin_version = '8.0.0'

repositories {
google()
Expand Down
2 changes: 1 addition & 1 deletion uni/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
2 changes: 1 addition & 1 deletion uni/app_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.7.0+190
1.7.19+209
44 changes: 44 additions & 0 deletions uni/ios/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}

def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end

File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
use_frameworks!
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
Loading

0 comments on commit 69e2354

Please sign in to comment.