Skip to content
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
24 changes: 24 additions & 0 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,27 @@ jobs:

- name: Run tests
run: dart test
test_catalyst_builder_container:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/catalyst_builder_container

steps:
- uses: actions/checkout@v2

- uses: dart-lang/setup-dart@v1
with:
sdk: 'stable'

- name: Install dependencies
run: dart pub get

- name: Verify formatting
run: dart format --output=none --set-exit-if-changed lib

- name: Analyze project source
run: dart analyze lib

- name: Run tests
run: dart test
24 changes: 9 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,17 @@ This is the workspace root, select a specific package for more details.

| Package | Description | Badges |
|-----------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`catalyst_builder`](./packages/catalyst_builder) | The builder package. Use this in your root package. | [![Pub](https://img.shields.io/pub/v/catalyst_builder.svg)](https://pub.dartlang.org/packages/catalyst_builder)<br> ![Pub Points](https://img.shields.io/pub/points/catalyst_builder)<br> ![Pub Likes](https://img.shields.io/pub/likes/catalyst_builder)<br> ![Pub Monthly Downloads](https://img.shields.io/pub/dm/catalyst_builder) |
| [`catalyst_builder`](./packages/catalyst_builder) | The builder package. Use this in your root package or plugin package to generate the ServiceContainerPlugin. | [![Pub](https://img.shields.io/pub/v/catalyst_builder.svg)](https://pub.dartlang.org/packages/catalyst_builder)<br> ![Pub Points](https://img.shields.io/pub/points/catalyst_builder)<br> ![Pub Likes](https://img.shields.io/pub/likes/catalyst_builder)<br> ![Pub Monthly Downloads](https://img.shields.io/pub/dm/catalyst_builder) |
| [`catalyst_builder_container`](./packages/catalyst_builder_container) | The container package. Use this package to resolve services from the container. | [![Pub](https://img.shields.io/pub/v/catalyst_builder_container.svg)](https://pub.dartlang.org/packages/catalyst_builder_container) <br> ![Pub Points](https://img.shields.io/pub/points/catalyst_builder_container) <br> ![Pub Likes](https://img.shields.io/pub/likes/catalyst_builder_container) <br> ![Pub Monthly Downloads](https://img.shields.io/pub/dm/catalyst_builder_container) |
| [`catalyst_builder_contracts`](./packages/catalyst_builder_contracts) | The contracts package. Use this in packages that don't need to generate a service provider but provide services that can be resolved. | [![Pub](https://img.shields.io/pub/v/catalyst_builder_contracts.svg)](https://pub.dartlang.org/packages/catalyst_builder_contracts) <br> ![Pub Points](https://img.shields.io/pub/points/catalyst_builder_contracts) <br> ![Pub Likes](https://img.shields.io/pub/likes/catalyst_builder_contracts) <br> ![Pub Monthly Downloads](https://img.shields.io/pub/dm/catalyst_builder_contracts) |

## Roadmap

# v4 (Current)
# v5 (Current)

| Description | Status |
|-----------------------------------------------------------------------|--------|
| Fix build problems with relative dependencies. | ☑️ |
| Extract the annotations and contracts in a separate package | ☑️ |
| Remove the service provider subclasses | 🔲 |
| Make changes to make the `catalyst_builder` package a dev dependency. | 🔲 |

# v5 (Next)

| Description | Status |
|------------------------------------------------------------|--------|
| Remove the annotations inside the catalyst_builder_package | ☑️ |
| Remove the service provider subclasses | 🔲 |
| Description | Status |
|---------------------------------------------------------------------------|--------|
| Remove the annotations inside the catalyst_builder_package | ☑️ |
| Remove the service provider subclasses | ☑️ |
| Stop generating the ServiceProvider and create a default ServiceContainer | ☑️ |
| Add scope support | 🔲 |
3 changes: 1 addition & 2 deletions packages/catalyst_builder/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[![GitHub license](https://img.shields.io/github/license/mintware-de/catalyst_builder.svg)](https://github.com/mintware-de/catalyst_builder/blob/main/packages/catalyst_builder/LICENSE)
[![GitHub license](https://img.shields.io/github/license/mintware-de/catalyst_builder)](https://github.com/mintware-de/catalyst_builder/blob/main/packages/catalyst_builder/LICENSE)
![GitHub issues](https://img.shields.io/github/issues/mintware-de/catalyst_builder)
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/mintware-de/catalyst_builder/dart.yml?branch=main)
[![Pub](https://img.shields.io/pub/v/catalyst_builder.svg)](https://pub.dartlang.org/packages/catalyst_builder)
![Pub Points](https://img.shields.io/pub/points/catalyst_builder)
![Pub Publisher](https://img.shields.io/pub/publisher/catalyst_builder)
![Pub Popularity](https://img.shields.io/pub/popularity/catalyst_builder)
![Pub Likes](https://img.shields.io/pub/likes/catalyst_builder)

# Catalyst Builder
Expand Down
9 changes: 0 additions & 9 deletions packages/catalyst_builder/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,6 @@ builders:
- 'catalyst_builder:buildServiceProvider'
- 'catalyst_builder:buildServiceProviderPlugin'

buildServiceProvider:
import: 'package:catalyst_builder/src/builder/builders.dart'
builder_factories:
- 'createServiceProviderBuilder'
build_extensions: { '.dart': [ '.catalyst_builder.g.dart' ] }
build_to: source
auto_apply: root_package
required_inputs:
- '.catalyst_builder.preflight.json'
buildServiceProviderPlugin:
import: 'package:catalyst_builder/src/builder/builders.dart'
builder_factories:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import 'package:catalyst_builder_container/catalyst_builder_container.dart';
import 'package:catalyst_builder_example/example.dart';

void main(List<String> arguments) {
var provider = ExampleProvider();
var provider = ServiceContainer();
provider.useExampleProviderPlugin();

provider.parameters['sender_username'] = 'Julian';

print('Post parameter set, pre boot');
Expand Down
6 changes: 3 additions & 3 deletions packages/catalyst_builder/example/lib/example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import './src/manually_wired_service.dart';

export './public_api.dart';
export './src/manually_wired_service.dart';
export 'example.catalyst_builder.g.dart';
export 'example.catalyst_builder.plugin.g.dart';

@Preload()
@GenerateServiceProvider(
providerClassName: 'ExampleProvider',
@GenerateServiceProviderPlugin(
pluginClassName: 'ExampleProviderPlugin',
)
@ServiceMap(services: {
ManuallyWiredServiceImplementation: Service(
Expand Down
6 changes: 5 additions & 1 deletion packages/catalyst_builder/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ dependencies:
path: ../../catalyst_builder_contracts
third_party_dependency:
path: ../test/third_party_dependency
catalyst_builder_container:
path: ../../catalyst_builder_container

dev_dependencies:
lints: ^5.1.1
Expand All @@ -23,4 +25,6 @@ dependency_overrides:
catalyst_builder:
path: ../
catalyst_builder_contracts:
path: ../../catalyst_builder_contracts
path: ../../catalyst_builder_contracts
catalyst_builder_container:
path: ../../catalyst_builder_container
5 changes: 0 additions & 5 deletions packages/catalyst_builder/lib/src/builder/builders.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,10 @@ import 'package:build/build.dart';

import 'preflight_builder.dart';
import 'service_provider_plugin_builder.dart';
import 'service_provider_builder.dart';

/// Creates the builder for the preflight step
Builder createPreflightBuilder(BuilderOptions options) => PreflightBuilder();

/// Creates the service provider builder
Builder createServiceProviderBuilder(BuilderOptions options) =>
ServiceProviderBuilder();

/// Creates the service provider plugin builder
Builder createServiceProviderPluginBuilder(BuilderOptions options) =>
ServiceProviderPluginBuilder();
1 change: 0 additions & 1 deletion packages/catalyst_builder/lib/src/builder/dto/dto.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ export 'extracted_service.dart';
export 'inject_annotation.dart';
export 'preflight_part.dart';
export 'symbol_reference.dart';
export 'entrypoint.dart';
36 changes: 0 additions & 36 deletions packages/catalyst_builder/lib/src/builder/dto/entrypoint.dart

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading