Skip to content

Commit

Permalink
update: flutter 3.29 (#248)
Browse files Browse the repository at this point in the history
* upgrade: flutter 3.29

* style: new dart format

* docs: README

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
ronnnnn and autofix-ci[bot] authored Feb 16, 2025
1 parent e25f863 commit 54e22ab
Show file tree
Hide file tree
Showing 26 changed files with 130 additions and 165 deletions.
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dart 3.6.2
flutter 3.27.4
dart 3.7.0
flutter 3.29.0
java temurin-17.0.14+7
bun 1.2.2
1 change: 1 addition & 0 deletions examples/nilts_example/android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ gradle-wrapper.jar
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java
.cxx/

# Remember to never publicly share your keystore.
# See https://flutter.dev/to/reference-keystore
Expand Down
43 changes: 0 additions & 43 deletions examples/nilts_example/android/app/build.gradle

This file was deleted.

45 changes: 45 additions & 0 deletions examples/nilts_example/android/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
plugins {
id("com.android.application")
id("kotlin-android")
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id("dev.flutter.flutter-gradle-plugin")
}

android {
namespace = "com.ronnnnn.nilts_example"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion

compileOptions {
// Up to Java 11 APIs are available through desugaring
// https://developer.android.com/studio/write/java11-minimal-support-table
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}

defaultConfig {
applicationId = "com.ronnnnn.nilts_example"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig = signingConfigs.getByName("debug")
}
}
}

flutter {
source = "../.."
}
18 changes: 0 additions & 18 deletions examples/nilts_example/android/build.gradle

This file was deleted.

21 changes: 21 additions & 0 deletions examples/nilts_example/android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
allprojects {
repositories {
google()
mavenCentral()
}
}

val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get()
rootProject.layout.buildDirectory.value(newBuildDir)

subprojects {
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
project.layout.buildDirectory.value(newSubprojectBuildDir)
}
subprojects {
project.evaluationDependsOn(":app")
}

tasks.register<Delete>("clean") {
delete(rootProject.layout.buildDirectory)
}
2 changes: 1 addition & 1 deletion examples/nilts_example/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
25 changes: 0 additions & 25 deletions examples/nilts_example/android/settings.gradle

This file was deleted.

25 changes: 25 additions & 0 deletions examples/nilts_example/android/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
pluginManagement {
val flutterSdkPath = run {
val properties = java.util.Properties()
file("local.properties").inputStream().use { properties.load(it) }
val flutterSdkPath = properties.getProperty("flutter.sdk")
require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
flutterSdkPath
}

includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.8.1" apply false
id("org.jetbrains.kotlin.android") version "2.1.10" apply false
}

include(":app")
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
Expand Down
6 changes: 2 additions & 4 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,11 @@ scripts:
description: format (dry-run)

fmt:dart:
# /~https://github.com/dart-lang/sdk/issues/59815
run: melos exec -c 1 --fail-fast -- dart format --enable-experiment=digit-separators .
run: melos exec -c 1 --fail-fast -- dart format .
description: format dart

fmt:dart:dry:
# /~https://github.com/dart-lang/sdk/issues/59815
run: melos exec -c 1 --fail-fast -- dart format --set-exit-if-changed --enable-experiment=digit-separators .
run: melos exec -c 1 --fail-fast -- dart format --set-exit-if-changed .
description: format dart (dry-run)

fix:
Expand Down
10 changes: 5 additions & 5 deletions packages/nilts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ Upcoming... 🚀

## Known issues

### Lint rule errors don't appear and quick fixes don't work in IDE (Resolved)
### Lint rule errors don't appear and quick fixes don't work in IDE (Fixed)

