Skip to content

Commit d366305

Browse files
authored
Release 0.9.0 (#23)
1 parent c146822 commit d366305

File tree

65 files changed

+549
-428
lines changed

Some content is hidden

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

65 files changed

+549
-428
lines changed

.github/workflows/publish.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types: [published]
7+
8+
jobs:
9+
test:
10+
name: Test and Analyze
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
16+
- name: Setup Flutter
17+
uses: subosito/flutter-action@v1
18+
with:
19+
channel: 'stable'
20+
21+
- name: Download pub dependencies
22+
run: flutter pub get
23+
24+
- name: Check formatting
25+
run: flutter format --set-exit-if-changed --dry-run .
26+
27+
- name: Run analyzer
28+
run: flutter analyze
29+
30+
- name: Run tests
31+
run: flutter test
32+
publish:
33+
name: Publish to pub.dev
34+
if: success()
35+
needs: test
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Checkout
39+
uses: actions/checkout@v2
40+
41+
- name: flutter_bloc_patterns
42+
uses: k-paxian/dart-package-publisher@master
43+
with:
44+
accessToken: ${{ secrets.OAUTH_ACCESS_TOKEN }}
45+
refreshToken: ${{ secrets.OAUTH_REFRESH_TOKEN }}
46+
format: true
47+
skipTests: true

.github/workflows/test.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Flutter analyze and tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- 'master'
7+
tags-ignore:
8+
- 'v*'
9+
10+
jobs:
11+
on-pull-request:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: subosito/flutter-action@v1
16+
with:
17+
channel: 'stable'
18+
19+
- name: Download pub dependencies
20+
run: flutter pub get
21+
22+
- name: Check formatting
23+
run: flutter format --set-exit-if-changed --dry-run .
24+
25+
- name: Run analyzer
26+
run: flutter analyze
27+
28+
- name: Run tests
29+
run: flutter test

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# Changelog
2+
3+
## [0.9.0] * Breaking Changes *
4+
5+
* Migrating to `bloc` 7.0.0 and `flutter_bloc` 7.0.1,
6+
* Migrating to `null-safety`.
7+
18
## [0.8.0] * Breaking Changes *
29

310
* Migrating to `bloc` 6.1.1 and `flutter_bloc` 6.1.1.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Where:
134134

135135
## Dart version
136136

137-
- Dart 2: >= 2.6.0
137+
- Dart 2: >= 2.12.0
138138

139139
## Author
140140
- [Karol Lisiewicz](https://github.com/klisiewicz)

example/android/app/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ android {
3232
main.java.srcDirs += 'src/main/kotlin'
3333
}
3434

35-
lintOptions {
36-
disable 'InvalidPackage'
37-
}
3835

3936
defaultConfig {
4037
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
@@ -43,7 +40,7 @@ android {
4340
targetSdkVersion 28
4441
versionCode flutterVersionCode.toInteger()
4542
versionName flutterVersionName
46-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
43+
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
4744
}
4845

4946
buildTypes {
@@ -53,6 +50,9 @@ android {
5350
signingConfig signingConfigs.debug
5451
}
5552
}
53+
lint {
54+
disable 'InvalidPackage'
55+
}
5656
}
5757

5858
flutter {
@@ -62,6 +62,6 @@ flutter {
6262
dependencies {
6363
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
6464
testImplementation 'junit:junit:4.12'
65-
androidTestImplementation 'com.android.support.test:runner:1.0.2'
66-
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
65+
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
66+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
6767
}

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.2.71'
2+
ext.kotlin_version = '1.3.40'
33
repositories {
44
google()
55
jcenter()
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.2.1'
9+
classpath 'com.android.tools.build:gradle:7.1.1'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}

example/android/gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
org.gradle.jvmargs=-Xmx1536M
22

33
android.enableR8=true
4+
android.useAndroidX=true
5+
android.enableJetifier=true

example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip

example/lib/src/album/model/album.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ import 'package:flutter/foundation.dart';
33
@immutable
44
class Album {
55
final int id;
6-
final String title;
6+
final String? title;
77

88
const Album({
9-
@required this.id,
9+
required this.id,
1010
this.title,
11-
}) : assert(id != null);
11+
});
1212

1313
factory Album.fromJson(Map<String, dynamic> json) {
1414
return Album(
1515
id: json['id'] as int,
16-
title: json['title'] as String,
16+
title: json['title'] as String?,
1717
);
1818
}
1919
}

example/lib/src/album/model/photo.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ class Photo {
55
final String thumbnailUrl;
66

77
Photo({
8-
this.id,
9-
this.title,
10-
this.url,
11-
this.thumbnailUrl,
8+
required this.id,
9+
required this.title,
10+
required this.url,
11+
required this.thumbnailUrl,
1212
});
1313

14-
factory Photo.fromJson(dynamic json) {
14+
factory Photo.fromJson(Map json) {
1515
return Photo(
1616
id: json['id'] as int,
1717
title: json['title'] as String,

0 commit comments

Comments
 (0)