Skip to content

Commit

Permalink
Merge branch 'develop' into refactor/exams-page
Browse files Browse the repository at this point in the history
  • Loading branch information
bdmendes authored Dec 5, 2023
2 parents 7f304dc + 6f4a810 commit 039eb19
Show file tree
Hide file tree
Showing 93 changed files with 226 additions and 194 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ jobs:
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 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
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.13+203
1.7.19+209
2 changes: 1 addition & 1 deletion uni/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'
# platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
32 changes: 25 additions & 7 deletions uni/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
BDCB52892DCE94F196BB76DB /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -296,7 +297,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n";
};
A202455463DBDFBE5F69F3CD /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -342,6 +343,23 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
BDCB52892DCE94F196BB76DB /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down Expand Up @@ -433,7 +451,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand All @@ -452,7 +470,7 @@
DEVELOPMENT_TEAM = ADS6V5HXNQ;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -606,7 +624,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -655,7 +673,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand All @@ -676,7 +694,7 @@
DEVELOPMENT_TEAM = ADS6V5HXNQ;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -700,7 +718,7 @@
DEVELOPMENT_TEAM = ADS6V5HXNQ;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
4 changes: 2 additions & 2 deletions uni/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
<key>UISceneConfigurations</key>
<dict/>
</dict>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
Expand All @@ -73,7 +75,5 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'package:workmanager/workmanager.dart';
/// (they must not take any arguments, not checked)
const taskMap = {
'pt.up.fe.ni.uni.notificationworker':
Tuple2(NotificationManager.updateAndTriggerNotifications, true)
Tuple2(NotificationManager.updateAndTriggerNotifications, true),
};

@pragma('vm:entry-point')
Expand Down
2 changes: 1 addition & 1 deletion uni/lib/controller/fetchers/print_fetcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class PrintFetcher implements SessionDependantFetcher {
'p_tipo_id': '3',
'pct_codigo': session.username,
'p_valor': '1',
'p_valor_livre': amount.toStringAsFixed(2).trim().replaceAll('.', ',')
'p_valor_livre': amount.toStringAsFixed(2).trim().replaceAll('.', ','),
};

final headers = <String, String>{};
Expand Down
2 changes: 1 addition & 1 deletion uni/lib/controller/fetchers/restaurant_fetcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class RestaurantFetcher {
}

final List<String> sigarraMenuEndpoints = [
'${NetworkRouter.getBaseUrl('feup')}CANTINA.EMENTASHOW'
'${NetworkRouter.getBaseUrl('feup')}CANTINA.EMENTASHOW',
];

