Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/camera/camera_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.10.10+16

* Updates build files from Groovy to Kotlin.

## 0.10.10+15

* Updates example to demonstrate correct exception handling for async return statements, ensuring exceptions thrown during return within try blocks are properly caught as per [dart-lang/sdk#44395](https://github.com/dart-lang/sdk/issues/44395).
Expand Down
74 changes: 0 additions & 74 deletions packages/camera/camera_android/android/build.gradle

This file was deleted.

80 changes: 80 additions & 0 deletions packages/camera/camera_android/android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
group = "io.flutter.plugins.camera"
version = "1.0-SNAPSHOT"

buildscript {
repositories {
google()
mavenCentral()
}

dependencies {
classpath("com.android.tools.build:gradle:8.13.1")
}
}

allprojects {
repositories {
google()
mavenCentral()
}
}

tasks.withType<JavaCompile>().configureEach {
options.compilerArgs.add("-Xlint:deprecation")
options.compilerArgs.add("-Xlint:unchecked")
}

plugins {
id("com.android.library")
}

android {
buildFeatures {
buildConfig = true
}
namespace = "io.flutter.plugins.camera"
compileSdk = flutter.compileSdkVersion

defaultConfig {
minSdk = 24
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

lint {
checkAllWarnings = true
warningsAsErrors = true
disable.addAll(setOf("AndroidGradlePluginVersion", "InvalidPackage", "GradleDependency", "NewerVersionAvailable"))
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

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("-Xmx4G")
}
}
}
}

dependencies {
implementation("androidx.annotation:annotation:1.9.1")
testImplementation("junit:junit:4.13.2")
testImplementation("org.mockito:mockito-core:5.22.0")
testImplementation("androidx.test:core:1.7.0")
testImplementation("org.robolectric:robolectric:4.16")
}
1 change: 0 additions & 1 deletion packages/camera/camera_android/android/settings.gradle

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = "camera_android"
2 changes: 1 addition & 1 deletion packages/camera/camera_android/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Android implementation of the camera plugin.
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22

version: 0.10.10+15
version: 0.10.10+16

environment:
sdk: ^3.9.0
Expand Down
6 changes: 5 additions & 1 deletion packages/camera/camera_android_camerax/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.7.0+2

* Updates build files from Groovy to Kotlin.

## 0.7.0+1

* Updates example to demonstrate correct exception handling for async return statements, ensuring exceptions thrown during return within try blocks are properly caught as per [dart-lang/sdk#44395](https://github.com/dart-lang/sdk/issues/44395).
Expand Down Expand Up @@ -514,4 +518,4 @@ this plugin should now be compatible with [google_ml_kit_flutter](https://github
* Displaying a live camera preview
* Image streaming

See [`README.md`](README.md) for more details on the limitations of this implementation.
See [`README.md`](README.md) for more details on the limitations of this implementation.
86 changes: 0 additions & 86 deletions packages/camera/camera_android_camerax/android/build.gradle

This file was deleted.

93 changes: 93 additions & 0 deletions packages/camera/camera_android_camerax/android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

group = "io.flutter.plugins.camerax"
version = "1.0"

buildscript {
val kotlinVersion = "2.3.0"
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.22.0")
testImplementation("org.mockito:mockito-inline:5.2.0")
testImplementation("androidx.test:core:1.7.0")
testImplementation("org.robolectric:robolectric:4.16")
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = "camera_android_camerax"
2 changes: 1 addition & 1 deletion packages/camera/camera_android_camerax/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: camera_android_camerax
description: Android implementation of the camera plugin using the CameraX library.
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_android_camerax
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
version: 0.7.0+1
version: 0.7.0+2

environment:
sdk: ^3.9.0
Expand Down
4 changes: 4 additions & 0 deletions packages/espresso/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.4.0+23

* Updates build files from Groovy to Kotlin.

## 0.4.0+22

* Updates minimum supported SDK version to Flutter 3.35/Dart 3.9.
Expand Down
Loading
Loading