Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
a9f22ea
Convert plugin build to Kotlin
stuartmorgan-g Feb 26, 2026
f72f9dd
Update tool tests
stuartmorgan-g Feb 26, 2026
8b6ee1e
More fixes
stuartmorgan-g Feb 27, 2026
1c6fbb0
Remove Kotlin bits
stuartmorgan-g Feb 27, 2026
1d9a09b
Update test file creation
stuartmorgan-g Mar 3, 2026
3a34e12
Version bump
stuartmorgan-g Mar 3, 2026
7bfc8ad
Undo useJUnitPlatform addition
stuartmorgan-g Mar 3, 2026
bec135d
Convert all remaining pluign settings.gradle files
stuartmorgan-g Feb 27, 2026
a9c8061
Simple bulk transformations
stuartmorgan-g Feb 27, 2026
41622f2
Update lint options
stuartmorgan-g Feb 27, 2026
c6a8cb2
Standardize testOptions
stuartmorgan-g Feb 27, 2026
11e903c
Config adjustment
stuartmorgan-g Feb 27, 2026
5b0c67a
Kotlin version syntax update
stuartmorgan-g Feb 27, 2026
895f104
Remove rootProject
stuartmorgan-g Feb 27, 2026
f5dadd7
Consistent whitespace
stuartmorgan-g Feb 27, 2026
6442ad5
Fix more classpaths
stuartmorgan-g Feb 27, 2026
3ef33d4
Remove sourceSets, as they shouldn't be needed
stuartmorgan-g Feb 27, 2026
2b7f2c7
Convert unchecked and deprecation suppressions
stuartmorgan-g Feb 27, 2026
eae9f7b
def -> val
stuartmorgan-g Feb 27, 2026
7097fe9
Rename build.gradle files
stuartmorgan-g Feb 27, 2026
a33e437
Compile fixes; option 1
stuartmorgan-g Feb 27, 2026
c0ea36b
Fix lint disabling syntax
stuartmorgan-g Feb 27, 2026
47e534b
Only useJUnitPlatform where that was already present
stuartmorgan-g Mar 3, 2026
b9627d5
Version bumps
stuartmorgan-g Mar 3, 2026
ad725eb
Merge branch 'main' into kotlin-gradle-all-plugins
stuartmorgan-g Mar 9, 2026
9e45eba
Fix ima version bump
stuartmorgan-g Mar 9, 2026
f3fd907
Revert pigeon version bump; changes are test-only
stuartmorgan-g Mar 9, 2026
e30d40d
Fix more jvmTarget migrations
stuartmorgan-g Mar 9, 2026
46597c7
Merge branch 'main' into kotlin-gradle-all-plugins
stuartmorgan-g Mar 9, 2026
2735899
autoformat tool
stuartmorgan-g Mar 9, 2026
b5a0c09
Add gradle imports
stuartmorgan-g Mar 9, 2026
8181810
Update JVM syntax in pigeon test plugin
stuartmorgan-g Mar 9, 2026
8976f01
Merge branch 'main' into kotlin-gradle-all-plugins
stuartmorgan-g Mar 18, 2026
36513b2
Merge branch 'main' into kotlin-gradle-all-plugins
stuartmorgan-g Mar 18, 2026
62b45cb
Missed line in Pigeon gradle
stuartmorgan-g Mar 18, 2026
6d53e57
Add accidentally dropped waring-as-error flag
stuartmorgan-g Mar 19, 2026
6de3cf9
Fix accidental '/" change
stuartmorgan-g Mar 20, 2026
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
group = "io.flutter.plugins.camera"
version = "1.0-SNAPSHOT"
def args = ["-Xlint:deprecation","-Xlint:unchecked"]

