Skip to content
This repository was archived by the owner on Jun 9, 2022. It is now read-only.

Commit 1d50c19

Browse files
authored
chore: update codes (#88)
* chore: replace fvm to asdf * chore: replace dependabot to renoavte * doc: remove unused question * chore: update dependencies * style: replace Effective Dart to flutter_lints * ci: set java version for android * ci: add java install step
1 parent 4126aa5 commit 1d50c19

Some content is hidden

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

42 files changed

+482
-368
lines changed

.fvm/fvm_config.json

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

.github/PULL_REQUEST_TEMPLATE.md

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

3-
### What is the value of this and can you measure success?
4-
53
### Screenshots (Optional)
64

75

.github/dependabot.yml

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

.github/workflows/flutter-ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,16 @@ jobs:
1111
runs-on: macos-latest
1212
steps:
1313
- uses: actions/checkout@v2
14+
- uses: actions/setup-java@v2
15+
with:
16+
distribution: 'zulu'
17+
java-version: '11'
18+
- uses: subosito/flutter-action@v1
19+
with:
20+
flutter-version: '2.5.3'
1421
- uses: dart-lang/setup-dart@v1
1522
with:
16-
sdk: stable
23+
sdk: '2.14.4'
1724

1825
- name: Cache Gradle modules
1926
uses: actions/[email protected]
@@ -49,7 +56,6 @@ jobs:
4956
cache-number: ${{ secrets.CACHE_NUMBER }}
5057
with:
5158
path: |
52-
.fvm/versions
5359
~/.pub-cache/bin
5460
key: ${{ runner.os }}-pub-${{ env.cache-number }}-${{ env.flutter_version }}-${{ hashFiles('pubspec.lock') }}
5561
restore-keys: |

.tool-versions

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dart 2.14.4
2+
flutter 2.5.3-stable
3+
nodejs 17.0.1

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"dart.flutterSdkPath": "~/.asdf/installs/flutter/2.5.3-stable",
3+
"dart.sdkPath": "~/.asdf/installs/dart/2.14.4/dart-sdk"
4+
}

Makefile

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,55 @@
11
.PHONY: setup
22
setup:
3-
dart pub global activate fvm
43
npm install
54

65
.PHONY: dependencies
76
dependencies:
8-
fvm install
9-
fvm flutter pub get
7+
flutter pub get
108

119
.PHONY: analyze
1210
analyze:
13-
fvm flutter analyze
11+
flutter analyze
1412

1513
.PHONY: format
1614
format:
17-
fvm flutter format lib/
15+
flutter format lib/
1816

1917
.PHONY: format-analyze
2018
format-analyze:
21-
fvm flutter format --dry-run lib/
22-
fvm flutter analyze
19+
flutter format --dry-run lib/
20+
flutter analyze
2321

2422
.PHONY: build-runner
2523
build-runner:
26-
fvm flutter packages pub run build_runner build --delete-conflicting-outputs
24+
flutter packages pub run build_runner build --delete-conflicting-outputs
2725

2826
.PHONY: run-dev
2927
run-dev:
30-
fvm flutter run --flavor development --dart-define=FLAVOR=development --target lib/main.dart
28+
flutter run --flavor development --dart-define=FLAVOR=development --target lib/main.dart
3129

3230
.PHONY: run-prd
3331
run-prd:
34-
fvm flutter run --release --flavor production --dart-define=FLAVOR=production --target lib/main.dart
32+
flutter run --release --flavor production --dart-define=FLAVOR=production --target lib/main.dart
3533

3634
.PHONY: build-android-dev
3735
build-android-dev:
38-
fvm flutter build apk --flavor development --dart-define=FLAVOR=development --target lib/main.dart
36+
flutter build apk --flavor development --dart-define=FLAVOR=development --target lib/main.dart
3937

4038
.PHONY: build-android-prd
4139
build-android-prd:
42-
fvm flutter build apk --release --flavor production --dart-define=FLAVOR=production --target lib/main.dart
40+
flutter build apk --release --flavor production --dart-define=FLAVOR=production --target lib/main.dart
4341

4442
.PHONY: build-ios-dev
4543
build-ios-dev:
46-
fvm flutter build ios --no-codesign --flavor development --dart-define=FLAVOR=development --target lib/main.dart
44+
flutter build ios --no-codesign --flavor development --dart-define=FLAVOR=development --target lib/main.dart
4745

4846
.PHONY: build-ios-prd
4947
build-ios-prd:
50-
fvm flutter build ios --release --no-codesign --flavor production --dart-define=FLAVOR=production --target lib/main.dart
48+
flutter build ios --release --no-codesign --flavor production --dart-define=FLAVOR=production --target lib/main.dart
5149

5250
.PHONY: unit-test
5351
unit-test:
54-
fvm flutter test --coverage --coverage-path=./coverage/lcov.info
52+
flutter test --coverage --coverage-path=./coverage/lcov.info
5553

5654
.PHONY: codecov
5755
codecov:

