Skip to content

Commit a5d1aec

Browse files
authored
v4.0.0 (#130)
* chore: update dependencies (#125) * chore: update dependencies * chore: update android gradle wrapper * refactor: delete deprecated parames (#126) * refactor: remove non null safety codes (#127) * refactor: remove non null safety codes * refactor: delete unused test resources * Replace Makefile to Melos (#124) * build: replase to melos * chore: update dependencies * chore: update dependencies * chore: fix path * chore: fix path * chore: fix path * chore: update to nullsafety melos * chore: update github templete * chore: separete task for machine * chore: fix case sensitive * refactor: remove unused code for analyzing * chore: remove deprecated field * build: add vscode settings (#129) * chore: Upgrade dependencies (#128) * chore: update dependencies * chore: remove unuse line * build: update dart peth * chore: fix sdk path * chore: update changelog * revert * chore: add vscode settings * refactor: add directives_ordering for analyze (#131) * chore: bump up 4.0.0
1 parent 90301bb commit a5d1aec

Some content is hidden

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

60 files changed

+561
-1035
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
### What does this change?
22

3-
### What is the value of this and can you measure success?
4-

.github/workflows/dart-ci.yaml

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,41 @@ jobs:
2323
sdk: '2.14.1'
2424

2525
- name: Set environment
26+
if: startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')
2627
run: echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH
2728

28-
- name: Get dependencies
29+
- name: Set environment
30+
if: startsWith(matrix.os, 'windows')
31+
run: echo "%LOCALAPPDATA%\Pub\Cache\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
32+
33+
- name: Get dependencies for macos and ubuntu
34+
if: startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')
35+
run: |
36+
dart pub global activate melos
37+
melos run pub:get
38+
39+
- name: Get dependencies for Windows
40+
if: startsWith(matrix.os, 'windows')
2941
run: |
30-
make dependencies
42+
dart pub global activate melos 1.0.0-dev.3
43+
melos run pub:get
3144
3245
- name: Run tests for our dart project.
46+
if: startsWith(matrix.os, 'ubuntu')
3347
run: |
34-
make unit-test
48+
melos run unit:test
3549
3650
- name: Run coverage
37-
if: matrix.os == 'ubuntu-latest'
51+
if: startsWith(matrix.os, 'ubuntu')
3852
run: |
39-
make coverage
53+
melos run coverage
4054
4155
- name: Generate example
4256
run: |
43-
make generate-with-command
44-
make generate-with-runner
57+
melos run example:command
58+
melos run example:build_runner
4559
4660
- name: Check for any formatting and statically analyze the code.
4761
run: |
48-
make format
49-
make analyze
62+
melos run format
63+
melos run analyze

.github/workflows/release.yaml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,39 @@ jobs:
3030
with:
3131
sdk: '2.14.1'
3232

33+
- name: Set environment for macos and ubuntu
34+
if: startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')
35+
run: echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH
36+
37+
- name: Set environment for Windows
38+
if: startsWith(matrix.os, 'windows')
39+
run: echo "%LOCALAPPDATA%\Pub\Cache\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
40+
41+
- name: Get dependencies for macos and ubuntu
42+
if: startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')
43+
run: |
44+
dart pub global activate melos
45+
melos run pub:get
46+
47+
- name: Get dependencies for Windows
48+
if: startsWith(matrix.os, 'windows')
49+
run: |
50+
dart pub global activate melos 1.0.0-dev.3
51+
melos run pub:get
52+
3353
- name: Running build for macos
3454
if: matrix.os == 'macos-latest'
3555
run: |
3656
cd packages/command/
37-
dart pub get
3857
mkdir -p bin/${{ matrix.target }}
3958
dart2native bin/flutter_gen_command.dart -o bin/${{ matrix.target }}/fluttergen
4059
4160
- name: Running build for ubuntu
4261
if: matrix.os == 'ubuntu-latest'
4362
run: |
4463
cd packages/command/
45-
/usr/lib/dart/bin/pub get
4664
mkdir -p bin/${{ matrix.target }}
47-
/usr/lib/dart/bin/dart2native bin/flutter_gen_command.dart -o bin/${{ matrix.target }}/fluttergen
65+
dart2native bin/flutter_gen_command.dart -o bin/${{ matrix.target }}/fluttergen
4866
4967
- name: Packaging final binary
5068
shell: bash

.vscode/launch.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Run example on main.dart",
6+
"program": "${workspaceFolder}/example/lib/main.dart",
7+
"request": "launch",
8+
"type": "dart",
9+
"args": [
10+
"--debug"
11+
]
12+
},
13+
{
14+
"name": "Run on build_runner",
15+
"program": "${workspaceFolder}/example/.dart_tool/build/entrypoint/build.dart",
16+
"request": "launch",
17+
"type": "dart",
18+
"args": [
19+
"build"
20+
]
21+
},
22+
{
23+
"name": "Run on flutter_gen_command",
24+
"program": "${workspaceFolder}/packages/command/bin/flutter_gen_command.dart",
25+
"request": "launch",
26+
"type": "dart",
27+
"args": [
28+
"--config",
29+
"${workspaceFolder}/example/pubspec.yaml"
30+
]
31+
},
32+
]
33+
}

