Browse Source

update gradle

git@h5.yoqi.me 1 year ago
parent
commit
4e50407acb

+ 1 - 0
.devcontainer/Dockerfile

@@ -0,0 +1 @@
+FROM jianboy/flutter-dev-container:3.0.5

+ 45 - 0
.devcontainer/devcontainer.json

@@ -0,0 +1,45 @@
+// java8 + android env
+// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
+// https://github.com/microsoft/vscode-dev-containers/tree/v0.233.0/containers/java-8
+{
+    "name": "Java 11",
+    "build": {
+        "dockerfile": "Dockerfile",
+        "args": {
+            // Use the VARIANT arg to pick a Debian OS version: buster, bullseye
+            // Use bullseye when running on local arm64/Apple Silicon.
+            "VARIANT": "buster",
+            // Options
+            "INSTALL_MAVEN": "true",
+            "INSTALL_GRADLE": "true",
+            "NODE_VERSION": "lts/*"
+        }
+    },
+    // Set *default* container specific settings.json values on container create.
+    "settings": {
+        "java.home": "/docker-java-home",
+        "java.import.gradle.java.home": "/usr/local/sdkman/candidates/java/current",
+        "java.configuration.runtimes": [
+            {
+                "default": true,
+                "name": "JavaSE-11",
+                "path": "/usr/local/sdkman/candidates/java/current"
+            }
+        ]
+    },
+    // Add the IDs of extensions you want installed when the container is created.
+    "extensions": [
+        "vscjava.vscode-java-pack",
+        "dart-code.dart-code",
+        "dart-code.flutter"
+    ],
+    // Use 'forwardPorts' to make a list of ports inside the container available locally.
+    // "forwardPorts": [],
+    // Use 'postCreateCommand' to run commands after the container is created.
+    // "postCreateCommand": "java -version",
+    // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
+    "remoteUser": "vscode",
+    "features": {
+        "docker-in-docker": "latest"
+    }
+}

+ 2 - 2
.github/workflows/build.yml

@@ -17,12 +17,12 @@ jobs:
         uses: actions/setup-java@v2
         with:
           distribution: 'adopt'
-          java-version: "8.x"
+          java-version: "11"
 
       # - name: Setup gradle
       #   uses: eskatos/gradle-command-action@v1
       #   with:
-      #     gradle-version: 6.5
+      #     gradle-version: 7.3.3
 
       - name: Flutter action
         uses: subosito/flutter-action@v1.5.3

+ 1 - 1
android/build.gradle

@@ -5,7 +5,7 @@ buildscript {
     }
 
     dependencies {
-        classpath 'com.android.tools.build:gradle:4.1.0'
+        classpath 'com.android.tools.build:gradle:7.2.2'
     }
 }
 

+ 1 - 1
android/gradle/wrapper/gradle-wrapper.properties

@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip

+ 1 - 1
lib/main.dart

@@ -104,7 +104,7 @@ class _MyHomePageState extends State<MyHomePage> {
           // axis because Columns are vertical (the cross axis would be
           // horizontal).
           mainAxisAlignment: MainAxisAlignment.center,
-          children: <Widget>[
+          children: [
             const Text(
               'You have pushed the button this many times:',
             ),

+ 1 - 1
pubspec.yaml

@@ -4,7 +4,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
 version: 1.0.0+1
 
 environment:
-  sdk: ">=2.7.0 <3.0.0"
+  sdk: ">=2.17.6 <3.0.0"
 
 dependencies:
   flutter:

+ 1 - 1
window_size/lib/src/platform_window.dart

@@ -18,7 +18,7 @@ import 'screen.dart';
 /// Represents a window, containing information about its size, position, and
 /// properties.
 class PlatformWindow {
-  /// Create a new window.
+  /// Create a window.
   PlatformWindow(this.frame, this.scaleFactor, this.screen);
 
   /// The frame of the screen, in screen coordinates.

+ 1 - 1
window_size/lib/src/screen.dart

@@ -16,7 +16,7 @@ import 'dart:ui';
 /// Represents a screen, containing information about its size, position, and
 /// properties.
 class Screen {
-  /// Create a new screen.
+  /// Create a screen.
   Screen(this.frame, this.visibleFrame, this.scaleFactor);
 
   /// The frame of the screen, in screen coordinates.

+ 1 - 1
window_size/pubspec.yaml

@@ -17,7 +17,7 @@ flutter:
         pluginClass: WindowSizePlugin
 
 environment:
-  sdk: '>=2.12.0-0 <3.0.0'
+  sdk: ">=2.17.6 <3.0.0"
 
 dependencies:
   flutter: