Skip to content

buijs-dev/kradle

Repository files navigation

GitHub license pub codecov


buijs software logo

Kradle

Commandline tool for Klutter. Create a new project with the click of a button without having any frameworks installed (including Flutter).

Running your Gradle and/or Flutter commands through the kradle-wrapper ensures you use the correct versions for these libraries. You can send commands through the kradle-wrapper directly or use the interactive wizard to configure.

Commands

Kradle

Kradle commands:

Build

Build the iOS and Android artifacts and generate all boilerplate code.

Build is always required to run the app on a device when changes are done in the platform module.

Example:

./kradlew build

Clean

Options:

Cache

Remove all files and/or folders from the kradle cache folder. The cache folder is by default set to user.home/.kradle/cache. It can be overwritten by setting the cache property in kradle.env. The kradle.env is stored next to the kradlew scripts.

Default kradle.env cache setting:

cache={{system.user.home}}/.kradle/cache/

Example command:

./kradlew clean cache

Create

Create a new Klutter project.

Required arguments:

  • root: The root folder of the project.
  • name: The name of the project (and subsequently the Flutter plugin).
  • group: The group/organisation name of the project.
  • flutter: The Flutter distribution to use.

Example:

./kradlew create --root "./" --name "my_plugin" --group "com.example" --flutter "3.10.6.macos.arm64"
Config (Optional)

Path to config yaml. This yaml can be used to configure project versions and dependencies.

Example yaml:

bom-version: "2023.3.1.beta"
flutter-version: "3.10.6"
dependencies:
    klutter: "2.0.0"
    klutter_ui: "1.0.1"
    squint: "0.1.2"
    embedded:
       - "org.jetbrains.kotlinx:kotlinx-datetime:0.4.0"

Example command:

./kradlew create --config "./foo/bar/kradle.yaml" --root "./" --name "my_plugin" --group "com.example" --flutter "3.10.6.macos.arm64"

Get

Get project dependencies and store them in the kradle cache. Options:

Get Flutter

Get a Flutter distribution which is compatible with Klutter. Options:

Dist

The distribution to download in format major.minor.patch.platform.architecture.

Example command:

./kradlew get flutter --dist "3.10.6.windows.x64"
Overwrite

Overwrite any existing distribution if present.

Example which overwrites any existing distribution:

./kradlew get flutter --dist "3.10.6.windows.x64" --overwrite

Gradle

Gradle commands can be executed by using the -g argument.

# Run gradle clean build in the folder /platform.
./kradlew -g clean build -p "platform"

Flutter

Flutter commands can be executed by using the -f argument.

# Run flutter doctor command.
./kradlew -f doctor

Wizard

When no argument is given then the interactive wizard is started.

./kradlew

// TODO wizard UI options etc.

About

The Klutter command line tool.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

 
 
 

Contributors

Languages