diff --git a/dev/e2e_app/android/app/build.gradle b/dev/e2e_app/android/app/build.gradle index 7579ca48c..d8a56834f 100644 --- a/dev/e2e_app/android/app/build.gradle +++ b/dev/e2e_app/android/app/build.gradle @@ -1,6 +1,6 @@ plugins { id "com.android.application" - id "org.jetbrains.kotlin.android" + id "kotlin-android" id "dev.flutter.flutter-gradle-plugin" } @@ -23,8 +23,14 @@ if (flutterVersionName == null) { } android { - compileSdk 34 + compileSdk 35 namespace "pl.leancode.patrol.e2e_app" + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + coreLibraryDesugaringEnabled true + } kotlinOptions { jvmTarget = "1.8" @@ -37,7 +43,7 @@ android { defaultConfig { applicationId "pl.leancode.patrol.e2e_app" minSdk 24 - targetSdk 33 + targetSdk 35 versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "pl.leancode.patrol.PatrolJUnitRunner" @@ -60,6 +66,7 @@ flutter { } dependencies { + coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3' implementation "org.jetbrains.kotlin:kotlin-stdlib:1.9.20" androidTestUtil "androidx.test:orchestrator:1.4.2" } diff --git a/dev/e2e_app/android/app/src/main/AndroidManifest.xml b/dev/e2e_app/android/app/src/main/AndroidManifest.xml index 21f6a00c3..983944a9e 100644 --- a/dev/e2e_app/android/app/src/main/AndroidManifest.xml +++ b/dev/e2e_app/android/app/src/main/AndroidManifest.xml @@ -1,6 +1,8 @@ + + diff --git a/dev/e2e_app/android/build.gradle b/dev/e2e_app/android/build.gradle index da0d8da81..bc157bd1a 100644 --- a/dev/e2e_app/android/build.gradle +++ b/dev/e2e_app/android/build.gradle @@ -1,7 +1,16 @@ -rootProject.buildDir = "../build" +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" - project.evaluationDependsOn(":app") +} +subprojects { + project.evaluationDependsOn(':app') } tasks.register("clean", Delete) { diff --git a/dev/e2e_app/android/gradle/wrapper/gradle-wrapper.properties b/dev/e2e_app/android/gradle/wrapper/gradle-wrapper.properties index cb046be63..2aaed3a1f 100644 --- a/dev/e2e_app/android/gradle/wrapper/gradle-wrapper.properties +++ b/dev/e2e_app/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip diff --git a/dev/e2e_app/android/settings.gradle b/dev/e2e_app/android/settings.gradle index 6cf68fd84..55c9367ae 100644 --- a/dev/e2e_app/android/settings.gradle +++ b/dev/e2e_app/android/settings.gradle @@ -5,10 +5,9 @@ pluginManagement { def flutterSdkPath = properties.getProperty("flutter.sdk") assert flutterSdkPath != null, "flutter.sdk not set in local.properties" return flutterSdkPath - } - settings.ext.flutterSdkPath = flutterSdkPath() + }() - includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") repositories { google() @@ -18,8 +17,8 @@ pluginManagement { } plugins { - id "dev.flutter.flutter-plugin-loader" - id "com.android.application" version "7.4.2" apply false + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "8.6.0" apply false id "org.jetbrains.kotlin.android" version "1.9.20" apply false } diff --git a/dev/e2e_app/pubspec.lock b/dev/e2e_app/pubspec.lock index d298e677d..0b6e31dc1 100644 --- a/dev/e2e_app/pubspec.lock +++ b/dev/e2e_app/pubspec.lock @@ -305,10 +305,10 @@ packages: dependency: "direct main" description: name: geolocator - sha256: f4efb8d3c4cdcad2e226af9661eb1a0dd38c71a9494b22526f9da80ab79520e5 + sha256: d2ec66329cab29cb297d51d96c067d457ca519dca8589665fa0b82ebacb7dbe4 url: "https://pub.dev" source: hosted - version: "10.1.1" + version: "13.0.2" geolocator_android: dependency: transitive description: @@ -321,10 +321,10 @@ packages: dependency: transitive description: name: geolocator_apple - sha256: bc2aca02423ad429cb0556121f56e60360a2b7d694c8570301d06ea0c00732fd + sha256: "6154ea2682563f69fc0125762ed7e91e7ed85d0b9776595653be33918e064807" url: "https://pub.dev" source: hosted - version: "2.3.7" + version: "2.3.8+1" geolocator_platform_interface: dependency: transitive description: @@ -337,10 +337,10 @@ packages: dependency: transitive description: name: geolocator_web - sha256: "102e7da05b48ca6bf0a5bda0010f886b171d1a08059f01bfe02addd0175ebece" + sha256: "2ed69328e05cd94e7eb48bb0535f5fc0c0c44d1c4fa1e9737267484d05c29b5e" url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "4.1.1" geolocator_windows: dependency: transitive description: @@ -499,21 +499,23 @@ packages: path: "../../packages/patrol" relative: true source: path - version: "3.11.2" + version: "3.13.2" patrol_finders: dependency: transitive description: - path: "../../packages/patrol_finders" - relative: true - source: path - version: "2.1.2" + name: patrol_finders + sha256: "5a1e2b4c6636e89645fc596d68224cfe6cca28e11c855b98dd0df9bed0d80405" + url: "https://pub.dev" + source: hosted + version: "2.6.0" patrol_log: dependency: transitive description: - path: "../../packages/patrol_log" - relative: true - source: path - version: "0.0.1" + name: patrol_log + sha256: ad5d7b759d16071ca16aa9b27eb4f106ce23079792d4312941874dbc33e795cb + url: "https://pub.dev" + source: hosted + version: "0.2.2" permission_handler: dependency: "direct main" description: diff --git a/dev/e2e_app/pubspec.yaml b/dev/e2e_app/pubspec.yaml index a62f5fef1..f01cb8f54 100644 --- a/dev/e2e_app/pubspec.yaml +++ b/dev/e2e_app/pubspec.yaml @@ -14,7 +14,7 @@ dependencies: sdk: flutter flutter_local_notifications: ^17.2.3 flutter_timezone: ^1.0.8 - geolocator: ^10.1.0 + geolocator: ^13.0.0 permission_handler: ^10.4.5 timezone: ^0.9.2 webview_flutter: ^4.4.2 diff --git a/packages/patrol/CHANGELOG.md b/packages/patrol/CHANGELOG.md index 353c664a1..2630379a9 100644 --- a/packages/patrol/CHANGELOG.md +++ b/packages/patrol/CHANGELOG.md @@ -1,7 +1,10 @@ ## Unreleased -- Remove `exception` from `StepEntry`. When it was too long, it caused crash because of badly formed JSON -- Bump `patrol_finders` and `patrol_log` versions +- Remove `exception` from `StepEntry`. When it was too long, it caused crash because of badly formed JSON. +- Bump `patrol_finders` and `patrol_log` versions. +- Bump compileSdk to 35. +- Bump gradle to 8.9.0. +- Make Patrol works with Java 21. ## 3.13.2 diff --git a/packages/patrol/android/build.gradle b/packages/patrol/android/build.gradle index b966e6d97..263adab84 100644 --- a/packages/patrol/android/build.gradle +++ b/packages/patrol/android/build.gradle @@ -10,7 +10,7 @@ buildscript { } dependencies { - classpath "com.android.tools.build:gradle:7.4.2" + classpath "com.android.tools.build:gradle:8.2.2" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jlleitschuh.gradle:ktlint-gradle:11.5.0" } @@ -35,7 +35,7 @@ allprojects { android { namespace "pl.leancode.patrol" - compileSdk 33 + compileSdk 35 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 diff --git a/packages/patrol/android/gradle/wrapper/gradle-wrapper.properties b/packages/patrol/android/gradle/wrapper/gradle-wrapper.properties index 42defcc94..171d8761b 100644 --- a/packages/patrol/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/patrol/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/packages/patrol/example/android/app/build.gradle b/packages/patrol/example/android/app/build.gradle index 05f6330e5..b5fd52918 100644 --- a/packages/patrol/example/android/app/build.gradle +++ b/packages/patrol/example/android/app/build.gradle @@ -24,7 +24,7 @@ if (flutterVersionName == null) { } android { - compileSdkVersion 34 + compileSdkVersion 35 ndkVersion flutter.ndkVersion namespace "pl.leancode.patrol.example" @@ -46,6 +46,7 @@ android { compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 + coreLibraryDesugaringEnabled true } kotlinOptions { @@ -59,7 +60,7 @@ android { defaultConfig { applicationId "pl.leancode.patrol.example" minSdkVersion 21 - targetSdkVersion 33 + targetSdkVersion 35 versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "pl.leancode.patrol.PatrolJUnitRunner" @@ -82,5 +83,6 @@ flutter { } dependencies { + coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3' androidTestUtil 'androidx.test:orchestrator:1.5.1' } diff --git a/packages/patrol/example/android/app/src/main/AndroidManifest.xml b/packages/patrol/example/android/app/src/main/AndroidManifest.xml index c42ca1d16..b355a0542 100644 --- a/packages/patrol/example/android/app/src/main/AndroidManifest.xml +++ b/packages/patrol/example/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/packages/patrol/example/android/app/src/main/res/values-v29/styles.xml b/packages/patrol/example/android/app/src/main/res/values-v29/styles.xml new file mode 100644 index 000000000..df0e03f7e --- /dev/null +++ b/packages/patrol/example/android/app/src/main/res/values-v29/styles.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/packages/patrol/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/patrol/example/android/gradle/wrapper/gradle-wrapper.properties index 5e6b54271..3c85cfe05 100644 --- a/packages/patrol/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/patrol/example/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip diff --git a/packages/patrol/example/android/settings.gradle b/packages/patrol/example/android/settings.gradle index f08a60d92..1d625553e 100644 --- a/packages/patrol/example/android/settings.gradle +++ b/packages/patrol/example/android/settings.gradle @@ -19,7 +19,7 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" - id "com.android.application" version "8.1.2" apply false + id "com.android.application" version "8.6.0" apply false id "com.google.gms.google-services" version "4.4.0" apply false id "org.jetbrains.kotlin.android" version "1.9.20" apply false } diff --git a/packages/patrol_finders/CHANGELOG.md b/packages/patrol_finders/CHANGELOG.md index 28809276c..419569ccf 100644 --- a/packages/patrol_finders/CHANGELOG.md +++ b/packages/patrol_finders/CHANGELOG.md @@ -4,6 +4,8 @@ - Add `isVisibleAt` method to check if a widget is visible at a given alignment in case `visible` fails. - Remove `exception` from `StepEntry`. When it was too long, it caused crash because of badly formed JSON - Bump `patrol_log` version. +- Bump compileSdk to 35. +- Bump gradle to 8.9.0. ## 2.6.0 diff --git a/packages/patrol_finders/example/android/app/build.gradle b/packages/patrol_finders/example/android/app/build.gradle index 1df041761..9a321fa85 100644 --- a/packages/patrol_finders/example/android/app/build.gradle +++ b/packages/patrol_finders/example/android/app/build.gradle @@ -1,3 +1,9 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + def localProperties = new Properties() def localPropertiesFile = rootProject.file("local.properties") if (localPropertiesFile.exists()) { @@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) { } } -def flutterRoot = localProperties.getProperty("flutter.sdk") -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - def flutterVersionCode = localProperties.getProperty("flutter.versionCode") if (flutterVersionCode == null) { flutterVersionCode = "1" @@ -21,12 +22,8 @@ if (flutterVersionName == null) { flutterVersionName = "1.0" } -apply plugin: "com.android.application" -apply plugin: "kotlin-android" -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { - compileSdk 33 + compileSdk 35 namespace "pl.leancode.patrol.example" kotlinOptions { @@ -40,7 +37,7 @@ android { defaultConfig { applicationId "pl.leancode.patrol.example" minSdk 21 - targetSdk 33 + targetSdk 35 versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "pl.leancode.patrol.PatrolJUnitRunner" @@ -58,7 +55,3 @@ android { flutter { source "../.." } - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" -} diff --git a/packages/patrol_finders/example/android/build.gradle b/packages/patrol_finders/example/android/build.gradle index 40bb7bdf6..bc157bd1a 100644 --- a/packages/patrol_finders/example/android/build.gradle +++ b/packages/patrol_finders/example/android/build.gradle @@ -1,16 +1,3 @@ -buildscript { - ext.kotlin_version = "1.9.20" - repositories { - google() - mavenCentral() - } - - dependencies { - classpath "com.android.tools.build:gradle:7.4.2" - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - allprojects { repositories { google() @@ -18,8 +5,14 @@ allprojects { } } -rootProject.buildDir = "../build" +rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" - project.evaluationDependsOn(":app") +} +subprojects { + project.evaluationDependsOn(':app') +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir } diff --git a/packages/patrol_finders/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/patrol_finders/example/android/gradle/wrapper/gradle-wrapper.properties index cb046be63..2aaed3a1f 100644 --- a/packages/patrol_finders/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/patrol_finders/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip diff --git a/packages/patrol_finders/example/android/settings.gradle b/packages/patrol_finders/example/android/settings.gradle index e791cf5c3..3e2af492a 100644 --- a/packages/patrol_finders/example/android/settings.gradle +++ b/packages/patrol_finders/example/android/settings.gradle @@ -1,11 +1,25 @@ -include ":app" +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "8.7.0" apply false + id "org.jetbrains.kotlin.android" version "1.9.20" apply false +} -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" +include ":app"