Skip to content

Commit

Permalink
Update to Flutter 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyrat committed Aug 23, 2023
1 parent 2a4077d commit db9d437
Show file tree
Hide file tree
Showing 16 changed files with 149 additions and 101 deletions.
2 changes: 1 addition & 1 deletion .fvm/fvm_config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"flutterSdkVersion": "3.10.6",
"flutterSdkVersion": "3.13.0",
"flavors": {}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
/build/
.gradle/
.fvm/flutter_sdk
integration_test/test_bundle.dart

# Web related
lib/generated_plugin_registrant.dart
Expand Down
13 changes: 13 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,16 @@ pbcopy < /dev/null
* iPad = iPad Pro 12.9" 16.4
* Android phone = Nexus 6 (16:9) API 33
* Android tablet = Nexus 10 API 31 (do not go higher than this API until Google has enabled a way for us to hide the huge bottom taskbar introduced in API 32)


# Renewing Apple certificates

* Might cause TestFlight builds to become invalidated?

```
cd ios
bundle exec fastlane match nuke development
bundle exec fastlane match nuke distribution
bundle exec fastlane generate_new_certificates
bundle exec fastlane iapdevcert
```
15 changes: 10 additions & 5 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if (flutterVersionName == null) {
def dartEnvironmentVariables = [
KEEVAULT_STAGE: 'dev',
KEEVAULT_CHANNEL: 'dev'
];
]