> [!IMPORTANT]
> This issue is solved on nilts 0.18.3 using custom_lint 0.7.3.
Expand All @@ -743,10 +743,10 @@ See also:
- [analysis.setContextRoots failed - RequestErrorCode.PLUGIN_ERROR ProcessException: / No such file or directory / Command: flutter pub get · Issue #270 · invertase/dart_custom_lint](/~https://github.com/invertase/dart_custom_lint/issues/270)
- [IntelliJ and Android Studio don't show custom lints · Issue #307 · invertase/dart_custom_lint](/~https://github.com/invertase/dart_custom_lint/issues/307)

### Quick fix priorities (Resolved)
### Quick fix priorities (Fixed)

> [!IMPORTANT]
> Finding which a plugin version fixed the issue is hard, but it looks resolved.
> Finding which a plugin version fixed the issue is hard, but it looks work as expected.
> Checked works as expected on Dart plugin [242.24931](https://plugins.jetbrains.com/plugin/6351-dart/versions/stable/644082) and [243.23654.44](https://plugins.jetbrains.com/plugin/6351-dart/versions/stable/656656).

The priorities assigned to quick fixes are not currently visible in IntelliJ IDEA and Android Studio due to the lack of support for `PrioritizedSourceChange` in these environments.
Expand All @@ -760,10 +760,10 @@ See also:

- [IDEA-336551 Support PrioritizedSourceChange on quick fix.](https://youtrack.jetbrains.com/issue/IDEA-336551/Support-PrioritizedSourceChange-on-quick-fix.)

### fix-all assist (Resolved)
### fix-all assist (Fixed)

> [!IMPORTANT]
> Finding which a plugin version fixed the issue is hard, but it looks resolved.
> Finding which a plugin version fixed the issue is hard, but it looks as expected.
> Checked works as expected on Dart plugin [242.24931](https://plugins.jetbrains.com/plugin/6351-dart/versions/stable/644082) and [243.23654.44](https://plugins.jetbrains.com/plugin/6351-dart/versions/stable/656656).

The fix-all assist feature has been introduced in [custom_lint_builder 0.6.0](/~https://github.com/invertase/dart_custom_lint/pull/223).
Expand Down
4 changes: 2 additions & 2 deletions packages/nilts_test/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ description: A new Flutter module project.
publish_to: 'none'

environment:
sdk: '>=3.6.0 <4.0.0'
flutter: '>=3.27.4'
sdk: '>=3.7.0 <4.0.0'
flutter: '>=3.29.0'

dependencies:
flutter:
Expand Down
5 changes: 1 addition & 4 deletions packages/nilts_test/test/dart_version_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,7 @@ void main() {
() => DartVersion.fromString('3.0.5-0.0.stable'),
throwsArgumentError,
);
expect(
() => DartVersion.fromString('3.0.5-0.0.'),
throwsArgumentError,
);
expect(() => DartVersion.fromString('3.0.5-0.0.'), throwsArgumentError);
});

test('Test equals', () async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// ignore_for_file: unused_element
// ignore_for_file: defined_async_value_setter_type
// ignore_for_file: defined_async_value_getter_type
// ignore_for_file: unused_element_parameter

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// ignore_for_file: defined_value_getter_type
// ignore_for_file: defined_async_callback_type
// ignore_for_file: defined_async_value_setter_type
// ignore_for_file: unused_element_parameter

import 'dart:async';

Expand Down Expand Up @@ -60,11 +61,7 @@ class MainButton extends StatelessWidget {
Widget build(BuildContext context) {
return FilledButton(
onPressed: () {
_onPressed(
() async {},
() async => 0,
() => 0,
);
_onPressed(() async {}, () async => 0, () => 0);
onPressed();
},
child: const Text('Hello World!'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// ignore_for_file: unused_element
// ignore_for_file: defined_async_callback_type
// ignore_for_file: defined_async_value_getter_type
// ignore_for_file: unused_element_parameter

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// ignore_for_file: unused_element
// ignore_for_file: defined_void_callback_type
// ignore_for_file: defined_value_getter_type
// ignore_for_file: unused_element_parameter

import 'package:flutter/material.dart';

Expand Down
7 changes: 2 additions & 5 deletions packages/nilts_test/test/lints/defined_value_getter_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// ignore_for_file: defined_value_setter_type
// ignore_for_file: defined_void_callback_type
// ignore_for_file: defined_async_value_getter_type
// ignore_for_file: unused_element_parameter

import 'package:flutter/material.dart';

Expand Down Expand Up @@ -55,11 +56,7 @@ class MainButton extends StatelessWidget {
Widget build(BuildContext context) {
return FilledButton(
onPressed: () {
_onPressed(
() {},
() => 0,
() async => 0,
);
_onPressed(() {}, () => 0, () async => 0);
onPressed();
},
child: const Text('Hello World!'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// ignore_for_file: defined_value_changed_type
// ignore_for_file: defined_value_setter_type
// ignore_for_file: defined_value_getter_type
// ignore_for_file: unused_element_parameter

import 'package:flutter/material.dart';

Expand Down
14 changes: 3 additions & 11 deletions packages/nilts_test/test/lints/fixed_text_scale_rich_text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,13 @@ class MainApp extends StatelessWidget {
return Column(
children: [
// expect_lint: fixed_text_scale_rich_text
RichText(text: const TextSpan(text: 'Hello World!')),
RichText(
text: const TextSpan(
text: 'Hello World!',
),
),
RichText(
text: const TextSpan(
text: 'Hello World!',
),
text: const TextSpan(text: 'Hello World!'),
textScaler: MediaQuery.textScalerOf(context),
),
RichText(
text: const TextSpan(
text: 'Hello World!',
),
text: const TextSpan(text: 'Hello World!'),
textScaleFactor: MediaQuery.textScaleFactorOf(context),
),
],
Expand Down
Loading

0 comments on commit 54e22ab

Please sign in to comment.