docs: 📝 Added README.md

This commit is contained in:
Andreas Fahrecker 2024-04-29 20:59:04 +02:00
parent 1cff1ccd04
commit 37d1edf6c3

62
README.md Normal file
View File

@ -0,0 +1,62 @@
# Flutter Gradle Plugin
This is a Gradle plugin that provides tasks for building and running Flutter applications.
## Tasks
The plugin provides the following tasks:
- `flutterDoctor`: Runs the `flutter doctor` command.
- `flutterVersion`: Runs the `flutter --version` command.
- `dartBuildRunner`: Runs the `dart run build_runner build --delete-conflicting-outputs` command.
- `flutterBuildApk`: Runs the `flutter build apk` command.
- `flutterBuildWeb`: Runs the `flutter build web` command.
- `flutterBuildWindows`: Runs the `flutter build windows` command.
- `flutterRunChrome`: Runs the `flutter run -d chrome` command.
- `flutterRunWindows`: Runs the `flutter run -d windows` command.
## Usage
### With buildscript
To use the plugin, add it to the `buildscript` dependencies in your `build.gradle` file:
```groovy
buildscript {
repositories {
maven {
url = uri("https://gitea.fahrecker.com/api/packages/andreas-personal/maven")
}
}
dependencies {
classpath 'com.fahrecker:com.fahrecker.flutterGradlePlugin:0.0.7-SNAPSHOT'
}
}
apply plugin: 'com.fahrecker.flutterGradlePlugin'
```
### Without buildscript
To use the plugin without the buildscript block, add it to the plugins block and the repositories block in your build.gradle file:
```groovy
plugins {
id 'com.fahrecker.flutterGradlePlugin' version '0.0.7-SNAPSHOT'
}
repositories {
maven {
url = uri("https://gitea.fahrecker.com/api/packages/andreas-personal/maven")
}
// Other repositories...
}
```
## Running Tasks
You can run the tasks with the gradlew command. For example, to run the flutterDoctor task, use:
```sh
./gradlew flutterDoctor
```