mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-24 00:10:47 +00:00
Compare commits
3 commits
532df61cdf
...
de24b98782
Author | SHA1 | Date | |
---|---|---|---|
|
de24b98782 | ||
|
f5b71e98b6 | ||
|
1252096f4c |
5 changed files with 9 additions and 9 deletions
|
@ -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"
|
||||||
}
|
}
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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(() {
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue