Skip to content

Commit

Permalink
Update dev dependencies in packages (#195)
Browse files Browse the repository at this point in the history
* Migrate debug page to leancode_lint

* Bump dev deps in all packages

* Add workflow for leancode_flutter_svg_adaptive_loader

* Add missing codeowner listing

* Bring back testing parameters

* Bump Dart/Flutter versions on CI

* Fix example of leancode_flutter_svg_adaptive_loader

* Fix lint issues in override_api_endpoint

* Remove test step from leancode_flutter_svg_adaptive_loader CI

* Ignore patch versions in CI
  • Loading branch information
shilangyu authored Oct 17, 2023
1 parent aad21d6 commit f96033f
Show file tree
Hide file tree
Showing 32 changed files with 738 additions and 44 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ packages/override_api_endpoint @lukaszgarstecki @Xezolpl
packages/leancode_lint @RobertOdrowaz @shilangyu
packages/leancode_hooks @bartekpacia
packages/enhanced_gradients @kotertom
packages/leancode_flutter_svg_adaptive_loader @Xezolpl
2 changes: 1 addition & 1 deletion .github/workflows/cqrs-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: 3.0.1
sdk: 3.1

- name: Publish
run: dart pub publish -f
2 changes: 1 addition & 1 deletion .github/workflows/cqrs-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
dart_release: ['3.0.1']
dart_release: ['3.1']

defaults:
run:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/enhanced_gradients-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
- name: Set up Dart
uses: dart-lang/setup-dart@v1
with:
sdk: 3.0.0
sdk: 3.1

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: 3.10.x
flutter-version: 3.13.x
cache: true

- name: Publish and release
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/enhanced_gradients-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ name: enhanced_gradients test
on:
push:
branches: [master]
tags-ignore: ["enhanced_gradients-v*"]
tags-ignore: ['enhanced_gradients-v*']
paths:
- "packages/enhanced_gradients/**"
- 'packages/enhanced_gradients/**'
pull_request:
branches: [master]
paths:
- "packages/enhanced_gradients/**"
- 'packages/enhanced_gradients/**'
# Run a check daily due to the dependency on `material_color_utilities: any`
schedule:
- cron: "0 17 * * *"
- cron: '0 17 * * *'

jobs:
test:
Expand All @@ -23,8 +23,8 @@ jobs:
fail-fast: false
matrix:
include:
- version: "3.10.0"
- channel: "stable"
- version: '3.13.x'
- channel: 'stable'

defaults:
run:
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/leancode_flutter_svg_adaptive_loader-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: leancode_flutter_svg_adaptive_loader publish

on:
push:
tags: ['leancode_flutter_svg_adaptive_loader-v*']

jobs:
publish:
name: Publish to pub.dev

runs-on: ubuntu-latest

permissions:
id-token: write

defaults:
run:
working-directory: packages/leancode_flutter_svg_adaptive_loader

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Dart
uses: dart-lang/setup-dart@v1
with:
sdk: 3.1

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: 3.13.x
cache: true

- name: Publish and release
uses: leancodepl/mobile-tools/.github/actions/pub-release@pub-release-v1
with:
path: packages/leancode_flutter_svg_adaptive_loader
57 changes: 57 additions & 0 deletions .github/workflows/leancode_flutter_svg_adaptive_loader-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: leancode_flutter_svg_adaptive_loader test

on:
push:
branches: [master]
tags-ignore: ['leancode_flutter_svg_adaptive_loader-v*']
paths:
- 'packages/leancode_flutter_svg_adaptive_loader/**'
pull_request:
branches: [master]
paths:
- 'packages/leancode_flutter_svg_adaptive_loader/**'

jobs:
test:
name: Flutter ${{ matrix.channel }}${{ matrix.version }}

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- version: 3.13.x

defaults:
run:
working-directory: packages/leancode_flutter_svg_adaptive_loader

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Flutter
uses: subosito/flutter-action@v1
with:
channel: ${{ matrix.channel }}
flutter-version: ${{ matrix.version }}

- name: Flutter version
run: flutter --version

- name: Cache pub dependencies
uses: actions/cache@v2
with:
path: ${{ env.FLUTTER_HOME }}/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: ${{ runner.os }}-pub-

- name: Download pub dependencies
run: flutter pub get

- name: Run analyzer
run: flutter analyze

- name: Dry run pub publish
# We don't want it to fail the CI, it's just to see how would `pub publish` behave.
run: flutter pub publish --dry-run || true
8 changes: 4 additions & 4 deletions .github/workflows/leancode_hooks-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Dart
- name: Set up Dart
uses: dart-lang/setup-dart@v1
with:
sdk: 3.0.6
sdk: 3.1

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: 3.10.x
flutter-version: 3.13.x
cache: true

- name: Publish and release
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/leancode_hooks-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ jobs:
fail-fast: false
matrix:
include:
- version: 3.10.6
- version: 3.13.5
- version: 3.13.x

defaults:
run:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/leancode_lint-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: 3.1.0
sdk: 3.1

- name: Publish
run: dart pub publish -f
2 changes: 1 addition & 1 deletion .github/workflows/leancode_lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fail-fast: false
matrix:
include:
- version: 3.13.0
- version: 3.13.x

defaults:
run:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/login_client-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: 3.0.1
sdk: 3.1

- name: Publish
run: dart pub publish -f
2 changes: 1 addition & 1 deletion .github/workflows/login_client-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
dart_release: ['3.0.1']
dart_release: ['3.1']

defaults:
run:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/login_client_flutter-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: 2.18.6
sdk: 3.1

- name: Publish
run: dart pub publish -f
3 changes: 1 addition & 2 deletions .github/workflows/login_client_flutter-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ jobs:
fail-fast: false
matrix:
include:
- version: '2.5.0'
- version: '3.3'
- version: '3.13.x'

defaults:
run:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/override_api_endpoint-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: 2.18.6
sdk: 3.1

- name: Publish
run: dart pub publish -f
3 changes: 1 addition & 2 deletions .github/workflows/override_api_endpoint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ jobs:
fail-fast: false
matrix:
include:
- version: '2.5.0'
- version: '3.3'
- version: '3.13.x'

defaults:
run:
Expand Down
4 changes: 2 additions & 2 deletions packages/cqrs/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ dependencies:

dev_dependencies:
coverage: ^1.5.0
leancode_lint: ^4.0.0+1
mocktail: ^0.3.0
leancode_lint: ^6.0.0
mocktail: ^1.0.1
test: ^1.17.5
2 changes: 1 addition & 1 deletion packages/debug_page/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dev_dependencies:
flutter_test:
sdk: flutter
leancode_lint: ^6.0.0
mocktail: ^0.3.0
mocktail: ^1.0.1

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
Expand Down
1 change: 1 addition & 0 deletions packages/enhanced_gradients/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
.pub-cache/
.pub/
/build/
pubspec.lock

# Web related
lib/generated_plugin_registrant.dart
Expand Down
2 changes: 1 addition & 1 deletion packages/enhanced_gradients/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ dev_dependencies:
flutter_test:
sdk: flutter
glados: ^1.1.6
leancode_lint: ^4.0.0
leancode_lint: ^6.0.0
meta: ^1.9.1
2 changes: 0 additions & 2 deletions packages/leancode_analytics/lib/core/event.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'package:flutter/foundation.dart';

/// Basic [AnalyticsEvent] - you can send directly this event with
/// predefined parameters or extend this class to create more specific events
class AnalyticsEvent {
Expand Down
2 changes: 1 addition & 1 deletion packages/leancode_analytics/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
leancode_lint: ^4.0.0+2
leancode_lint: ^6.0.0

flutter:

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ extension AdaptiveSvgGenImage on SvgGenImage {
Clip clipBehavior = Clip.hardEdge,
}) {
return SvgPicture(
LeancodeFlutterSvgAdaptiveLoader(
FlutterSvgAdaptiveLoader(
path,
assetBundle: bundle,
packageName: package,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class MainApp extends StatelessWidget {
child: _SvgPictureWithTitle(
text: 'XML-based foo',
svgPicture: SvgPicture(
LeancodeFlutterSvgAdaptiveLoader('assets/foo.svg'),
FlutterSvgAdaptiveLoader('assets/foo.svg'),
),
),
),
Expand All @@ -36,7 +36,7 @@ class MainApp extends StatelessWidget {
child: _SvgPictureWithTitle(
text: 'Binary compiled foo',
svgPicture: SvgPicture(
LeancodeFlutterSvgAdaptiveLoader(
FlutterSvgAdaptiveLoader(
'assets/foo_compiled.svg',
),
),
Expand Down
Loading

0 comments on commit f96033f

Please sign in to comment.