Skip to content

Empty packages for native_assets_cli and c_compiler #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/c_compiler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
name: "package:c_compiler"
about: "Create a bug or file a feature request against package:c_compiler."
labels: "package:c_compiler"
---
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/native_assets_cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
name: "package:native_assets_cli"
about: "Create a bug or file a feature request against package:native_assets_cli."
labels: "package:native_assets_cli"
---
58 changes: 58 additions & 0 deletions .github/workflows/c_compiler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: package:c_compiler
permissions: read-all

on:
pull_request:
branches: [main]
paths:
- ".github/workflows/c_compiler.yml"
- "pkgs/c_compiler/**"
push:
branches: [main]
paths:
- ".github/workflows/c_compiler.yml"
- "pkgs/c_compiler/**"
schedule:
- cron: "0 0 * * 0" # weekly

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: pkgs/c_compiler
strategy:
matrix:
sdk: [stable, dev] # {pkgs.versions}
include:
- sdk: stable
run-tests: true
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
with:
sdk: ${{matrix.sdk}}

- run: dart pub get

- run: dart analyze --fatal-infos

- run: dart format --output=none --set-exit-if-changed .
if: ${{matrix.run-tests}}

- run: dart test
if: ${{matrix.run-tests}}

- name: Install coverage
run: dart pub global activate coverage
if: ${{ matrix.sdk == 'stable' }}
- name: Collect coverage
run: dart pub global run coverage:test_with_coverage
if: ${{ matrix.sdk == 'stable' }}
- name: Upload coverage
uses: coverallsapp/github-action@50c33ad324a9902697adbf2f92c22cf5023eacf1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: c_compiler
path-to-lcov: ./pkgs/c_compiler/coverage/lcov.info
if: ${{ matrix.sdk == 'stable' }}
58 changes: 58 additions & 0 deletions .github/workflows/native_assets_cli.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: package:native_assets_cli
permissions: read-all

on:
pull_request:
branches: [main]
paths:
- ".github/workflows/native_assets_cli.yml"
- "pkgs/native_assets_cli/**"
push:
branches: [main]
paths:
- ".github/workflows/native_assets_cli.yml"
- "pkgs/native_assets_cli/**"
schedule:
- cron: "0 0 * * 0" # weekly

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: pkgs/native_assets_cli
strategy:
matrix:
sdk: [stable, dev] # {pkgs.versions}
include:
- sdk: stable
run-tests: true
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
with:
sdk: ${{matrix.sdk}}

- run: dart pub get

- run: dart analyze --fatal-infos

- run: dart format --output=none --set-exit-if-changed .
if: ${{matrix.run-tests}}

- run: dart test
if: ${{matrix.run-tests}}

- name: Install coverage
run: dart pub global activate coverage
if: ${{ matrix.sdk == 'stable' }}
- name: Collect coverage
run: dart pub global run coverage:test_with_coverage
if: ${{ matrix.sdk == 'stable' }}
- name: Upload coverage
uses: coverallsapp/github-action@50c33ad324a9902697adbf2f92c22cf5023eacf1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: native_assets_cli
path-to-lcov: ./pkgs/native_assets_cli/coverage/lcov.info
if: ${{ matrix.sdk == 'stable' }}
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ bundling.

## Packages

| Package | Description | Version |
| --- | --- | --- |
| Package | Description | Version |
| -------------------------------------------- | ------------------------------------------------------------------------------------------- | ------- |
| [c_compiler](pkgs/c_compiler/) | A library to invoke the native C compiler installed on the host machine. | |
| [native_assets_cli](pkgs/native_assets_cli/) | A library that contains the argument and file formats for implementing a native assets CLI. | |

<!-- ## Publishing automation

Expand Down
9 changes: 9 additions & 0 deletions pkgs/c_compiler/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# https://dart.dev/guides/libraries/private-files
# Created by `dart pub`
.dart_tool/

# Avoid committing pubspec.lock for library packages; see
# https://dart.dev/guides/libraries/private-files#pubspeclock.
pubspec.lock

coverage/
3 changes: 3 additions & 0 deletions pkgs/c_compiler/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 0.1.0-dev

