Skip to content

Commit

Permalink
[battery_plus] Migrate Android part to Kotlin (fluttercommunity#1100)
Browse files Browse the repository at this point in the history
* Add Kotlin plugin, replace Java plugin file with Kotlin file
* Clean up the code
* Update Flutter dependencies, add release notes
* Fix import for tests
  • Loading branch information
vbuberen authored Sep 28, 2022
1 parent 6328d96 commit 8107c4a
Show file tree
Hide file tree
Showing 11 changed files with 222 additions and 254 deletions.
7 changes: 7 additions & 0 deletions packages/battery_plus/battery_plus/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 2.2.0

- Android: Migrate to Kotlin
- Android: Bump targetSDK to 33 (Android 13)
- Android: Update dependencies, build config updates
- Update Flutter dependencies

## 2.1.4+1

- Add issue_tracker link.
Expand Down
2 changes: 0 additions & 2 deletions packages/battery_plus/battery_plus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,3 @@ battery.onBatteryStateChanged.listen((BatteryState state) {
// Do something with new state
});
```

**Important:** As of January 2021, the Flutter team is no longer accepting non-critical PRs for the original set of plugins in `flutter/plugins`, and instead they should be submitted in this project. [You can read more about this announcement here.](https://github.com/flutter/plugins/blob/master/CONTRIBUTING.md#important-note) as well as [in the Flutter 2 announcement blog post.](https://medium.com/flutter/whats-new-in-flutter-2-0-fe8e95ecc65)
8 changes: 6 additions & 2 deletions packages/battery_plus/battery_plus/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.0.2'
classpath 'com.android.tools.build:gradle:7.3.0'
}
}

Expand All @@ -20,9 +20,10 @@ rootProject.allprojects {
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 31
compileSdkVersion 33

defaultConfig {
minSdkVersion 16
Expand All @@ -31,5 +32,8 @@ android {
lintOptions {
disable 'InvalidPackage'
}
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}

This file was deleted.

Loading

0 comments on commit 8107c4a

Please sign in to comment.