Future<List<Restaurant>> fetchSigarraRestaurants(Session session) async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class ScheduleFetcherApi extends ScheduleFetcher {
{
'pv_codigo': session.username,
'pv_semana_ini': dates.beginWeek,
'pv_semana_fim': dates.endWeek
'pv_semana_fim': dates.endWeek,
},
session,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ScheduleFetcherHtml extends ScheduleFetcher {
'pv_fest_id': course.festId.toString(),
'pv_ano_lectivo': dates.lectiveYear.toString(),
'p_semana_inicio': dates.beginWeek,
'p_semana_fim': dates.endWeek
'p_semana_fim': dates.endWeek,
},
session,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AppBusStopDatabase extends AppDatabase {
AppBusStopDatabase()
: super('busstops.db', [
'CREATE TABLE busstops(stopCode TEXT, busCode TEXT)',
'CREATE TABLE favoritestops(stopCode TEXT, favorited TEXT)'
'CREATE TABLE favoritestops(stopCode TEXT, favorited TEXT)',
]);

/// Returns a map containing all the data stored in this database.
Expand Down
2 changes: 1 addition & 1 deletion uni/lib/controller/local_storage/app_exams_database.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class AppExamsDatabase extends AppDatabase {
'Setembro': '09',
'Outubro': '10',
'Novembro': '11',
'Dezembro': '12'
'Dezembro': '12',
};

static const _createScript = '''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class AppSharedPreferences {
static final List<FavoriteWidgetType> defaultFavoriteCards = [
FavoriteWidgetType.schedule,
FavoriteWidgetType.exams,
FavoriteWidgetType.busStops
FavoriteWidgetType.busStops,
];
static const String hiddenExams = 'hidden_exams';
static const String favoriteRestaurants = 'favorite_restaurants';
Expand Down
2 changes: 1 addition & 1 deletion uni/lib/controller/local_storage/app_user_database.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class AppUserDataDatabase extends AppDatabase {
);
await insertInDatabase('userdata', {
'key': 'feesLimit',
'value': feesLimit != null ? feesLimit.toIso8601String() : ''
'value': feesLimit != null ? feesLimit.toIso8601String() : '',
});
}
}
2 changes: 1 addition & 1 deletion uni/lib/controller/parsers/parser_course_units.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ List<CourseUnit> parseCourseUnitsAndCourseAverage(
grade: grade,
ects: double.tryParse(ects),
name: name,
curricularYear: int.parse(year),
curricularYear: int.tryParse(year),
semesterCode: semester,
);
courseUnits.add(courseUnit);
Expand Down
2 changes: 1 addition & 1 deletion uni/lib/model/entities/bug_report.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class BugReport {
'text': text,
'email': email,
'bugLabel': bugLabel!.item2,
'faculties': faculties
'faculties': faculties,
};
}
2 changes: 1 addition & 1 deletion uni/lib/model/entities/bus.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Bus {
return {
'busCode': busCode,
'destination': destination,
'direction': direction
'direction': direction,
};
}
}
2 changes: 1 addition & 1 deletion uni/lib/model/entities/exam.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Exam {
String weekDay(AppLocale locale) {
return DateFormat.EEEE(locale.localeCode.languageCode)
.dateSymbols
.WEEKDAYS[begin.weekday - 1];
.WEEKDAYS[begin.weekday % 7];
}

String month(AppLocale locale) {
Expand Down
2 changes: 1 addition & 1 deletion uni/lib/model/entities/lecture.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class Lecture {
'room': room,
'teacher': teacher,
'classNumber': classNumber,
'occurrId': occurrId
'occurrId': occurrId,
};
}

Expand Down
2 changes: 1 addition & 1 deletion uni/lib/model/entities/locations/coffee_machine.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class CoffeeMachine implements Location {
Map<String, dynamic> toMap({int? groupId}) {
return {
'floor': floor,
'type': locationTypeToString(LocationType.coffeeMachine)
'type': locationTypeToString(LocationType.coffeeMachine),
};
}
}
2 changes: 1 addition & 1 deletion uni/lib/model/entities/locations/restaurant_location.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class RestaurantLocation implements Location {
return {
'floor': floor,
'type': locationTypeToString(LocationType.restaurant),
'name': name
'name': name,
};
}
}
2 changes: 1 addition & 1 deletion uni/lib/model/entities/locations/room_location.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class RoomLocation implements Location {
return {
'floor': floor,
'type': locationTypeToString(LocationType.room),
'first_room': roomNumber
'first_room': roomNumber,
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class SpecialRoomLocation implements Location {
'floor': floor,
'type': locationTypeToString(LocationType.printer),
'first_room': roomNumber,
'name': name
'name': name,
};
}
}
2 changes: 1 addition & 1 deletion uni/lib/model/entities/locations/store_location.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class StoreLocation implements Location {
return {
'floor': floor,
'type': locationTypeToString(LocationType.store),
'name': name
'name': name,
};
}
}
2 changes: 1 addition & 1 deletion uni/lib/model/entities/locations/vending_machine.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class VendingMachine implements Location {
Map<String, dynamic> toMap({int? groupId}) {
return {
'floor': floor,
'type': locationTypeToString(LocationType.vendingMachine)
'type': locationTypeToString(LocationType.vendingMachine),
};
}
}
2 changes: 1 addition & 1 deletion uni/lib/model/entities/meal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Meal {
'type': type,
'name': name,
'date': format.format(date),
'id_restaurant': restaurantId
'id_restaurant': restaurantId,
};
}
}
2 changes: 1 addition & 1 deletion uni/lib/model/entities/trip.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Trip {
return {
'line': line,
'destination': destination,
'timeRemaining': timeRemaining
'timeRemaining': timeRemaining,
};
}

Expand Down
2 changes: 1 addition & 1 deletion uni/lib/model/providers/startup/profile_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ProfileProvider extends StateProviderNotifier {
await Future.wait([
fetchUserFees(session),
fetchUserPrintBalance(session),
fetchCourseUnitsAndCourseAverages(session)
fetchCourseUnitsAndCourseAverages(session),
]);
}

Expand Down
Loading

0 comments on commit 039eb19

Please sign in to comment.