- Initial version.
6 changes: 6 additions & 0 deletions pkgs/c_compiler/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[![package:c_compiler](https://github.com/dart-lang/native/actions/workflows/c_compiler.yml/badge.svg)](https://github.com/dart-lang/native/actions/workflows/c_compiler.yml)
[![pub package](https://img.shields.io/pub/v/c_compiler.svg)](https://pub.dev/packages/c_compiler)
[![Coverage Status](https://coveralls.io/repos/github/dart-lang/native/badge.svg?branch=main)](https://coveralls.io/github/dart-lang/tools?branch=main)
<!-- [![package publisher](https://img.shields.io/pub/publisher/c_compiler.svg)](https://pub.dev/packages/c_compiler/publisher) -->

A library to invoke the native C compiler installed on the host machine.
22 changes: 22 additions & 0 deletions pkgs/c_compiler/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
include: package:dart_flutter_team_lints/analysis_options.yaml

analyzer:
language:
strict-raw-types: true
strict-inference: true

linter:
rules:
- always_declare_return_types
- avoid_dynamic_calls
- camel_case_types
- depend_on_referenced_packages
- directives_ordering
- prefer_const_declarations
- prefer_expression_function_bodies
- prefer_final_in_for_each
- prefer_final_locals
- prefer_relative_imports
- prefer_single_quotes
- sort_pub_dependencies
- unawaited_futures
8 changes: 8 additions & 0 deletions pkgs/c_compiler/lib/c_compiler.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// A library to invoke the native C compiler installed on the host machine.
library;

export 'src/c_compiler_base.dart';
8 changes: 8 additions & 0 deletions pkgs/c_compiler/lib/src/c_compiler_base.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// Checks if you are awesome. Spoiler: you are.
class Awesome {
bool get isAwesome => true;
}
11 changes: 11 additions & 0 deletions pkgs/c_compiler/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: c_compiler
description: A library to invoke the native C compiler installed on the host machine.
version: 0.1.0-dev
repository: https://github.com/dart-lang/native/c_compiler

environment:
sdk: ">=2.19.3 <4.0.0"

dev_dependencies:
dart_flutter_team_lints: ^1.0.0
test: ^1.21.0
20 changes: 20 additions & 0 deletions pkgs/c_compiler/test/c_compiler_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:c_compiler/c_compiler.dart';
import 'package:test/test.dart';

void main() {
group('A group of tests', () {
final awesome = Awesome();

setUp(() {
// Additional setup goes here.
});

test('First Test', () {
expect(awesome.isAwesome, isTrue);
});
});
}
9 changes: 9 additions & 0 deletions pkgs/native_assets_cli/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# https://dart.dev/guides/libraries/private-files
# Created by `dart pub`
.dart_tool/

# Avoid committing pubspec.lock for library packages; see
# https://dart.dev/guides/libraries/private-files#pubspeclock.
pubspec.lock

coverage/
3 changes: 3 additions & 0 deletions pkgs/native_assets_cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 0.1.0-dev

- Initial version.
6 changes: 6 additions & 0 deletions pkgs/native_assets_cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[![package:native_assets_cli](https://github.com/dart-lang/native/actions/workflows/native_assets_cli.yml/badge.svg)](https://github.com/dart-lang/native/actions/workflows/native_assets_cli.yml)
[![pub package](https://img.shields.io/pub/v/native_assets_cli.svg)](https://pub.dev/packages/native_assets_cli)
[![Coverage Status](https://coveralls.io/repos/github/dart-lang/native/badge.svg?branch=main)](https://coveralls.io/github/dart-lang/tools?branch=main)
<!-- [![package publisher](https://img.shields.io/pub/publisher/native_assets_cli.svg)](https://pub.dev/packages/native_assets_cli/publisher) -->

A library that contains the argument and file formats for implementing a native assets CLI.
22 changes: 22 additions & 0 deletions pkgs/native_assets_cli/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
include: package:dart_flutter_team_lints/analysis_options.yaml

analyzer:
language:
strict-raw-types: true
strict-inference: true

linter:
rules:
- always_declare_return_types
- avoid_dynamic_calls
- camel_case_types
- depend_on_referenced_packages
- directives_ordering
- prefer_const_declarations
- prefer_expression_function_bodies
- prefer_final_in_for_each
- prefer_final_locals
- prefer_relative_imports
- prefer_single_quotes
- sort_pub_dependencies
- unawaited_futures
9 changes: 9 additions & 0 deletions pkgs/native_assets_cli/lib/native_assets_cli.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// A library that contains the argument and file formats for implementing a
/// native assets CLI.
library;

export 'src/native_assets_cli_base.dart';
8 changes: 8 additions & 0 deletions pkgs/native_assets_cli/lib/src/native_assets_cli_base.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// Checks if you are awesome. Spoiler: you are.
class Awesome {
bool get isAwesome => true;
}
11 changes: 11 additions & 0 deletions pkgs/native_assets_cli/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: native_assets_cli
description: A library that contains the argument and file formats for implementing a native assets CLI.
version: 0.1.0-dev
repository: https://github.com/dart-lang/native/native_assets_cli

environment:
sdk: ">=2.19.3 <4.0.0"

dev_dependencies:
dart_flutter_team_lints: ^1.0.0
test: ^1.21.0
20 changes: 20 additions & 0 deletions pkgs/native_assets_cli/test/native_assets_cli_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:test/test.dart';

void main() {
group('A group of tests', () {
final awesome = Awesome();

setUp(() {
// Additional setup goes here.
});

test('First Test', () {
expect(awesome.isAwesome, isTrue);
});
});
}
1 change: 0 additions & 1 deletion pkgs/placeholder.txt

This file was deleted.