diff --git a/packages/integration_test/example/android/app/build.gradle b/packages/integration_test/example/android/app/build.gradle deleted file mode 100644 index 62d30ab06b..0000000000 --- a/packages/integration_test/example/android/app/build.gradle +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2014 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -plugins { - id "com.android.application" - id "dev.flutter.flutter-gradle-plugin" -} - -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -android { - namespace 'com.example.integration_test_example' - compileSdk flutter.compileSdkVersion - - // Flutter's CI installs the NDK at a non-standard path. - // This non-standard structure is initially created by - // https://github.com/flutter/engine/blob/3.27.0/tools/android_sdk/create_cipd_packages.sh. - String systemNdkPath = System.getenv("ANDROID_NDK_PATH") - if (systemNdkPath != null) { - ndkVersion = flutter.ndkVersion - ndkPath = systemNdkPath - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.integration_test_example" - minSdkVersion flutter.minSdkVersion - targetSdkVersion flutter.targetSdkVersion - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } -} - -flutter { - source '../..' -} - -dependencies { - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test:runner:1.5.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' -} diff --git a/packages/integration_test/example/android/app/build.gradle.kts b/packages/integration_test/example/android/app/build.gradle.kts new file mode 100644 index 0000000000..96ad8047a3 --- /dev/null +++ b/packages/integration_test/example/android/app/build.gradle.kts @@ -0,0 +1,58 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +plugins { + id("com.android.application") + id("kotlin-android") + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id("dev.flutter.flutter-gradle-plugin") +} + +android { + namespace = "com.example.integration_test_example" + compileSdk = flutter.compileSdkVersion + + // Flutter's CI installs the NDK at a non-standard path. + // This non-standard structure is initially created by + // https://github.com/flutter/engine/blob/3.27.0/tools/android_sdk/create_cipd_packages.sh. + val systemNdkPath = System.getenv("ANDROID_NDK_PATH") + if (systemNdkPath != null) { + ndkVersion = flutter.ndkVersion + ndkPath = systemNdkPath + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId = "com.example.integration_test_example" + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig = signingConfigs.getByName("debug") + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + } +} + +flutter { + source = "../.." +} + +dependencies { + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test:runner:1.5.2") + androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") +} diff --git a/packages/integration_test/example/android/app/src/debug/AndroidManifest.xml b/packages/integration_test/example/android/app/src/debug/AndroidManifest.xml index fa9a400b91..5dba98d653 100644 --- a/packages/integration_test/example/android/app/src/debug/AndroidManifest.xml +++ b/packages/integration_test/example/android/app/src/debug/AndroidManifest.xml @@ -2,8 +2,7 @@ Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> - + diff --git a/packages/integration_test/example/android/app/src/main/AndroidManifest.xml b/packages/integration_test/example/android/app/src/main/AndroidManifest.xml index f36b7764e6..e46d0fe069 100644 --- a/packages/integration_test/example/android/app/src/main/AndroidManifest.xml +++ b/packages/integration_test/example/android/app/src/main/AndroidManifest.xml @@ -2,8 +2,7 @@ Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> - + - + diff --git a/packages/integration_test/example/android/build.gradle b/packages/integration_test/example/android/build.gradle.kts similarity index 60% rename from packages/integration_test/example/android/build.gradle rename to packages/integration_test/example/android/build.gradle.kts index bedac9d2d4..97200b5a0a 100644 --- a/packages/integration_test/example/android/build.gradle +++ b/packages/integration_test/example/android/build.gradle.kts @@ -13,22 +13,22 @@ allprojects { } } -rootProject.buildDir = '../build' +rootProject.buildDir = file("../build") subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" + project.buildDir = file("${rootProject.buildDir}/${project.name}") } subprojects { - project.evaluationDependsOn(':app') + project.evaluationDependsOn(":app") dependencyLocking { - ignoredDependencies.add('io.flutter:*') + ignoredDependencies.add("io.flutter:*") lockFile = file("${rootProject.projectDir}/project-${project.name}.lockfile") - if (!project.hasProperty('local-engine-repo')) { - lockAllConfigurations() + if (!project.hasProperty("local-engine-repo")) { + lockAllConfigurations() } } } -tasks.register("clean", Delete) { - delete rootProject.buildDir +tasks.register("clean") { + delete(rootProject.buildDir) } diff --git a/packages/integration_test/example/android/buildscript-gradle.lockfile b/packages/integration_test/example/android/buildscript-gradle.lockfile index 545abc59e9..58b2ec9984 100644 --- a/packages/integration_test/example/android/buildscript-gradle.lockfile +++ b/packages/integration_test/example/android/buildscript-gradle.lockfile @@ -129,15 +129,15 @@ org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10=classpath org.jetbrains.kotlin:kotlin-klib-commonizer-api:1.8.10=classpath org.jetbrains.kotlin:kotlin-native-utils:1.8.10=classpath org.jetbrains.kotlin:kotlin-project-model:1.8.10=classpath -org.jetbrains.kotlin:kotlin-reflect:1.9.20=classpath +org.jetbrains.kotlin:kotlin-reflect:2.0.21=classpath org.jetbrains.kotlin:kotlin-scripting-common:1.8.10=classpath org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.8.10=classpath org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.8.10=classpath org.jetbrains.kotlin:kotlin-scripting-jvm:1.8.10=classpath -org.jetbrains.kotlin:kotlin-stdlib-common:1.9.20=classpath +org.jetbrains.kotlin:kotlin-stdlib-common:2.0.21=classpath org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.20=classpath org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.20=classpath -org.jetbrains.kotlin:kotlin-stdlib:1.9.20=classpath +org.jetbrains.kotlin:kotlin-stdlib:2.0.21=classpath org.jetbrains.kotlin:kotlin-tooling-core:1.8.10=classpath org.jetbrains.kotlin:kotlin-util-io:1.8.10=classpath org.jetbrains.kotlin:kotlin-util-klib:1.8.10=classpath @@ -146,7 +146,7 @@ org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.4.0=classpath org.jetbrains.kotlinx:kotlinx-serialization-core:1.4.0=classpath org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:1.4.0=classpath org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.0=classpath -org.jetbrains:annotations:23.0.0=classpath +org.jetbrains:annotations:13.0=classpath org.jvnet.staxex:stax-ex:1.8.1=classpath org.ow2.asm:asm-analysis:9.6=classpath org.ow2.asm:asm-commons:9.6=classpath diff --git a/packages/integration_test/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/integration_test/example/android/gradle/wrapper/gradle-wrapper.properties index afa1e8eb0a..02767eb1ca 100644 --- a/packages/integration_test/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/integration_test/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.10.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip diff --git a/packages/integration_test/example/android/settings.gradle b/packages/integration_test/example/android/settings.gradle deleted file mode 100644 index 4a155b35ec..0000000000 --- a/packages/integration_test/example/android/settings.gradle +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2014 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// This file is auto generated. -// To update all the settings.gradle files in the Flutter repo, -// See dev/tools/bin/generate_gradle_lockfiles.dart. - -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 - } - settings.ext.flutterSdkPath = flutterSdkPath() - - includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") - - repositories { - google() - mavenCentral() - gradlePluginPortal() - } -} - -buildscript { - dependencyLocking { - lockFile = file("${rootProject.projectDir}/buildscript-gradle.lockfile") - lockAllConfigurations() - } -} - -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.8.10" apply false -} - -include ":app" diff --git a/packages/integration_test/example/android/settings.gradle.kts b/packages/integration_test/example/android/settings.gradle.kts new file mode 100644 index 0000000000..ddd0d7e455 --- /dev/null +++ b/packages/integration_test/example/android/settings.gradle.kts @@ -0,0 +1,41 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// This file is auto generated. +// To update all the settings.gradle files in the Flutter repo, +// See dev/tools/bin/generate_gradle_lockfiles.dart. + +pluginManagement { + val flutterSdkPath = + run { + val properties = java.util.Properties() + file("local.properties").inputStream().use { properties.load(it) } + val flutterSdkPath = properties.getProperty("flutter.sdk") + require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } + flutterSdkPath + } + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +buildscript { + dependencyLocking { + lockFile = file("${rootProject.projectDir}/buildscript-gradle.lockfile") + lockAllConfigurations() + } +} + +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.8.10" apply false +} + +include(":app")