-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from osociety/pub_to_dev
Preparing release v1.0.0 for network_tools_flutter
- Loading branch information
Showing
6 changed files
with
107 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,28 +8,53 @@ jobs: | |
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
# Note: This workflow uses the latest stable version of the Dart SDK. | ||
# You can specify other versions if desired, see documentation here: | ||
# https://github.com/dart-lang/setup-dart/blob/main/README.md | ||
- uses: dart-lang/[email protected] | ||
# - uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603 | ||
|
||
- name: Analyze project source | ||
run: dart analyze --fatal-infos | ||
|
||
- name: Run tests | ||
run: dart test --coverage="coverage" | ||
|
||
- name: Install dependencies | ||
run: dart pub get | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Java JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: '17' | ||
- name: Flutter action | ||
uses: subosito/[email protected] | ||
with: | ||
channel: stable | ||
- name: Flutter version | ||
run: flutter --version | ||
- name: Cache pubspec dependencies | ||
uses: actions/[email protected] | ||
with: | ||
path: | | ||
${{ env.FLUTTER_HOME }}/.pub-cache | ||
**/.packages | ||
**/.flutter-plugins | ||
**/.flutter-plugin-dependencies | ||
**/.dart_tool/package_config.json | ||
key: build-pubspec-${{ hashFiles('**/pubspec.lock') }} | ||
restore-keys: | | ||
build-pubspec- | ||
- name: Cache build runner | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
**/.dart_tool | ||
**/*.g.dart | ||
**/*.mocks.dart | ||
**/*.config.dart | ||
key: build-runner-${{ hashFiles('**/asset_graph.json', '**/*.dart', '**/pubspec.lock', '**/outputs.json') }} | ||
restore-keys: | | ||
build-runner- | ||
- name: Download pub dependencies | ||
run: flutter pub get | ||
- name: Run analyzer | ||
run: flutter analyze --fatal-infos | ||
|
||
- name: Install coverage tools | ||
run: dart pub global activate coverage | ||
run: flutter pub global activate coverage | ||
|
||
- name: Run tests | ||
run: flutter test --coverage-path="coverage" | ||
|
||
- name: Format Coverage | ||
run: $HOME/.pub-cache/bin/format_coverage --lcov --in=coverage --out=coverage/coverage.lcov --report-on=lib | ||
|
||
|
@@ -44,14 +69,14 @@ jobs: | |
sh ./pub_login.sh | ||
- name: Check Publish Warnings | ||
run: dart pub publish --dry-run | ||
run: flutter pub publish --dry-run | ||
|
||
- name: Publish Package | ||
run: dart pub publish -f | ||
run: flutter pub publish -f | ||
|
||
- name: Upload Coverage to CodeCov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{secrets.CODECOV_TOKEN}} | ||
file: ./network_tools/coverage/coverage.lcov | ||
file: ./coverage/coverage.lcov | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Change Log | ||
|
||
## 0.0.1 | ||
## 1.0.0 | ||
|
||
* Initial support added for ping_ios_dart in network_tools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,19 @@ | ||
# Network Tools Flutter | ||
|
||
[![pub package](https://img.shields.io/pub/v/network_tools_flutter.svg)](https://pub.dev/packages/network_tools_flutter) [![Dart](https://github.com/osociety/network_tools_flutter/actions/workflows/flutter.yml/badge.svg)](https://github.com/osociety/network_tools_flutter/actions/workflows/flutter.yml) [![codecov](https://codecov.io/gh/git-elliot/network_tools_flutter/branch/main/graph/badge.svg?token=J9G2472GQZ)](https://codecov.io/gh/git-elliot/network_tools_flutter) | ||
|
||
## Features | ||
|
||
This package will add support for flutter only features in network_tools, network_tools will still be required to be added in pubspec.yaml. | ||
This package will add support for flutter features in network_tools and network_tools can be independently added whereas network_tools_flutter will internally use network_tools. | ||
|
||
## Getting started | ||
|
||
```dart | ||
import 'package:network_tools_flutter/network_tools.dart'; | ||
``` | ||
|
||
## Usage | ||
|
||
```dart | ||
main() { | ||
NetworkToolsFlutter.init(); | ||
} | ||
import 'package:network_tools_flutter/network_tools_flutter.dart'; | ||
``` | ||
|
||
## Additional information | ||
|
||
Currently getAllPingableDevicesAsync() is not working on ios because of plugin registration | ||
You can use same methods but need to import from network_tools_flutter. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# This script creates/updates credentials.json file which is used | ||
# to authorize publisher when publishing packages to pub.dev | ||
|
||
# Checking whether the secrets are available as environment | ||
# variables or not. | ||
if [ -z "${PUB_DEV_PUBLISH_ACCESS_TOKEN}" ]; then | ||
echo "Missing PUB_DEV_PUBLISH_ACCESS_TOKEN environment variable" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "${PUB_DEV_PUBLISH_REFRESH_TOKEN}" ]; then | ||
echo "Missing PUB_DEV_PUBLISH_REFRESH_TOKEN environment variable" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "${PUB_DEV_PUBLISH_TOKEN_ENDPOINT}" ]; then | ||
echo "Missing PUB_DEV_PUBLISH_TOKEN_ENDPOINT environment variable" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "${PUB_DEV_PUBLISH_EXPIRATION}" ]; then | ||
echo "Missing PUB_DEV_PUBLISH_EXPIRATION environment variable" | ||
exit 1 | ||
fi | ||
mkdir -p $HOME/.config/dart | ||
# Create credentials.json file. | ||
cat <<EOF > $HOME/.config/dart/pub-credentials.json | ||
{ | ||
"accessToken":"${PUB_DEV_PUBLISH_ACCESS_TOKEN}", | ||
"refreshToken":"${PUB_DEV_PUBLISH_REFRESH_TOKEN}", | ||
"tokenEndpoint":"${PUB_DEV_PUBLISH_TOKEN_ENDPOINT}", | ||
"idToken": "${PUB_DEV_PUBLISH_ID_TOKEN}", | ||
"scopes":["openid","https://www.googleapis.com/auth/userinfo.email"], | ||
"expiration":${PUB_DEV_PUBLISH_EXPIRATION} | ||
} | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters