Skip to content

Commit 51e352f

Browse files
committed
Refactor build process and update dependencies in contributing guide, Makefile, and pubspec files
1 parent 51ee04d commit 51e352f

File tree

7 files changed

+34
-53
lines changed

7 files changed

+34
-53
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ $ choco install protoc
99
$ dart pub global activate protoc_plugin
1010
$ dart pub get
1111
$ protoc --proto_path=lib/src/transport/protobuf --dart_out=lib/src/transport/protobuf lib/src/transport/protobuf/client.proto
12-
$ dart run build_runner build --delete-conflicting-outputs
12+
$ dart pub global activate pubspec_generator
13+
$ dart pub global run pubspec_generator:generate -o lib/src/model/pubspec.yaml.g.dart
1314
$ dart format -l 80 lib/src/model/pubspec.yaml.g.dart lib/src/transport/protobuf/
1415
```
1516

@@ -22,7 +23,8 @@ $ export PATH="$PATH":"$HOME/.pub-cache/bin"
2223
$ dart pub global activate protoc_plugin
2324
$ dart pub get
2425
$ protoc --proto_path=lib/src/transport/protobuf --dart_out=lib/src/transport/protobuf lib/src/transport/protobuf/client.proto
25-
$ dart run build_runner build --delete-conflicting-outputs
26+
$ dart pub global activate pubspec_generator
27+
$ dart pub global run pubspec_generator:generate -o lib/src/model/pubspec.yaml.g.dart
2628
$ dart format -l 80 lib/src/model/pubspec.yaml.g.dart lib/src/transport/protobuf/
2729
```
2830

@@ -35,6 +37,7 @@ $ export PATH="$PATH":"$HOME/.pub-cache/bin"
3537
$ dart pub global activate protoc_plugin
3638
$ dart pub get
3739
$ protoc --proto_path=lib/src/transport/protobuf --dart_out=lib/src/transport/protobuf lib/src/transport/protobuf/client.proto
38-
$ dart run build_runner build --delete-conflicting-outputs
40+
$ dart pub global activate pubspec_generator
41+
$ dart pub global run pubspec_generator:generate -o lib/src/model/pubspec.yaml.g.dart
3942
$ dart format -l 80 lib/src/model/pubspec.yaml.g.dart lib/src/transport/protobuf/
4043
```

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ pana: check
100100
generate: get ## Generate the code
101101
@dart pub global activate protoc_plugin
102102
@protoc --proto_path=lib/src/protobuf --dart_out=lib/src/protobuf lib/src/protobuf/client.proto
103-
@dart run build_runner build --delete-conflicting-outputs
103+
@dart pub global run pubspec_generator:generate -o lib/src/model/pubspec.yaml.g.dart
104104
@dart format -l 80 lib/src/model/pubspec.yaml.g.dart lib/src/protobuf/ test/
105105

106106
.PHONY: gen

analysis_options.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ linter:
133133
unnecessary_statements: true
134134
unnecessary_string_escapes: true
135135
unnecessary_string_interpolations: true
136-
unsafe_html: true
137136
use_full_hex_values_for_flutter_colors: true
138137
use_raw_strings: true
139138
use_string_buffers: true
@@ -188,7 +187,6 @@ linter:
188187
non_constant_identifier_names: true
189188
constant_identifier_names: true
190189
directives_ordering: true
191-
package_api_docs: true
192190
implementation_imports: true
193191
prefer_interpolation_to_compose_strings: true
194192
unnecessary_brace_in_string_interps: true

build.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.

example/clock/frontend/pubspec.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name: spinify_clock_frontend
66

77
description: "Spinify Clock: Frontend"
88

9-
publish_to: 'none'
9+
publish_to: "none"
1010

1111
version: 0.0.1+1
1212

@@ -29,7 +29,6 @@ platforms:
2929
# - description: 'Screenshot 1'
3030
# path: screenshot_1.png
3131

32-
3332
# ==============================================================================
3433
# PROJECT STRUCTURE
3534
# ==============================================================================
@@ -41,13 +40,12 @@ platforms:
4140
#executables:
4241
# -
4342

44-
4543
# ==============================================================================
4644
# DEPENDENCIES
4745
# ==============================================================================
4846

4947
environment:
50-
sdk: '>=3.6.1 <4.0.0'
48+
sdk: ">=3.6.1 <4.0.0"
5149

5250
dependencies:
5351
# Localization

lib/src/model/pubspec.yaml.g.dart

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
// ignore_for_file: use_raw_strings, avoid_classes_with_only_static_members
33
// ignore_for_file: avoid_escaping_inner_quotes, prefer_single_quotes
44

5-
/// GENERATED CODE - DO NOT MODIFY BY HAND
6-
7-
library pubspec;
5+
// GENERATED CODE - DO NOT MODIFY BY HAND
6+
// dart format width=80
7+
// dart format off
8+
// coverage:ignore-file
89

910
// *****************************************************************************
1011
// * pubspec_generator *
@@ -93,13 +94,13 @@ sealed class Pubspec {
9394
static const PubspecVersion version = (
9495
/// Non-canonical string representation of the version as provided
9596
/// in the pubspec.yaml file.
96-
representation: r'0.2.0',
97+
representation: r'0.3.0',
9798

9899
/// Returns a 'canonicalized' representation
99100
/// of the application version.
100101
/// This represents the version string in accordance with
101102
/// Semantic Versioning (SemVer) standards.
102-
canonical: r'0.2.0',
103+
canonical: r'0.3.0',
103104

104105
/// MAJOR version when you make incompatible API changes.
105106
/// The major version number: 1 in "1.2.3".
@@ -108,7 +109,7 @@ sealed class Pubspec {
108109
/// MINOR version when you add functionality
109110
/// in a backward compatible manner.
110111
/// The minor version number: 2 in "1.2.3".
111-
minor: 2,
112+
minor: 3,
112113

113114
/// PATCH version when you make backward compatible bug fixes.
114115
/// The patch version number: 3 in "1.2.3".
@@ -124,13 +125,13 @@ sealed class Pubspec {
124125
/// Build date and time (UTC)
125126
static final DateTime timestamp = DateTime.utc(
126127
2025,
127-
1,
128-
26,
129-
21,
130-
22,
131-
43,
132-
852,
133-
940,
128+
4,
129+
9,
130+
16,
131+
50,
132+
36,
133+
651,
134+
857,
134135
);
135136

136137
/// Name
@@ -165,8 +166,7 @@ sealed class Pubspec {
165166
/// Think of the description as the sales pitch for your package.
166167
/// Users see it when they [browse for packages](https://pub.dev/packages).
167168
/// The description is plain text: no markdown or HTML.
168-
static const String description =
169-
r'Dart client to communicate with Centrifuge and Centrifugo from Dart and Flutter over WebSockets with Protobuf support.';
169+
static const String description = r'Dart client to communicate with Centrifuge and Centrifugo from Dart and Flutter over WebSockets with Protobuf support.';
170170

171171
/// Homepage
172172
///
@@ -187,7 +187,7 @@ sealed class Pubspec {
187187
/// Repository
188188
/// The optional repository field should contain the URL for your package’s
189189
/// source code repository—for example,
190-
/// https://github.com/<user>/<repository>.
190+
/// https://github.com/user/repository
191191
/// If you publish your package to the pub.dev site,
192192
/// then your package’s page displays the repository URL.
193193
/// While providing a repository is optional,
@@ -205,9 +205,8 @@ sealed class Pubspec {
205205
/// to each package’s issue tracker, using the value of this field.
206206
/// If issue_tracker is missing but repository is present and points to GitHub,
207207
/// then the pub.dev site uses the default issue tracker
208-
/// (https://github.com/<user>/<repository>/issues).
209-
static const String issueTracker =
210-
r'https://github.com/PlugFox/spinify/issues';
208+
/// https://github.com/user/repository/issues
209+
static const String issueTracker = r'https://github.com/PlugFox/spinify/issues';
211210

212211
/// Documentation
213212
///
@@ -428,7 +427,7 @@ sealed class Pubspec {
428427
/// see [Package dependencies](https://dart.dev/tools/pub/dependencies).
429428
static const Map<String, Object> dependencies = <String, Object>{
430429
'meta': r'^1.9.1',
431-
'protobuf': r'^3.1.0',
430+
'protobuf': r'^4.0.0',
432431
'web': r'^1.0.0',
433432
'crypto': r'^3.0.3',
434433
'fixnum': r'^1.1.0',
@@ -437,10 +436,8 @@ sealed class Pubspec {
437436

438437
/// Developer dependencies
439438
static const Map<String, Object> devDependencies = <String, Object>{
440-
'build_runner': r'^2.4.10',
441-
'pubspec_generator': r'^4.1.0-pre.1',
442439
'benchmark_harness': r'^2.2.2',
443-
'lints': r'>=4.0.0 <6.0.0',
440+
'lints': r'^5.0.0',
444441
'test': r'^1.25.8',
445442
'fake_async': r'^1.3.2',
446443
'mockito': r'^5.0.0',
@@ -499,4 +496,5 @@ sealed class Pubspec {
499496
'dev_dependencies': devDependencies,
500497
'dependency_overrides': dependencyOverrides,
501498
};
499+
502500
}

pubspec.yaml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: >
44
Dart client to communicate with Centrifuge and Centrifugo from Dart and Flutter
55
over WebSockets with Protobuf support.
66
7-
version: 0.2.0
7+
version: 0.3.0
88

99
homepage: https://centrifugal.dev
1010

@@ -36,17 +36,15 @@ platforms:
3636
# - description: 'Example of using the library to connect to a Centrifugo server.'
3737
# path: example.png
3838

39-
4039
environment:
41-
sdk: '>=3.4.0 <4.0.0'
42-
40+
sdk: ">=3.4.0 <4.0.0"
4341

4442
dependencies:
4543
# Annotations
4644
meta: ^1.9.1
4745

4846
# Protocol Buffers
49-
protobuf: ^3.1.0
47+
protobuf: ^4.0.0
5048

5149
# Web related libraries
5250
web: ^1.0.0
@@ -57,10 +55,8 @@ dependencies:
5755
stack_trace: ^1.11.0
5856

5957
dev_dependencies:
60-
build_runner: ^2.4.10
61-
pubspec_generator: ^4.1.0-pre.1
6258
benchmark_harness: ^2.2.2
63-
lints: '>=4.0.0 <6.0.0'
59+
lints: ^5.0.0
6460
test: ^1.25.8
6561
fake_async: ^1.3.2
6662
mockito: ^5.0.0

0 commit comments

Comments
 (0)