buildscript {
repositories {
Expand All @@ -13,18 +12,21 @@ buildscript {
}
}

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

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

apply plugin: 'com.android.library'
plugins {
id("com.android.library")
}

android {
buildFeatures {
Expand All @@ -41,7 +43,7 @@ android {
lint {
checkAllWarnings = true
warningsAsErrors = true
disable 'AndroidGradlePluginVersion', 'InvalidPackage', 'GradleDependency', 'NewerVersionAvailable'
disable.addAll(setOf("AndroidGradlePluginVersion", "InvalidPackage", "GradleDependency", "NewerVersionAvailable"))
}

compileOptions {
Expand All @@ -50,18 +52,20 @@ android {
}

testOptions {
unitTests.includeAndroidResources = true
unitTests.returnDefaultValues = true
unitTests.all {
// 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.
jvmArgs "-Xmx4G"
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
outputs.upToDateWhen {false}
showStandardStreams = true
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")
}
}
}
Expand Down
1 change: 0 additions & 1 deletion packages/camera/camera_android/android/settings.gradle

This file was deleted.

1 change: 1 addition & 0 deletions packages/camera/camera_android/android/settings.gradle.kts
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.1+1

* Updates build files from Groovy to Kotlin.

## 0.7.1

* Removes outdated restrictions against concurrent camera use cases.
Expand Down Expand Up @@ -518,4 +522,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.
Original file line number Diff line number Diff line change
@@ -1,28 +1,38 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

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

buildscript {
ext.kotlin_version = '2.3.0'
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:$kotlin_version")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
}
}

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

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
plugins {
id("com.android.library")
id("kotlin-android")
}

kotlin {
compilerOptions {
jvmTarget = JvmTarget.fromTarget(JavaVersion.VERSION_17.toString())
}
}

android {
namespace = "io.flutter.plugins.camerax"
Expand All @@ -34,49 +44,46 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
// This must match the Java version provided in compileOptions.
jvmTarget = JavaVersion.VERSION_17.toString()
}
Comment on lines -37 to -40
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no longer needed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The kotlin { compilerOptions { ... } } section on line 31 is the newer form of this.


defaultConfig {
// CameraX APIs require API 23 or later.
minSdk = 23
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

testOptions {
unitTests.includeAndroidResources = true
unitTests.returnDefaultValues = true
unitTests.all {
// 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.
jvmArgs "-Xmx1G"
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
outputs.upToDateWhen {false}
showStandardStreams = true
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 'AndroidGradlePluginVersion', 'GradleDependency', 'InvalidPackage', 'NewerVersionAvailable'
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.
def camerax_version = "1.5.3"
implementation("androidx.camera:camera-core:${camerax_version}")
implementation("androidx.camera:camera-camera2:${camerax_version}")
implementation("androidx.camera:camera-lifecycle:${camerax_version}")
implementation("androidx.camera:camera-video:${camerax_version}")
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")
Expand Down

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.1
version: 0.7.1+1

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+24

* Updates build files from Groovy to Kotlin.

## 0.4.0+23

* Removed the unused `io.flutter.network-policy` metadata tag from the README and example application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ buildscript {
}
}

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

apply plugin: 'com.android.library'
plugins {
id("com.android.library")
}

android {
namespace = "com.example.espresso"
Expand All @@ -38,19 +40,20 @@ android {
lint {
checkAllWarnings = true
warningsAsErrors = true
disable 'AndroidGradlePluginVersion', 'InvalidPackage', 'GradleDependency', 'NewerVersionAvailable'
disable.addAll(setOf("AndroidGradlePluginVersion", "InvalidPackage", "GradleDependency", "NewerVersionAvailable"))
baseline = file("lint-baseline.xml")
}


testOptions {
unitTests.includeAndroidResources = true
unitTests.returnDefaultValues = true
unitTests.all {
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
outputs.upToDateWhen {false}
showStandardStreams = true
unitTests {
isIncludeAndroidResources = true
isReturnDefaultValues = true
all {
it.outputs.upToDateWhen { false }
it.testLogging {
events("passed", "skipped", "failed", "standardOut", "standardError")
showStandardStreams = true
}
}
}
}
Expand Down
1 change: 0 additions & 1 deletion packages/espresso/android/settings.gradle

This file was deleted.

1 change: 1 addition & 0 deletions packages/espresso/android/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = "espresso"
2 changes: 1 addition & 1 deletion packages/espresso/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Java classes for testing Flutter apps using Espresso.
Allows driving Flutter widgets from a native Espresso test.
repository: https://github.com/flutter/packages/tree/main/packages/espresso
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+espresso%22
version: 0.4.0+23
version: 0.4.0+24

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

* Updates build files from Groovy to Kotlin.
* Updates minimum supported SDK version to Flutter 3.35/Dart 3.9.

## 0.5.2+4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ buildscript {
}
}

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

apply plugin: 'com.android.library'
plugins {
id("com.android.library")
}

android {
namespace = "dev.flutter.packages.file_selector_android"
Expand All @@ -45,17 +47,19 @@ android {
lint {
checkAllWarnings = true
warningsAsErrors = true
disable 'AndroidGradlePluginVersion', 'InvalidPackage', 'GradleDependency', 'NewerVersionAvailable'
disable.addAll(setOf("AndroidGradlePluginVersion", "InvalidPackage", "GradleDependency", "NewerVersionAvailable"))
}

testOptions {
unitTests.includeAndroidResources = true
unitTests.returnDefaultValues = true
unitTests.all {
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
outputs.upToDateWhen {false}
showStandardStreams = true
unitTests {
isIncludeAndroidResources = true
isReturnDefaultValues = true
all {
it.outputs.upToDateWhen { false }
it.testLogging {
events("passed", "skipped", "failed", "standardOut", "standardError")
showStandardStreams = true
}
}
}
}
Expand Down

This file was deleted.

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

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

* Updates build files from Groovy to Kotlin.
* Updates README to reflect currently supported OS version.

## 2.0.33
Expand Down
Loading
Loading