Skip to content

Commit

Permalink
Download resources from git which works in native executable as well …
Browse files Browse the repository at this point in the history
…(downloading from inside package does not work).
  • Loading branch information
buijs-dev committed May 10, 2024
1 parent 0b51666 commit 76492e7
Show file tree
Hide file tree
Showing 28 changed files with 146 additions and 527 deletions.
6 changes: 3 additions & 3 deletions bin/kradle.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ Future<void> interactiveMode() async {
final prompt = Select(prompt: "choose task", options: tasks).interact();
final selection = tasks[prompt];
if (selection == addLibrary) {
final name = interact.Input(prompt: "library name").interact();
await runTaskWithSpinner(TaskName.add, {TaskOption.name: name});
final lib = interact.Input(prompt: "library name").interact();
await runTaskWithSpinner(TaskName.add, {TaskOption.lib: lib});
} else if (selection == getFlutter) {
final version = askForFlutterVersion();
final overwrite = askConfirmation("overwrite existing distribution?");
Expand Down Expand Up @@ -106,7 +106,7 @@ Future<void> interactiveMode() async {
final flutterVersion = askForFlutterVersion();
await runTaskWithSpinner(TaskName.init, {
TaskOption.flutter: flutterVersion,
TaskOption.klutter: gradleVersion,
TaskOption.bom: gradleVersion,
});
} else if (selection == quit) {
return;
Expand Down
Binary file removed lib/res/gradle-wrapper.jar
Binary file not shown.
5 changes: 0 additions & 5 deletions lib/res/gradle-wrapper.properties

This file was deleted.

11 changes: 0 additions & 11 deletions lib/res/gradle.properties

This file was deleted.

185 changes: 0 additions & 185 deletions lib/res/gradlew

This file was deleted.

89 changes: 0 additions & 89 deletions lib/res/gradlew.bat

This file was deleted.

4 changes: 0 additions & 4 deletions lib/res/kradle.env

This file was deleted.

3 changes: 0 additions & 3 deletions lib/res/kradle.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion lib/src/cli/flutter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ Future<Directory> createFlutterProjectOrThrow({
]
..run();

return Directory(pathToRoot.normalize).resolveFolder(name)
return Directory(pathToRoot.normalize).resolveDirectory(name)
..verifyDirectoryExists;
}
2 changes: 1 addition & 1 deletion lib/src/cli/task_build.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class BuildProject extends Task {
Context context, Map<TaskOption, dynamic> options) async {
final workingDirectory = Directory(findPathToRoot(context, options));
// ignore: avoid_print
print("building platform module");
print("building platform module...");
_executor
..workingDirectory = workingDirectory
..arguments = ["clean", "build", "-p", "platform"]
Expand Down
2 changes: 1 addition & 1 deletion lib/src/cli/task_get_flutter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class GetFlutterSDK extends Task<Directory> {
final dist = toFlutterDistributionOrThrow(
version: flutterVersion, pathToRoot: pathToRoot);
final cache = Directory(pathToRoot.normalize).kradleCache..maybeCreate;
final target = cache.resolveFolder("${dist.folderNameString}");
final target = cache.resolveDirectory("${dist.folderNameString}");
if (requiresDownload(target, overwrite)) {
final endpoint = downloadEndpointOrThrow(dist);
if (!skipDownload(options[TaskOption.dryRun])) {
Expand Down
Loading

0 comments on commit 76492e7

Please sign in to comment.