.vscode/settings.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"dart.flutterSdkPaths": [
3+
"~/.asdf/installs/flutter/2.5.0-stable"
4+
],
5+
"dart.sdkPaths": [
6+
"~/.asdf/installs/dart/2.14.1/dart-sdk"
7+
]
8+
}

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
## 4.0.0
2+
3+
Features
4+
- [BREAKING] Ended support for Non null safety codes.
5+
- Use for `line_length` instead of `lineLength`.
6+
7+
8+
Development
9+
- Replace to [Melos](https://pub.dev/packages/melos).
10+
- Add VSCode setting.
11+
112
## 3.1.2
213

314
- [#117](https://github.com/FlutterGen/flutter_gen/issues/117) Update to analyzer 2.0.0.

Makefile

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

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,6 @@ The options you set in `pubspec.yaml` will override the corresponding default op
673673
flutter_gen:
674674
output: lib/gen/
675675
line_length: 80
676-
null_safety: true
677676
678677
integrations:
679678
flutter_svg: false

example/.dart_tool/build/entrypoint/build.dart

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
// Ensure that the build script itself is not opted in to null safety,
2-
// instead of taking the language version from the current package.
3-
//
4-
// @dart=2.9
5-
//
61
// ignore_for_file: directives_ordering
7-
82
import 'package:build_runner_core/build_runner_core.dart' as _i1;
93
import 'package:flutter_gen_runner/flutter_gen_runner.dart' as _i2;
104
import 'dart:isolate' as _i3;
@@ -16,7 +10,7 @@ final _builders = <_i1.BuilderApplication>[
1610
_i1.toDependentsOf(r'flutter_gen_runner'),
1711
hideOutput: false)
1812
];
19-
void main(List<String> args, [_i3.SendPort sendPort]) async {
13+
void main(List<String> args, [_i3.SendPort? sendPort]) async {
2014
var result = await _i4.run(args, _builders);
2115
sendPort?.send(result);
2216
_i5.exitCode = result;

example/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ A sample project using FlutterGen.
77
```
88
cd ../flutter_gen
99
make setup
10-
make build-runner
10+
melos run pub:get
1111
```

example/analysis_options.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
include: package:effective_dart/analysis_options.yaml
2+
3+
linter:
4+
rules:
5+
public_member_api_docs: false

example/android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
buildscript {
2-
ext.kotlin_version = '1.4.0'
2+
ext.kotlin_version = '1.5.30'
33
repositories {
44
google()
55
jcenter()
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.6.4'
9+
classpath 'com.android.tools.build:gradle:7.0.2'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
5-
zipStorePath=wrapper/dists
5+
zipStorePath=wrapper/dists

example/lib/gen/assets.gen.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
/// FlutterGen
44
/// *****************************************************
55
6+
// ignore_for_file: directives_ordering
7+
68
import 'package:flutter/widgets.dart';
79
import 'package:flutter_svg/flutter_svg.dart';
810
import 'package:flutter/services.dart';

example/lib/gen/colors.gen.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
/// FlutterGen
44
/// *****************************************************
55
6+
// ignore_for_file: directives_ordering
7+
68
import 'package:flutter/painting.dart';
79
import 'package:flutter/material.dart';
810

example/lib/gen/fonts.gen.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
/// FlutterGen
44
/// *****************************************************
55
6+
// ignore_for_file: directives_ordering
7+
68
class FontFamily {
79
FontFamily._();
810

example/lib/main.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import 'package:example/gen/assets.gen.dart';
2-
import 'package:example/gen/colors.gen.dart';
3-
import 'package:example/gen/fonts.gen.dart';
41
import 'package:flutter/material.dart';
52
import 'package:flutter/widgets.dart';
63

4+
import 'gen/assets.gen.dart';
5+
import 'gen/colors.gen.dart';
6+
import 'gen/fonts.gen.dart';
7+
78
void main() {
89
runApp(MaterialApp(
910
title: 'Flutter Demo',

0 commit comments

Comments
 (0)