Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyrat committed Aug 8, 2024
1 parent 4be3bd6 commit 9859106
Show file tree
Hide file tree
Showing 6 changed files with 201 additions and 180 deletions.
28 changes: 22 additions & 6 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "com.android.application"
id "kotlin-android"
id 'org.jetbrains.kotlin.android' // version '1.8.22'
id "dev.flutter.flutter-gradle-plugin"
}

Expand Down Expand Up @@ -115,7 +115,7 @@ android {
applicationId "com.keevault.keevault"
applicationIdSuffix idSuffix
minSdkVersion 29
targetSdk 33
targetSdk 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
resValue "string", "app_name", "Kee Vault" + nameSuffix
Expand Down Expand Up @@ -145,17 +145,33 @@ android {
}
namespace 'com.keevault.keevault'

ndkVersion "23.1.7779620"
ndkVersion "26.1.10909125"
}

flutter {
source '../..'
}

dependencies {
//implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
// implementation "org.jetbrains.kotlin:kotlin-stdlib:1.8.22"
implementation 'org.tinylog:tinylog-api:2.6.2'
implementation 'org.tinylog:tinylog-impl:2.6.2'
implementation 'org.tinylog:slf4j-tinylog:2.6.2'
androidTestUtil "androidx.test:orchestrator:1.4.2"
}
androidTestUtil "androidx.test:orchestrator:1.5.0"
// Fix Duplicate class
// implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.22"))
// constraints {
// implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") {
// because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib")
// }
// implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") {
// because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib")
// }
// implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30") {
// because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib")
// }
// implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22") {
// because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib")
// }
// }
}
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
package com.keevault.keevault;

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

@RunWith(Parameterized.class)
public class MainActivityTest {
@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);
}
}
//package com.keevault.keevault;
//
//import androidx.test.platform.app.InstrumentationRegistry;
//import org.junit.Test;
//import org.junit.runner.RunWith;
//import org.junit.runners.Parameterized;
//import org.junit.runners.Parameterized.Parameters;
//import pl.leancode.patrol.PatrolJUnitRunner;
//
//@RunWith(Parameterized.class)
//public class MainActivityTest {
// @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: 1 addition & 1 deletion 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-8.0-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
2 changes: 1 addition & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pluginManagement {

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.1.3" apply false
id "com.android.application" version '8.5.1' apply false
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
}

Expand Down
Loading

0 comments on commit 9859106

Please sign in to comment.