diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d2ec6b8..e7ba6f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: pubspec-file-path: code/pubspec.yaml - name: Cache Flutter id: flutter-cache - uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: flutter key: ${{ env.cache-name }}-ubuntu-latest-${{ steps.get-flutter-version.outputs.version }}-${{ hashFiles('code/pubspec.lock') }} @@ -67,7 +67,7 @@ jobs: working-directory: code - name: Analyze Flutter if: matrix.category == 'static' - uses: zgosalvez/github-actions-analyze-dart@bc72307ba08e59e62f4d6e5ae311cc464dc0f296 + uses: zgosalvez/github-actions-analyze-dart@92375956021937d35938504eefb62b18bfebb154 with: fail-on-warnings: true working-directory: code @@ -77,9 +77,9 @@ jobs: working-directory: code - name: Upload code coverage to GitHub if: matrix.category != 'static' - uses: actions/upload-artifact@27121b0bdffd731efa15d66772be8dc71245d074 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 with: - name: code-coverage + name: code-coverage-${{ matrix.category }} path: code/coverage/lcov.${{ matrix.category }}.info coverage_report: @@ -90,10 +90,11 @@ jobs: - name: Clone the repository uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f - name: Download code coverage from GitHub - uses: actions/download-artifact@3be87be14a055c47b01d3bd88f8fe02320a9bb60 + uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e with: - name: code-coverage path: coverage + name: code-coverage-* + merge-multiple: true - name: Report code coverage uses: zgosalvez/github-actions-report-lcov@49af65b0586c274a625a41a2dc8aaaae7d00568b with: diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 92402af..1a2b3ac 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -45,7 +45,7 @@ jobs: pubspec-file-path: code/pubspec.yaml - name: Cache Flutter id: flutter-cache - uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: flutter key: ${{ env.cache-name }}-ubuntu-latest-${{ steps.get-flutter-version.outputs.version }}-${{ hashFiles('code/pubspec.lock') }} @@ -78,7 +78,7 @@ jobs: # static testing - name: Analyze Flutter if: matrix.category == 'static' - uses: zgosalvez/github-actions-analyze-dart@bc72307ba08e59e62f4d6e5ae311cc464dc0f296 + uses: zgosalvez/github-actions-analyze-dart@92375956021937d35938504eefb62b18bfebb154 with: fail-on-warnings: true working-directory: code @@ -123,7 +123,7 @@ jobs: pubspec-file-path: code/pubspec.yaml - name: Cache Flutter id: flutter-cache - uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: flutter key: ${{ env.cache-name }}-${{ matrix.os }}-${{ steps.get-flutter-version.outputs.version }}-${{ hashFiles('code/pubspec.lock') }} @@ -188,7 +188,7 @@ jobs: # apk/aab - name: Upload the artifacts — ${{ matrix.file }}-mapping.txt file if: matrix.file == 'apk' || matrix.file == 'aab' - uses: actions/upload-artifact@27121b0bdffd731efa15d66772be8dc71245d074 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 with: name: ${{ matrix.file }}-mapping.txt path: ${{ matrix.file }}-mapping.txt @@ -217,7 +217,7 @@ jobs: run: zip --recurse-paths ${{ github.workspace }}/code/flutter-${{ matrix.file }}-symbols.zip . working-directory: code/${{ env.FLUTTER_DEBUG_INFO_PATH }} - name: Upload the artifacts — flutter-${{ matrix.file }}-symbols.zip file - uses: actions/upload-artifact@27121b0bdffd731efa15d66772be8dc71245d074 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 with: name: flutter-${{ matrix.file }}-symbols.zip path: code/flutter-${{ matrix.file }}-symbols.zip @@ -231,7 +231,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload the artifacts — ${{ matrix.file }} file - uses: actions/upload-artifact@27121b0bdffd731efa15d66772be8dc71245d074 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 with: name: app.${{ matrix.file }} path: app.${{ matrix.file }} diff --git a/.gitignore b/.gitignore index 0fa6b67..79c113f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,9 +5,12 @@ *.swp .DS_Store .atom/ +.build/ .buildlog/ .history .svn/ +.swiftpm/ +migrate_working_dir/ # IntelliJ related *.iml @@ -26,14 +29,10 @@ .dart_tool/ .flutter-plugins .flutter-plugins-dependencies -.packages .pub-cache/ .pub/ /build/ -# Web related -lib/generated_plugin_registrant.dart - # Symbolication related app.*.symbols diff --git a/.metadata b/.metadata index 80206eb..39be05b 100644 --- a/.metadata +++ b/.metadata @@ -4,7 +4,42 @@ # This file should be version controlled and should not be manually edited. version: - revision: c5a4b4029c0798f37c4a39b479d7cb75daa7b05c - channel: stable + revision: "c53fdbdf24daba4bc81ccc6d274ce13d7d34d05e" + channel: "master" project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: c53fdbdf24daba4bc81ccc6d274ce13d7d34d05e + base_revision: c53fdbdf24daba4bc81ccc6d274ce13d7d34d05e + - platform: android + create_revision: c53fdbdf24daba4bc81ccc6d274ce13d7d34d05e + base_revision: c53fdbdf24daba4bc81ccc6d274ce13d7d34d05e + - platform: ios + create_revision: c53fdbdf24daba4bc81ccc6d274ce13d7d34d05e + base_revision: c53fdbdf24daba4bc81ccc6d274ce13d7d34d05e + - platform: linux + create_revision: c53fdbdf24daba4bc81ccc6d274ce13d7d34d05e + base_revision: c53fdbdf24daba4bc81ccc6d274ce13d7d34d05e + - platform: macos + create_revision: c53fdbdf24daba4bc81ccc6d274ce13d7d34d05e + base_revision: c53fdbdf24daba4bc81ccc6d274ce13d7d34d05e + - platform: web + create_revision: c53fdbdf24daba4bc81ccc6d274ce13d7d34d05e + base_revision: c53fdbdf24daba4bc81ccc6d274ce13d7d34d05e + - platform: windows + create_revision: c53fdbdf24daba4bc81ccc6d274ce13d7d34d05e + base_revision: c53fdbdf24daba4bc81ccc6d274ce13d7d34d05e + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000..0d29021 --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/android/.gitignore b/android/.gitignore index 0a741cb..be3943c 100644 --- a/android/.gitignore +++ b/android/.gitignore @@ -5,7 +5,10 @@ gradle-wrapper.jar /gradlew.bat /local.properties GeneratedPluginRegistrant.java +.cxx/ # Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +# See https://flutter.dev/to/reference-keystore key.properties +**/*.keystore +**/*.jks diff --git a/android/app/build.gradle b/android/app/build.gradle deleted file mode 100644 index b8bb960..0000000 --- a/android/app/build.gradle +++ /dev/null @@ -1,59 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 30 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.github_actions_flutter_workflows" - minSdkVersion 16 - targetSdkVersion 30 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - 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.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts new file mode 100644 index 0000000..9d92bcc --- /dev/null +++ b/android/app/build.gradle.kts @@ -0,0 +1,44 @@ +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.example.github_actions_flutter_workflows" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId = "com.example.github_actions_flutter_workflows" + // 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 = "../.." +} diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index b07f44a..399f698 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,6 +1,6 @@ - - diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index f9bdaea..493a18b 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,11 +1,13 @@ - - + - - @@ -38,4 +31,15 @@ android:name="flutterEmbedding" android:value="2" /> + + + + + + + diff --git a/android/app/src/main/kotlin/com/example/github_actions_flutter_workflows/MainActivity.kt b/android/app/src/main/kotlin/com/example/github_actions_flutter_workflows/MainActivity.kt index 859461c..d5fa483 100644 --- a/android/app/src/main/kotlin/com/example/github_actions_flutter_workflows/MainActivity.kt +++ b/android/app/src/main/kotlin/com/example/github_actions_flutter_workflows/MainActivity.kt @@ -2,5 +2,4 @@ package com.example.github_actions_flutter_workflows import io.flutter.embedding.android.FlutterActivity -class MainActivity: FlutterActivity() { -} +class MainActivity : FlutterActivity() diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml index 449a9f9..06952be 100644 --- a/android/app/src/main/res/values-night/styles.xml +++ b/android/app/src/main/res/values-night/styles.xml @@ -3,14 +3,14 @@