Skip to content

Commit 33a356d

Browse files
authored
chore: Remove all generated files (#454)
1 parent 946f907 commit 33a356d

File tree

93 files changed

+111
-29016
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+111
-29016
lines changed

.github/workflows/ci.yaml

Lines changed: 80 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -8,115 +8,106 @@ on:
88
workflow_dispatch:
99

1010
jobs:
11-
analyze:
11+
setup:
1212
runs-on: ubuntu-22.04
1313
steps:
14-
- uses: actions/checkout@v4
15-
- uses: Atsumi3/[email protected]
16-
- uses: bluefireteam/melos-action@v3
17-
- run: melos analyze
14+
- uses: actions/checkout@v3
15+
- uses: Atsumi3/[email protected]
16+
- uses: bluefireteam/melos-action@v2
17+
- run: melos generate
18+
- run: melos gen-l10n
19+
- uses: actions/cache@v3
20+
with:
21+
path: .
22+
key: ${{ runner.os }}-repo-${{ github.sha }}-generated
1823

1924
build:
2025
runs-on: ubuntu-22.04
26+
needs: setup
2127
steps:
22-
- uses: actions/checkout@v4
23-
- uses: Atsumi3/[email protected]
24-
- uses: bluefireteam/melos-action@v3
25-
- run: sudo apt update
26-
- run: sudo apt install -y clang cmake curl libgtk-3-dev ninja-build pkg-config unzip xvfb
27-
env:
28-
DEBIAN_FRONTEND: noninteractive
29-
- run: melos build
28+
- uses: actions/checkout@v4
29+
- uses: Atsumi3/[email protected]
30+
- uses: bluefireteam/melos-action@v3
31+
- run: sudo apt update
32+
- run: sudo apt install -y clang cmake curl libgtk-3-dev ninja-build pkg-config unzip xvfb
33+
env:
34+
DEBIAN_FRONTEND: noninteractive
35+
- run: melos build
3036

31-
coverage:
37+
analyze:
3238
runs-on: ubuntu-22.04
39+
needs: setup
3340
steps:
34-
- uses: actions/checkout@v4
35-
- uses: Atsumi3/[email protected]
36-
- uses: bluefireteam/melos-action@v3
37-
- run: sudo apt update
38-
- run: sudo apt install -y lcov
39-
env:
40-
DEBIAN_FRONTEND: noninteractive
41-
- run: melos run coverage
42-
- uses: codecov/codecov-action@v4
43-
with:
44-
token: ${{secrets.CODECOV_TOKEN}}
41+
- uses: actions/checkout@v3
42+
- name: Restore repository cache
43+
uses: actions/cache@v3
44+
with:
45+
path: .
46+
key: ${{ runner.os }}-repo-${{ github.sha }}-generated
47+
restore-keys: |
48+
${{ runner.os }}-repo-
49+
- name: Restore repository cache
50+
uses: actions/cache@v3
51+
with:
52+
path: .
53+
key: ${{ runner.os }}-repo-${{ github.sha }}-generated
54+
restore-keys: |
55+
${{ runner.os }}-repo-
56+
- uses: Atsumi3/[email protected]
57+
- uses: bluefireteam/melos-action@v2
58+
- run: melos analyze --fatal-infos
4559

4660
format:
4761
runs-on: ubuntu-22.04
62+
needs: setup
4863
steps:
49-
- uses: actions/checkout@v4
50-
- uses: Atsumi3/[email protected]
51-
- uses: bluefireteam/melos-action@v3
52-
- run: melos run format
53-
54-
integration:
55-
runs-on: ubuntu-22.04
56-
steps:
57-
- uses: actions/checkout@v4
58-
- uses: Atsumi3/[email protected]
59-
- uses: bluefireteam/melos-action@v3
60-
- run: sudo apt update
61-
- run: sudo apt install -y clang cmake curl libgtk-3-dev ninja-build pkg-config unzip xvfb
62-
env:
63-
DEBIAN_FRONTEND: noninteractive
64-
- run: melos exec -c 1 --dir-exists=integration_test -- \
65-
xvfb-run -a xvfb-run -a -s '-screen 0 1024x768x24 +extension GLX' \
66-
flutter test integration_test
64+
- uses: actions/checkout@v3
65+
- name: Restore repository cache
66+
uses: actions/cache@v3
67+
with:
68+
path: .
69+
key: ${{ runner.os }}-repo-${{ github.sha }}-generated
70+
restore-keys: |
71+
${{ runner.os }}-repo-
72+
- uses: Atsumi3/[email protected]
73+
- uses: bluefireteam/melos-action@v2
74+
- run: melos format:exclude
6775

68-
mocks:
69-
runs-on: ubuntu-22.04
70-
steps:
71-
- uses: actions/checkout@v4
72-
- uses: Atsumi3/[email protected]
73-
- uses: bluefireteam/melos-action@v3
74-
- run: melos generate
75-
- run: ./.github/scripts/check-outdated-files.sh
76-
if: github.event_name == 'pull_request'
77-
- uses: peter-evans/create-pull-request@v7
78-
if: github.event_name != 'pull_request'
79-
id: create-pr
80-
with:
81-
add-paths: '**/*.mocks.dart'
82-
title: 'chore: regenerate mocks'
83-
commit-message: 'chore: regenerate mocks'
84-
branch: create-pull-request/mocks
85-
delete-branch: true
86-
87-
l10n:
88-
runs-on: ubuntu-22.04
89-
steps:
90-
- uses: actions/checkout@v4
91-
- uses: Atsumi3/[email protected]
92-
- uses: bluefireteam/melos-action@v3
93-
- run: melos gen-l10n
94-
- run: ./.github/scripts/check-outdated-files.sh
95-
if: github.event_name == 'pull_request'
96-
- uses: peter-evans/create-pull-request@v7
97-
if: github.event_name != 'pull_request'
98-
id: create-pr
99-
with:
100-
add-paths: '**/l10n/*.dart'
101-
title: 'chore: regenerate l10n'
102-
commit-message: 'chore: regenerate l10n'
103-
branch: create-pull-request/l10n
104-
delete-branch: true
10576

10677
publish:
10778
name: Dry-run publish
79+
needs: setup
10880
runs-on: ubuntu-22.04
10981
steps:
110-
- uses: actions/checkout@v4
111-
- uses: Atsumi3/[email protected]
112-
- uses: bluefireteam/melos-action@v3
113-
# Remove ubuntu_test from ignore list once
114-
- run: melos exec --no-private --ignore ubuntu_test -- flutter pub publish --dry-run
82+
- uses: actions/checkout@v4
83+
- name: Restore repository cache
84+
uses: actions/cache@v3
85+
with:
86+
path: .
87+
key: ${{ runner.os }}-repo-${{ github.sha }}-generated
88+
restore-keys: |
89+
${{ runner.os }}-repo-
90+
- uses: Atsumi3/[email protected]
91+
- uses: bluefireteam/melos-action@v3
92+
# Remove ubuntu_test from ignore list once
93+
- run: melos exec --no-private --ignore ubuntu_test -- flutter pub publish --dry-run
11594

11695
test:
11796
runs-on: ubuntu-22.04
97+
needs: setup
11898
steps:
119-
- uses: actions/checkout@v4
120-
- uses: Atsumi3/[email protected]
121-
- uses: bluefireteam/melos-action@v3
122-
- run: melos test
99+
- uses: actions/checkout@v3
100+
- name: Restore repository cache
101+
uses: actions/cache@v3
102+
with:
103+
path: .
104+
key: ${{ runner.os }}-repo-${{ github.sha }}-generated
105+
restore-keys: |
106+
${{ runner.os }}-repo-
107+
- uses: Atsumi3/[email protected]
108+
- uses: bluefireteam/melos-action@v2
109+
- run: sudo apt update && sudo apt install -y lcov
110+
- run: melos coverage
111+
- uses: codecov/codecov-action@v3
112+
with:
113+
token: ${{secrets.CODECOV_TOKEN}}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ coverage/
88

99
# FVM Version Cache
1010
.fvm/
11-
**/.fvm
11+
**/.fvm
12+
13+
**/*.g.dart

melos.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ command:
2020
dev_dependencies:
2121
mockito: 5.4.4
2222

23+
publish:
24+
hooks:
25+
pre: melos gen-l10n
26+
2327
scripts:
2428
# analyze all packages
2529
analyze: >
@@ -42,12 +46,14 @@ scripts:
4246
lcov --remove coverage/lcov.info '**/*.g.dart' '**/*.freezed.dart' -o coverage/lcov.info
4347

4448
# format all packages
45-
format: >
49+
format:exclude: >
4650
find . -name '*.dart' \
47-
! -name '*.g.dart' \
4851
! -name '*.freezed.dart' \
49-
! -path '*/l10n/*' \
50-
! -path "*/.*/*" \
52+
! -name '*.g.dart' \
53+
! -name '*.mocks.dart' \
54+
! -path '*/l10n/*.dart' \
55+
! -name '*.pb*.dart' \
56+
! -path '*/.*/*' \
5157
| xargs fvm dart format --set-exit-if-changed
5258

5359
# run build_runner to generate code in all packages
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// Linux extensions on the [platform](https://pub.dev/packages/platform)
22
/// package for detecting Linux distro and desktop environment.
3-
library platform_linux;
3+
library;
44

55
export 'src/linux_desktop.dart';
66
export 'src/linux_distro.dart';

packages/safe_change_notifier/lib/safe_change_notifier.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/// that make `notifyListeners()` a no-op, rather than an error, after disposal.
33
///
44
/// ![safe_change_notifier](https://github.com/canonical/ubuntu-flutter-plugins/raw/main/packages/safe_change_notifier/images/safe_change_notifier.png)
5-
library safe_change_notifier;
5+
library;
66

77
export 'src/change_notifier.dart';
88
export 'src/state_notifier.dart';

packages/timezone_map/lib/timezone_map.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
library timezone_map;
1+
library;
22

33
export 'src/controller.dart';
44
export 'src/exception.dart';

packages/ubuntu_flavor/lib/ubuntu_flavor.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
/// print(flavor);
99
/// }
1010
/// ```
11-
library ubuntu_flavor;
11+
library;
1212

1313
export 'src/ubuntu_flavor.dart';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
library ubuntu_lints;
1+
library;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
arb-dir: lib/src/l10n
22
template-arb-file: ubuntu_en.arb
33
output-class: UbuntuLocalizations
4-
output-localization-file: ubuntu_localizations.dart
4+
output-localization-file: ubuntu_localizations.g.dart
55
synthetic-package: false
66
nullable-getter: false

0 commit comments

Comments
 (0)