README.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ Flutter Architecture Blueprints is a project that introduces MVVM architecture a
3333
- [Flutter documentation](https://flutter.dev/docs)
3434
- [Contributing to Flutter](https://github.com/wasabeef/flutter-architecture-blueprints/blob/main/CONTRIBUTING.md)
3535

36-
## Requirements
36+
## Installation
3737

38-
- [Dart 2.13.0+ (stable channel)](https://github.com/dart-lang/sdk/wiki/Installing-beta-and-dev-releases-with-brew,-choco,-and-apt-get#installing)
39-
- [FVM](https://github.com/leoafarias/fvm)
40-
- [Flutter 2.2.+ via FVM](https://github.com/wasabeef/flutter-architecture-blueprints/blob/main/.fvm/fvm_config.json)
38+
- [asdf](https://github.com/asdf-vm/asdf)
39+
- Dart 2.14.4
40+
- Flutter 2.5.3
4141
- [npm (for git hooks)](https://treehouse.github.io/installation-guides/mac/node-mac.html)
4242

4343
## Environment
@@ -56,7 +56,7 @@ Flutter Architecture Blueprints is a project that introduces MVVM architecture a
5656
- Base on [MVVM](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel) + [Repository](https://docs.microsoft.com/ja-jp/dotnet/architecture/microservices/microservice-ddd-cqrs-patterns/infrastructure-persistence-layer-design)
5757

5858
## Code Style
59-
- [Effective Dart](https://dart.dev/guides/language/effective-dart)
59+
- [flutter_lints](https://pub.dev/packages/flutter_lints)
6060

6161
## Assets, Fonts
6262

@@ -86,7 +86,7 @@ Flutter Architecture Blueprints is a project that introduces MVVM architecture a
8686
|Working status|Category|Description|Codes|
8787
|:---:|---|---|---|
8888
|| Dart | Dart version | [pubspec.yaml](https://github.com/wasabeef/flutter-architecture-blueprints/blob/main/pubspec.yaml#L7-L9) |
89-
|| [FVM](https://github.com/leoafarias/fvm) | Flutter Version Management | [.fvm/fvm_config.json](https://github.com/wasabeef/flutter-architecture-blueprints/blob/main/.fvm/fvm_config.json) |
89+
|| [asdf](https://github.com/asdf-vm/asdf) | asdf | [.tool-versions](https://github.com/wasabeef/flutter-architecture-blueprints/blob/main/.tool-versions) |
9090
|| Dart | Switching between Development and Production environment | [constants.dart](https://github.com/wasabeef/flutter-architecture-blueprints/blob/main/lib/foundation/constants.dart), [runConfigurations](https://github.com/wasabeef/flutter-architecture-blueprints/tree/main/.idea/runConfigurations), [Makefile](https://github.com/wasabeef/flutter-architecture-blueprints/blob/be26dc3f7ff27ee2710326abe8ed09893a35386c/Makefile#L25-L41) |
9191
|| Dart | Lint / Analyze | [analysis_options.yaml](https://github.com/wasabeef/flutter-architecture-blueprints/blob/main/analysis_options.yaml) |
9292
|| Android | Kotlin version | [build.gradle](https://github.com/wasabeef/flutter-architecture-blueprints/blob/main/android/build.gradle#L2) |
@@ -147,11 +147,6 @@ $ make dependencies
147147
$ make build-runner
148148
```
149149

150-
**And set your IDE for FVM path.**
151-
<img height="180px" src="https://github.com/wasabeef/art/raw/master/flutter-architecture-blueprints/fvm-intellij-env.png"/>
152-
153-
<br/>
154-
155150
### How to add assets(images..)
156151
1. Add assets
157152
2. Run [FlutterGen](https://github.com/fluttergen)

analysis_options.yaml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include: package:effective_dart/analysis_options.yaml
1+
include: package:flutter_lints/flutter.yaml
22
analyzer:
33
exclude:
44
- "**/generated_plugin_registrant.dart"
@@ -8,14 +8,4 @@ analyzer:
88
- "**/*.freezed.dart"
99
- "**/*.gr.dart"
1010
- "**/l10n*.dart"
11-
- "**/*.gen.dart"
12-
13-
linter:
14-
rules:
15-
public_member_api_docs: false
16-
one_member_abstracts: false
17-
prefer_const_constructors: true
18-
# IDE works bad with relative import
19-
# See: https://github.com/dart-lang/sdk/issues/32916
20-
prefer_relative_imports: false
21-
always_use_package_imports: true
11+
- "**/*.gen.dart"

android/app/build.gradle

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ android {
3030
// Workaround for support to multiple CIs (Bitrise and Codemagic).
3131
compileSdkVersion System.getenv('ANDROID_SDK_VERSION') ? System.getenv('ANDROID_SDK_VERSION').toInteger() : 30
3232

33+
compileOptions {
34+
sourceCompatibility JavaVersion.VERSION_1_8
35+
targetCompatibility JavaVersion.VERSION_1_8
36+
}
37+
38+
kotlinOptions {
39+
jvmTarget = '1.8'
40+
}
41+
3342
sourceSets {
3443
main.java.srcDirs += 'src/main/kotlin'
3544
}
@@ -80,4 +89,8 @@ flutter {
8089
source '../..'
8190
}
8291

92+
dependencies {
93+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
94+
}
95+
8396
apply plugin: 'com.google.gms.google-services'

0 commit comments

Comments
 (0)