if (project.hasProperty('dart-defines')) {
dartEnvironmentVariables = dartEnvironmentVariables + project.property('dart-defines')
Expand Down Expand Up @@ -81,7 +81,7 @@ def symbolLevel = channels[dartEnvironmentVariables.KEEVAULT_CHANNEL].symbolLeve
def chosenSigningConfig = channels[dartEnvironmentVariables.KEEVAULT_CHANNEL].signingConfig

android {
compileSdkVersion 33
compileSdk 33

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand Down Expand Up @@ -109,15 +109,20 @@ android {
applicationId "com.keevault.keevault"
applicationIdSuffix idSuffix
minSdkVersion 26
targetSdkVersion 31
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
resValue "string", "app_name", "Kee Vault" + nameSuffix
resValue "string", "flutter_autofill_service_label", "Kee Vault" + nameSuffix
ndk.debugSymbolLevel = symbolLevel
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "pl.leancode.patrol.PatrolJUnitRunner"
testInstrumentationRunnerArguments clearPackageData: "true"
}

testOptions {
execution "ANDROIDX_TEST_ORCHESTRATOR"
}

buildTypes {
release {
signingConfig signingConfigs[chosenSigningConfig]
Expand All @@ -143,5 +148,5 @@ flutter {

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
testImplementation "junit:junit:4.13.2"
androidTestUtil "androidx.test:orchestrator:1.4.2"
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
package com.keevault.keevault;

import org.junit.Rule;
import androidx.test.platform.app.InstrumentationRegistry;
import org.junit.Test;
import org.junit.runner.RunWith;
import pl.leancode.patrol.PatrolTestRule;
import pl.leancode.patrol.PatrolTestRunner;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
import pl.leancode.patrol.PatrolJUnitRunner;

@RunWith(PatrolTestRunner.class)
@RunWith(Parameterized.class)
public class MainActivityTest {
@Rule
public PatrolTestRule<MainActivity> rule = new PatrolTestRule<>(MainActivity.class);
}
@Parameters(name = "{0}")
public static Object[] testCases() {
PatrolJUnitRunner instrumentation = (PatrolJUnitRunner) InstrumentationRegistry.getInstrumentation();
instrumentation.setUp(MainActivity.class);
instrumentation.waitForPatrolAppService();
return instrumentation.listDartTests();
}

public MainActivityTest(String dartTestName) {
this.dartTestName = dartTestName;
}

private final String dartTestName;

@Test
public void runDartTest() {
PatrolJUnitRunner instrumentation = (PatrolJUnitRunner) InstrumentationRegistry.getInstrumentation();
instrumentation.runDartTest(dartTestName);
}
}
2 changes: 2 additions & 0 deletions integration_test/manual_screenshots_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ void main() {
// for this in early 2023 and it's still not been fixed in June.
patrolTest(
'free user unlock and screenshot pauses',
// not actually deprecated - bugs occur if this is removed.
// ignore: deprecated_member_use
nativeAutomation: true,
config: const PatrolTesterConfig(
existsTimeout: Duration(seconds: 60),
Expand Down
30 changes: 12 additions & 18 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,11 @@ PODS:
- patrol (0.0.1):
- Flutter
- gRPC-Swift (~> 1.8.0)
- permission_handler_apple (9.0.4):
- permission_handler_apple (9.1.1):
- Flutter
- SDWebImage (5.14.2):
- SDWebImage/Core (= 5.14.2)
- SDWebImage/Core (5.14.2)
- sensors_plus (0.0.1):
- Flutter
- share_plus (0.0.1):
- Flutter
- shared_preferences_foundation (0.0.1):
Expand Down Expand Up @@ -240,12 +238,11 @@ DEPENDENCIES:
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- integration_test (from `.symlinks/plugins/integration_test/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- patrol (from `.symlinks/plugins/patrol/ios`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- sensors_plus (from `.symlinks/plugins/sensors_plus/ios`)
- share_plus (from `.symlinks/plugins/share_plus/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)

SPEC REPOS:
Expand Down Expand Up @@ -305,17 +302,15 @@ EXTERNAL SOURCES:
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/ios"
:path: ".symlinks/plugins/path_provider_foundation/darwin"
patrol:
:path: ".symlinks/plugins/patrol/ios"
permission_handler_apple:
:path: ".symlinks/plugins/permission_handler_apple/ios"
sensors_plus:
:path: ".symlinks/plugins/sensors_plus/ios"
share_plus:
:path: ".symlinks/plugins/share_plus/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/ios"
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"

Expand All @@ -332,7 +327,7 @@ SPEC CHECKSUMS:
CNIOHTTPParser: 8ce395236fa1d09ac3b4f4bcfba79b849b2ac684
CNIOLinux: 62e3505f50de558c393dc2f273dde71dcce518da
CNIOWindows: 3047f2d8165848a3936a0a755fee27c6b5ee479b
device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
device_info_plus: 7545d84d8d1b896cb16a4ff98c19f07ec4b298ea
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
file_picker: ce3938a0df3cc1ef404671531facef740d03f920
Expand All @@ -341,17 +336,16 @@ SPEC CHECKSUMS:
flutter_inapp_purchase: 5c6a1ac3f11b11d0c8c0321c0c41c1f05805e4c8
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
gRPC-Swift: 74adcaaa62ac5e0a018938840328cb1fdfb09e7b
integration_test: a1e7d09bd98eca2fc37aefd79d4f41ad37bdbbe5
integration_test: 13825b8a9334a850581300559b8839134b124670
Logging: beeb016c9c80cf77042d62e83495816847ef108b
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9
package_info_plus: fd030dabf36271f146f1f3beacd48f564b0f17f7
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
patrol: a7622350c42b3a944962fbfe052d07e3691789e5
permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce
permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6
SDWebImage: b9a731e1d6307f44ca703b3976d18c24ca561e84
sensors_plus: 5717760720f7e6acd96fdbd75b7428f5ad755ec2
share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68
shared_preferences_foundation: 986fc17f3d3251412d18b0265f9c64113a8c2472
share_plus: 599aa54e4ea31d4b4c0e9c911bcc26c55e791028
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
SwiftNIO: 829958aab300642625091f82fc2f49cb7cf4ef24
SwiftNIOConcurrencyHelpers: 697370136789b1074e4535eaae75cbd7f900370e
SwiftNIOCore: 473fdfe746534d7aa25766916459eeaf6f92ef49
Expand Down
3 changes: 2 additions & 1 deletion ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1340;
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = "";
TargetAttributes = {
8B253A1128BE694600AA6762 = {
Expand Down Expand Up @@ -423,6 +423,7 @@
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1430"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
1 change: 1 addition & 0 deletions ios/RunnerUITests/RunnerUITests.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import XCTest;
@import patrol;
@import ObjectiveC.runtime;

PATROL_INTEGRATION_TEST_IOS_RUNNER(RunnerUITests)
12 changes: 6 additions & 6 deletions lib/extension_methods.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ extension KdbxGroupRecursion on KdbxGroup {
}
}

extension DioHelperHandleException on DioError {
extension DioHelperHandleException on DioException {
Future<void> handle(String context, StackTrace s, int retriesRemaining, loginRequiredHandler) async {
// The request was made and the server responded with a status code
// that falls out of the range of 2xx and is also not 304.
Expand All @@ -115,22 +115,22 @@ extension DioHelperHandleException on DioError {
throw KeeServerFailException();
default:
if (retriesRemaining > 0) return;
throw KeeUnexpectedException('[$context] DioError with invalid response', this, s);
throw KeeUnexpectedException('[$context] DioException with invalid response', this, s);
}
} else if (retriesRemaining > 0) {
return;
} else {
// Something happened in setting up or sending the request that triggered an Error
if (type == DioErrorType.connectionTimeout) {
if (type == DioExceptionType.connectionTimeout) {
throw KeeServerUnreachableException();
}
if (type == DioErrorType.receiveTimeout || type == DioErrorType.sendTimeout) {
if (type == DioExceptionType.receiveTimeout || type == DioExceptionType.sendTimeout) {
throw KeeServerTimeoutException();
}
if (type == DioErrorType.unknown) {
if (type == DioExceptionType.unknown) {
throw KeeServerUnreachableException();
}
throw KeeUnexpectedException('[$context] DioError with no response', this, s);
throw KeeUnexpectedException('[$context] DioException with no response', this, s);
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions lib/remote_vault_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class RemoteVaultRepository {
etag,
versionId,
);
} on DioError catch (e, s) {
} on DioException catch (e, s) {
await e.handle('Get primary file', s, retriesRemaining, () async {
throw KeeLoginRequiredException();
});
Expand Down Expand Up @@ -158,7 +158,7 @@ class RemoteVaultRepository {
etag,
versionId,
);
} on DioError catch (e, s) {
} on DioException catch (e, s) {
await e.handle('Put primary file', s, retriesRemaining, () async {
throw KeeLoginRequiredException();
});
Expand All @@ -183,7 +183,7 @@ class RemoteVaultRepository {
var response = await dio.head(headUrl, options: Options(responseType: ResponseType.bytes));
final etag = response.headers['etag']![0];
return etag;
} on DioError catch (e, s) {
} on DioException catch (e, s) {
await e.handle('Head primary file', s, retriesRemaining, () async {
throw KeeLoginRequiredException();
});
Expand Down
2 changes: 1 addition & 1 deletion lib/vault_backend/remote_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class RemoteService {
var response =
await _dio.request<T>(path, queryParameters: {if (haveAToken) 't': token}, options: config, data: obj);
return response;
} on DioError catch (e, s) {
} on DioException catch (e, s) {
await e.handle(_name, s, retriesRemaining, () async {
if (shouldGetNewTokenIfRequired && retriesRemaining == 2) {
// We make one attempt to reauthenticate in case the token has
Expand Down
8 changes: 2 additions & 6 deletions lib/widgets/kee_vault_app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,9 @@ class KeeVaultAppState extends State<KeeVaultApp> with WidgetsBindingObserver, T
cardColor: Color(0xFF292929),
accentColor: AppPalettes.keeVaultPaletteAccent[100],
backgroundColor: Colors.grey[900],
primaryColorDark: palette[700],
).copyWith(
surface: Colors.grey[850],
// ignore: deprecated_member_use
secondaryVariant: palette[700],
secondaryContainer: palette[700],
),
)
: ThemeData.from(
Expand All @@ -151,11 +149,9 @@ class KeeVaultAppState extends State<KeeVaultApp> with WidgetsBindingObserver, T
cardColor: Colors.white,
accentColor: palette[500],
backgroundColor: Colors.grey[50],
primaryColorDark: palette[700],
).copyWith(
surface: Colors.grey[100],
// ignore: deprecated_member_use
secondaryVariant: palette[700],
secondaryContainer: palette[700],
),
);
return theme.copyWith(
Expand Down
Loading

0 comments on commit db9d437

Please sign in to comment.