Skip to content

Commit

Permalink
wip: Add any_app_packager & any_app_publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
lijy91 committed Sep 1, 2024
1 parent 075c82d commit 04f2a1d
Show file tree
Hide file tree
Showing 18 changed files with 186 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/any_app_packager/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.dart_tool/
.packages
build/
pubspec.lock # Except for application packages
.flutter-plugins
.flutter-plugins-dependencies
3 changes: 3 additions & 0 deletions packages/any_app_packager/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 0.1.0

* Initial release.
21 changes: 21 additions & 0 deletions packages/any_app_packager/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024-present LiJianying <lijy91@foxmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
10 changes: 10 additions & 0 deletions packages/any_app_packager/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# any_app_packager

[![pub version][pub-image]][pub-url]

[pub-image]: https://img.shields.io/pub/v/any_app_packager.svg
[pub-url]: https://pub.dev/packages/any_app_packager

---

Part of [fastforge](https://github.com/fastforgedev), See also https://fastforge.dev
5 changes: 5 additions & 0 deletions packages/any_app_packager/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include: package:mostly_reasonable_lints/analysis_options.yaml

linter:
rules:
avoid_print: false
3 changes: 3 additions & 0 deletions packages/any_app_packager/bin/main.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
void main() {
print('any_app_packager is still under development');
}
3 changes: 3 additions & 0 deletions packages/any_app_packager/lib/any_app_packager.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
library any_app_packager;

export 'src/any_app_packager.dart';
26 changes: 26 additions & 0 deletions packages/any_app_packager/lib/src/any_app_packager.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import 'dart:io';

import 'package:flutter_app_packager/flutter_app_packager.dart';

class AnyAppPackager {
final FlutterAppPackager _flutterAppPackager = FlutterAppPackager();

/// Packages the app for the given platform and target.
Future<MakeResult> package(
String platform,
String target,
Map<String, dynamic>? arguments,
Directory outputDirectory, {
required Directory buildOutputDirectory,
required List<File> buildOutputFiles,
}) {
return _flutterAppPackager.package(
platform,
target,
arguments,
outputDirectory,
buildOutputDirectory: buildOutputDirectory,
buildOutputFiles: buildOutputFiles,
);
}
}
18 changes: 18 additions & 0 deletions packages/any_app_packager/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: any_app_packager
description: Package your any app into OS-specific bundles (.dmg, .exe, etc.) via Dart or the command line.
version: 0.1.0
homepage: https://fastforge.dev/any_app_packager
repository: https://github.com/leanflutter/flutter_distributor/tree/main/packages/any_app_packager

environment:
sdk: ">=2.16.0 <4.0.0"

dependencies:
flutter_app_packager: ^0.4.5

dev_dependencies:
dependency_validator: ^3.0.0
mostly_reasonable_lints: ^0.1.2

executables:
packageanyapp: main
4 changes: 4 additions & 0 deletions packages/any_app_publisher/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.dart_tool/
.packages
build/
pubspec.lock # Except for application packages
3 changes: 3 additions & 0 deletions packages/any_app_publisher/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 0.1.0

* Initial release.
21 changes: 21 additions & 0 deletions packages/any_app_publisher/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024-present LiJianying <lijy91@foxmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
10 changes: 10 additions & 0 deletions packages/any_app_publisher/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# any_app_publisher

[![pub version][pub-image]][pub-url]

[pub-image]: https://img.shields.io/pub/v/any_app_publisher.svg
[pub-url]: https://pub.dev/packages/any_app_publisher

---

Part of [fastforge](https://github.com/fastforgedev), See also https://fastforge.dev
5 changes: 5 additions & 0 deletions packages/any_app_publisher/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include: package:mostly_reasonable_lints/analysis_options.yaml

linter:
rules:
avoid_print: false
3 changes: 3 additions & 0 deletions packages/any_app_publisher/bin/main.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
void main() {
print('any_app_publisher is still under development');
}
3 changes: 3 additions & 0 deletions packages/any_app_publisher/lib/any_app_publisher.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
library any_app_publisher;

export 'src/any_app_publisher.dart';
24 changes: 24 additions & 0 deletions packages/any_app_publisher/lib/src/any_app_publisher.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import 'dart:io';

import 'package:flutter_app_publisher/flutter_app_publisher.dart';

class AnyAppPublisher {
final FlutterAppPublisher _flutterAppPublisher = FlutterAppPublisher();

/// Publishes the app for the given target.
Future<PublishResult> publish(
FileSystemEntity fileSystemEntity, {
required String target,
Map<String, String>? environment,
Map<String, dynamic>? publishArguments,
PublishProgressCallback? onPublishProgress,
}) async {
return _flutterAppPublisher.publish(
fileSystemEntity,
target: target,
environment: environment,
publishArguments: publishArguments,
onPublishProgress: onPublishProgress,
);
}
}
18 changes: 18 additions & 0 deletions packages/any_app_publisher/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: any_app_publisher
description: Publish your any app into popular testing or distribution platforms via Dart or the command line.
version: 0.1.0
homepage: https://fastforge.dev/any_app_publisher
repository: https://github.com/leanflutter/flutter_distributor/tree/main/packages/any_app_publisher

environment:
sdk: ">=2.16.0 <4.0.0"

dependencies:
flutter_app_publisher: ^0.4.5

dev_dependencies:
dependency_validator: ^3.0.0
mostly_reasonable_lints: ^0.1.2

executables:
publishanyapp: main

0 comments on commit 04f2a1d

Please sign in to comment.