Skip to content
Merged
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
4 changes: 3 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ jobs:
needs: setup_matrix
# Per requirements: macOS-26 runner is required to access the iPhone 17 simulator environment
runs-on: macos-26
timeout-minutes: 60
timeout-minutes: 75
strategy:
matrix:
flutter_version: ${{ fromJson(needs.setup_matrix.outputs.flutter_versions_json) }}
Expand All @@ -227,6 +227,7 @@ jobs:
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}

- name: Start iOS simulator
id: ios_simulator
# Using standard simulator-action to handle the simulator lifecycle on macOS-26
uses: futureware-tech/simulator-action@v5
with:
Expand All @@ -240,6 +241,7 @@ jobs:
cd wakelock_plus/example
flutter pub get
flutter drive \
-d ${{ steps.ios_simulator.outputs.udid }} \
--driver=test_driver/integration_test.dart \
--target=integration_test/wakelock_plus_test.dart

Expand Down
40 changes: 16 additions & 24 deletions wakelock_plus/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,27 +1,15 @@
group 'dev.fluttercommunity.plus.wakelock'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '2.2.0'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:8.12.1'
}
plugins {
id 'com.android.library'
}

rootProject.allprojects {
repositories {
google()
mavenCentral()
}
// Conditionally apply KGP only if AGP version is earlier than 9.
def agpMajor = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0] as int
if (agpMajor < 9) {
project.pluginManager.apply('org.jetbrains.kotlin.android')
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
group 'dev.fluttercommunity.plus.wakelock'
version '1.0-SNAPSHOT'

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

kotlinOptions {
jvmTarget = '17'
}
lintOptions {
disable 'InvalidPackage'
}
Expand All @@ -51,7 +36,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 +53,11 @@ android {
}
}
}


kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}

18 changes: 14 additions & 4 deletions wakelock_plus/example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'dev.flutter.flutter-gradle-plugin'
}

// Conditionally apply KGP only if AGP version is earlier than 9.
def agpMajor = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0] as int
if (agpMajor < 9) {
project.pluginManager.apply('org.jetbrains.kotlin.android')
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
Expand Down Expand Up @@ -31,9 +37,6 @@ android {
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = '17'
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -59,6 +62,13 @@ android {
}
}

kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}


flutter {
source '../..'
}
Expand Down
5 changes: 5 additions & 0 deletions wakelock_plus/example/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
org.gradle.jvmargs=-Xmx4g
android.useAndroidX=true
android.enableJetifier=true

# This builtInKotlin flag was added automatically by Flutter migrator
android.builtInKotlin=false
# This newDsl flag was added automatically by Flutter migrator
android.newDsl=false
Loading