Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions wakelock_plus/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## [1.7.0]
* Migrate to built-in Kotlin per the official Flutter migration guide: https://docs.flutter.dev/release/breaking-changes/migrate-to-built-in-kotlin/for-plugin-authors
* Remove `apply plugin: "kotlin-android"` and KGP classpath from `android/build.gradle`.
* Remove `id 'kotlin-android'` and the `kotlinOptions` block from `example/android/app/build.gradle`.
* Add a top-level `kotlin { compilerOptions { jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17 } }` block in both gradle files.
* Flip `android.builtInKotlin=true` and `android.newDsl=true` in `example/android/gradle.properties`.
* **BREAKING CHANGES**:
- Dart
* Library now requires Dart version `3.12` or higher.
* Library now requires Flutter version `3.44` or higher.

## [1.6.1]
* [#133](https://github.com/fluttercommunity/wakelock_plus/pull/133): wakelock_plus Flutter 3.38 downgrade. Thanks [diegotori](https://github.com/diegotori).
- Library now requires Dart version `3.10` or higher, restoring previous compatibility.
Expand Down
12 changes: 6 additions & 6 deletions wakelock_plus/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ group 'dev.fluttercommunity.plus.wakelock'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '2.2.0'
repositories {
google()
mavenCentral()
Expand All @@ -21,7 +20,6 @@ rootProject.allprojects {
}

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

android {
namespace 'dev.fluttercommunity.plus.wakelock'
Expand All @@ -32,9 +30,6 @@ android {
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = '17'
}
lintOptions {
disable 'InvalidPackage'
}
Expand All @@ -51,7 +46,6 @@ android {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
testImplementation 'org.jetbrains.kotlin:kotlin-test'
testImplementation 'org.mockito:mockito-core:5.0.0'
}
Expand All @@ -69,3 +63,9 @@ android {
}
}
}

kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}
11 changes: 6 additions & 5 deletions wakelock_plus/example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'dev.flutter.flutter-gradle-plugin'
}
def localProperties = new Properties()
Expand Down Expand Up @@ -31,10 +30,6 @@ android {
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = '17'
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
Expand Down Expand Up @@ -65,3 +60,9 @@ flutter {

dependencies {
}

kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}
2 changes: 2 additions & 0 deletions wakelock_plus/example/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
org.gradle.jvmargs=-Xmx4g
android.useAndroidX=true
android.enableJetifier=true
android.builtInKotlin=true
android.newDsl=true
6 changes: 3 additions & 3 deletions wakelock_plus/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: wakelock_plus
description: >-2
Plugin that allows you to keep the device screen awake, i.e. prevent the screen from sleeping on
Android, iOS, macOS, Windows, Linux, and web.
version: 1.6.1
version: 1.7.0
repository: https://github.com/fluttercommunity/wakelock_plus/tree/main/wakelock_plus

environment:
sdk: '>=3.10.0 <4.0.0'
flutter: ">=3.38.0"
sdk: ^3.12.0
flutter: '>=3.44.0'

dependencies:
flutter:
Expand Down