| buildscript { | |
| repositories { | |
| google() | |
| mavenCentral() | |
| } | |
| dependencies { | |
| classpath "com.android.tools.build:gradle:7.0.0" | |
| } | |
| } | |
| repositories { | |
| google() | |
| mavenCentral() | |
| } | |
| apply plugin: "com.android.library" | |
| rootProject.buildDir = project.property("build_dir") | |
| android { | |
| compileSdkVersion 31 | |
| defaultConfig { | |
| minSdkVersion 16 | |
| } | |
| compileOptions { | |
| sourceCompatibility JavaVersion.VERSION_1_8 | |
| targetCompatibility JavaVersion.VERSION_1_8 | |
| } | |
| testOptions { | |
| unitTests { | |
| includeAndroidResources = true | |
| } | |
| } | |
| dependencies { | |
| // Please *don't* add embedding dependencies to this file. | |
| // The embedding dependencies are configured in tools/androidx/files.json. | |
| // Only add test dependencies. | |
| implementation files(project.property("flutter_jar")) | |
| testImplementation "androidx.test:core:1.4.0" | |
| testImplementation "com.google.android.play:core:1.8.0" | |
| testImplementation "com.ibm.icu:icu4j:69.1" | |
| testImplementation "org.robolectric:robolectric:4.6.1" | |
| testImplementation "junit:junit:4.13" | |
| def mockitoVersion = "4.1.0" | |
| testImplementation "org.mockito:mockito-core:$mockitoVersion" | |
| testImplementation "org.mockito:mockito-inline:$mockitoVersion" | |
| testImplementation "org.mockito:mockito-android:$mockitoVersion" | |
| } | |
| // Configure the embedding dependencies. | |
| apply from: new File(rootDir, '../../../../tools/androidx/configure.gradle').absolutePath; | |
| configureDependencies(new File(rootDir, '../../../..')) { dependency -> | |
| dependencies { | |
| testImplementation "$dependency" | |
| } | |
| } | |
| sourceSets { | |
| main { | |
| test { | |
| java { | |
| srcDirs = ["../test"] | |
| } | |
| } | |
| } | |
| } | |
| testOptions.unitTests.all { | |
| jvmArgs "-Xmx4g" // Max JVM heap size is 4G. | |
| testLogging { | |
| events "passed", "skipped", "failed", "standardOut", "standardError" | |
| exceptionFormat "full" | |
| showStackTraces true | |
| } | |
| } | |
| } |