-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
93 lines (81 loc) · 2.86 KB
/
build.gradle.kts
File metadata and controls
93 lines (81 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
group = "io.flutter.plugins.camerax"
version = "1.0"
buildscript {
val kotlinVersion = "2.3.20"
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:8.13.1")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
plugins {
id("com.android.library")
id("kotlin-android")
}
kotlin {
compilerOptions {
jvmTarget = JvmTarget.fromTarget(JavaVersion.VERSION_17.toString())
}
}
android {
namespace = "io.flutter.plugins.camerax"
// CameraX dependencies require compilation against version 33 or later.
compileSdk = flutter.compileSdkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
defaultConfig {
// CameraX APIs require API 23 or later.
minSdk = 23
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
testOptions {
unitTests {
isIncludeAndroidResources = true
isReturnDefaultValues = true
all {
it.outputs.upToDateWhen { false }
it.testLogging {
events("passed", "skipped", "failed", "standardOut", "standardError")
showStandardStreams = true
}
// The org.gradle.jvmargs property that may be set in gradle.properties does not impact
// the Java heap size when running the Android unit tests. The following property here
// sets the heap size to a size large enough to run the robolectric tests across
// multiple SDK levels.
it.jvmArgs("-Xmx1G")
}
}
}
lint {
checkAllWarnings = true
warningsAsErrors = true
disable.addAll(setOf("AndroidGradlePluginVersion", "GradleDependency", "InvalidPackage", "NewerVersionAvailable"))
baseline = file("lint-baseline.xml")
}
}
dependencies {
// CameraX core library using the camera2 implementation must use same version number.
val cameraxVersion = "1.5.3"
implementation("androidx.camera:camera-core:${cameraxVersion}")
implementation("androidx.camera:camera-camera2:${cameraxVersion}")
implementation("androidx.camera:camera-lifecycle:${cameraxVersion}")
implementation("androidx.camera:camera-video:${cameraxVersion}")
implementation("com.google.guava:guava:33.5.0-android")
testImplementation("junit:junit:4.13.2")
testImplementation("org.mockito:mockito-core:5.23.0")
testImplementation("org.mockito:mockito-inline:5.2.0")
testImplementation("androidx.test:core:1.7.0")
testImplementation("org.robolectric:robolectric:4.16")
}