Compare commits

..

3 commits

Author SHA1 Message Date
Vadim
de24b98782 typo 2023-06-23 10:31:08 +02:00
Vadim
f5b71e98b6 reset(sharedPreferences); calls count 2023-06-23 10:10:15 +02:00
Vadim
1252096f4c gradle upgrade 2023-06-23 09:25:09 +02:00
5 changed files with 9 additions and 9 deletions

View file

@ -33,10 +33,6 @@ apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
gradle.beforeProject({ project->
project.setProperty("target-platform", "android-arm,android-arm64")
})
android { android {
compileSdkVersion 33 compileSdkVersion 33
ndkVersion flutter.ndkVersion ndkVersion flutter.ndkVersion
@ -112,5 +108,5 @@ flutter {
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "com.android.billingclient:billing-ktx:5.1.0" implementation "com.android.billingclient:billing-ktx:6.0.0"
} }

View file

@ -6,7 +6,7 @@ buildscript {
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:7.2.1' classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.google.gms:google-services:4.3.10' classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

View file

@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip

View file

@ -8,7 +8,7 @@ void main() {
late CaffeineService service; late CaffeineService service;
const methodChannel = MethodChannel('com.vodemn.lightmeter/keepScreenOn'); const methodChannel = MethodChannel('com.vodemn.lightmeter/keepScreenOn');
Future<Object?>? cameraMethodCallSuccessHandler(MethodCall methodCall) async { Future<Object?>? methodCallSuccessHandler(MethodCall methodCall) async {
switch (methodCall.method) { switch (methodCall.method) {
case "isKeepScreenOn": case "isKeepScreenOn":
return true; return true;
@ -22,7 +22,7 @@ void main() {
setUp(() { setUp(() {
service = const CaffeineService(); service = const CaffeineService();
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(methodChannel, cameraMethodCallSuccessHandler); .setMockMethodCallHandler(methodChannel, methodCallSuccessHandler);
}); });
tearDown(() { tearDown(() {

View file

@ -22,6 +22,10 @@ void main() {
service = UserPreferencesService(sharedPreferences); service = UserPreferencesService(sharedPreferences);
}); });
tearDown(() {
reset(sharedPreferences);
});
group('migrateOldKeys()', () { group('migrateOldKeys()', () {
test('no legacy keys', () async { test('no legacy keys', () async {
when(() => sharedPreferences.getInt("curIsoIndex")).thenReturn(null); when(() => sharedPreferences.getInt("curIsoIndex")).thenReturn(null);