Skip to content

Commit b6fd229

Browse files
authored
Release 2.0.0 (#12)
* Bump constraint SDK to 2.18.0 <4.0.0. Bump dependencies in generated code to klutter (pub) to 1.0.1 and klutter (gradle) to 2023.3.1.beta. Add method to retrieve flutter SDK version from klutter.yaml. * Bump Flutter SDK range to ">=2.17.6 <4.0.0". * Bump dependencies. * Downgrade dependencies due to incompatibility with SDK 2.17.6. * Bump dependencies * Prepare for 1.0.1 release. Run GHW build on ubuntu. * Run iOS init only on Mac OS. * Add kradle(w) Files to res and copy them on project init. Add GetFlutterSDK Task to download compatible Flutter SDK to kradle cache. Remove deprecated Task Install. * Fix platform_test. Extract arch and os from flutter=version command. * Add kradlew files with default config. * New kradle-wrapper.jar * Make copied gradle/kradle files executable. * Make copied gradle/kradle files executable. * Remove kradle files because klutterGetKradle (Gradle) Task will download them. * Bump AGP and Gradle dependencies. * Remove AndroidManifest.xml reference. * Overwrite the example/app/build.gradle file to controle android and kotlin gradle plugin versions. * Fix typo. * Overwrite the gradle-wrapper.properties in example/android folder. * Set path correctly to overwrite main.dart in example folder. * Fix namespace in example/android gradle file. * Add test coverage. * Fix test on windows. * Skip download flutter UT for coverage and code cleanup. * Fix invalid parsing ot TaskName.get and test coverage. * Testcoverage. * Test coverage. * Update readme. Release 2.0.0. * Bump codecov-action to v3.
1 parent 56cc7ff commit b6fd229

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1809
-823
lines changed

.github/workflows/codecov.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jobs:
44
build:
55
strategy:
66
matrix:
7-
os: [macos-latest, windows-latest]
7+
os: [macos-latest, windows-latest, ubuntu-latest]
88
runs-on: ${{ matrix.os }}
99
steps:
1010
- uses: actions/checkout@v3
@@ -30,7 +30,7 @@ jobs:
3030

3131
# Upload coverage data
3232
- name: Upload coverage to Codecov
33-
uses: codecov/codecov-action@v2
33+
uses: codecov/codecov-action@v3
3434
env:
3535
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
3636
with:

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
1+
## 2.0.0
2+
* Uses AGP 8.0.2 in projects.
3+
* Removed AndroidManifest.xml references.
4+
* Add code generation for example/app/build.gradle to control dependency versions used.
5+
* Uses kradle.yaml instead of klutter.yaml.
6+
* Bump SDK constraints to >=2.17.6 <4.0.0.
7+
* Uses Klutter Gradle v2023.3.1.beta.
8+
* Uses klutter_ui 1.0.1.
9+
* Removed deprecated TaskName install.
10+
* Add support for Linux.
11+
112
## 1.0.0
213
* Uses Klutter Gradle v2023.1.2.beta.
314
* Uses klutter_ui 1.0.0.
4-
* Added support for windows development ([ticket](https://github.com/buijs-dev/klutter-dart/issues/3)).
15+
* Add support for windows development ([ticket](https://github.com/buijs-dev/klutter-dart/issues/3)).
516

617
## 0.3.0
718
* Uses Klutter Gradle v2023.1.1.beta.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2021 - 2022 Buijs Software
1+
Copyright (c) 2021 - 2023 Buijs Software
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ Use this plugin if you want to:
2727
1. [Installation](#Installation)
2828
2. [Using plugins](#Usage)
2929
3. [Creating plugins](#Creation)
30-
4. [FAQ!](#Faq!)
30+
4. [FAQ](#Faq)
3131

32-
- Easiest way to start a new project is with the [Intellij](https://buijs.dev/klutter-3/) or [Android Studio](https://buijs.dev/klutter-4/) plugin.
33-
This plugin will create a new Flutter plugin and setup Klutter automatically.
32+
- Start a new project with the
33+
- [Intellij](https://buijs.dev/klutter-3/) plugin
34+
- [Android Studio](https://buijs.dev/klutter-4/) plugin
35+
- [Kradle](https://buijs.dev/kradle-1/) cli tool
3436
- For a step-by-step guide (doing everything manually), see the battery app with Klutter [tutorial](https://buijs.dev/klutter-2/).
3537

3638
# Installation
@@ -43,9 +45,9 @@ Add the Klutter library to dependencies in the pubspec.yaml:
4345

4446
```yaml
4547
dev_dependencies:
46-
klutter: ^1.0.0
47-
```
48-
48+
klutter: ^2.0.0
49+
```
50+
4951
Then run:
5052
5153
```shell
@@ -72,26 +74,12 @@ flutter pub run klutter:consumer init
7274
```
7375

7476
The init task will set up Klutter for both Android and iOS.
75-
Alternatively you can set up Android and IOS separately.
76-
77-
Setup Android by running:
78-
79-
```shell
80-
flutter pub run klutter:consumer init=android
81-
```
82-
83-
Setup IOS by running:
84-
85-
```shell
86-
flutter pub run klutter:consumer init=ios
87-
```
88-
89-
Finally, Klutter plugins can be added by running the add command.
77+
Klutter plugins can be added by running the add command.
9078

9179
<B>Example</B>:</br> Add the library 'awesome_plugin' to your project:
9280

9381
```shell
94-
flutter pub run klutter:consumer add=awesome_plugin
82+
flutter pub run klutter:consumer add lib=awesome_plugin
9583
```
9684

9785
<b>Background</b></br>
@@ -130,8 +118,9 @@ The consumer init task will do the following for Android in your Flutter project
130118
1. Create a .klutter-plugins file in the root folder.
131119
2. Create a new Gradle file in the flutter/packages/flutter_tools/gradle.
132120
3. Update the android/settings.gradle file to apply the newly generated Gradle file.
133-
4. Update the min/compile/target SDK versions to 21/31/31 in the android/app/build.gradle file.
134-
121+
4. Update the min/target SDK versions to 24/33 in the android/app/build.gradle file.
122+
5. Update the Android Gradle Plugin to 8.0.2 and gradle-wrapper to Gradle 8+.
123+
135124
The .klutter-plugins file will register all Klutter made plugins used in your project.
136125
The created Gradle file in the flutter_tools manages the plugins
137126
and enables them to be found by the Flutter project.
@@ -166,16 +155,29 @@ Install the Klutter Framework as dependency and then run:
166155
flutter pub run klutter:producer init
167156
```
168157

169-
Build the platform module by running the following in the root folder (takes a few minutes!):
158+
Build the platform module by running the following in the root folder (takes a few minutes):
170159

171160
```shell
172161
./gradlew clean build -p "platform"
173162
```
174163

164+
It is also possible to import the kradle tool in your project using Gradle:
165+
166+
```shell
167+
./gradlew klutterGetKradle
168+
```
169+
170+
And then build the project with kradle:
171+
172+
```shell
173+
./kradlew build
174+
```
175+
176+
175177
Now test the plugin by following the steps outlined [here](#Usage) in the root/example project.
176178
When done you can run the example project from the root/example/lib folder and see your first plugin in action!
177179

178-
# Faq!
180+
# Faq
179181
1. [App won't start on...](#App%20won't%20start)
180182

181183
## App won't start
@@ -187,7 +189,7 @@ Make sure you have followed all the following steps:
187189
- do flutter pub run klutter:producer init in the root folder.
188190
- do ./gradlew clean build -p "platform" in the root folder.
189191
- do flutter pub run klutter:consumer init in the root/example folder.
190-
- do flutter pub run klutter:consumer add=<your_plugin_name> in the root/example folder.
192+
- do flutter pub run klutter:consumer add lib=<your_plugin_name> in the root/example folder.
191193

192194
### For Android emulator:
193195
There should be a .klutter-plugins file in the root/example folder containing an entry for your plugin.

bin/consumer.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2021 - 2022 Buijs Software
1+
// Copyright (c) 2021 - 2023 Buijs Software
22
//
33
// Permission is hereby granted, free of charge, to any person obtaining a copy
44
// of this software and associated documentation files (the "Software"), to deal

bin/producer.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2021 - 2022 Buijs Software
1+
// Copyright (c) 2021 - 2023 Buijs Software
22
//
33
// Permission is hereby granted, free of charge, to any person obtaining a copy
44
// of this software and associated documentation files (the "Software"), to deal

codecov.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ignore: #download task, don't want to test it in a UT
2+
- "**/task_get_flutter.dart"

doc/producer.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,4 @@ A producer project is basically a Flutter plugin project with an extra
55
Kotlin Multiplatform module where all (native) platform code will be written.
66

77
The following producer tasks are available:
8-
- producer init (initialize Klutter in your project)
9-
- producer install=platform (build the Kotlin Multiplatform code)
10-
- producer install=library (generate Flutter - Kotlin glue)
8+
- producer init (initialize Klutter in your project)

lib/klutter.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2021 - 2022 Buijs Software
1+
// Copyright (c) 2021 - 2023 Buijs Software
22
//
33
// Permission is hereby granted, free of charge, to any person obtaining a copy
44
// of this software and associated documentation files (the "Software"), to deal

lib/res/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)