-
-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip: Add any_app_packager & any_app_publisher
- Loading branch information
Showing
18 changed files
with
186 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.dart_tool/ | ||
.packages | ||
build/ | ||
pubspec.lock # Except for application packages | ||
.flutter-plugins | ||
.flutter-plugins-dependencies |
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,3 @@ | ||
## 0.1.0 | ||
|
||
* Initial release. |
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,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. |
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,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 |
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,5 @@ | ||
include: package:mostly_reasonable_lints/analysis_options.yaml | ||
|
||
linter: | ||
rules: | ||
avoid_print: false |
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,3 @@ | ||
void main() { | ||
print('any_app_packager is still under development'); | ||
} |
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,3 @@ | ||
library any_app_packager; | ||
|
||
export 'src/any_app_packager.dart'; |
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,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, | ||
); | ||
} | ||
} |
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,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 |
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,4 @@ | ||
.dart_tool/ | ||
.packages | ||
build/ | ||
pubspec.lock # Except for application packages |
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,3 @@ | ||
## 0.1.0 | ||
|
||
* Initial release. |
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,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. |
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,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 |
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,5 @@ | ||
include: package:mostly_reasonable_lints/analysis_options.yaml | ||
|
||
linter: | ||
rules: | ||
avoid_print: false |
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,3 @@ | ||
void main() { | ||
print('any_app_publisher is still under development'); | ||
} |
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,3 @@ | ||
library any_app_publisher; | ||
|
||
export 'src/any_app_publisher.dart'; |
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,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, | ||
); | ||
} | ||
} |
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,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 |