flutter/dev/integration_tests/deferred_components_test/android/component1/build.gradle
Ben Konyi 7cb926a33d
Reapply "[ Device Lab ] Upgrade Device Lab projects to Java 18" (#166016) (#166059)
This reverts commit
8dccbc33df.

Find/replace didn't catch the use of `jvmTarget = "1.8"` in
`dev/integration_tests/android_engine_test/android/app/build.gradle` and
`android_engine_test` needed to have `"com.android.application"`
updated.
2025-03-27 15:07:22 +00:00

61 lines
2.0 KiB
Groovy

// 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.
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'
}
apply plugin: "com.android.dynamic-feature"
android {
namespace = "io.flutter.integration.deferred_components_test.component1"
compileSdk = 35
// 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 = "26.3.11579264" // This version must exactly match the version of the NDK that the recipe pulls from CIPD.
ndkPath = systemNdkPath
}
sourceSets {
applicationVariants.all { variant ->
main.assets.srcDirs += "${project.layout.buildDirectory.get()}/intermediates/flutter/${variant.name}/deferred_assets"
main.jniLibs.srcDirs += "${project.layout.buildDirectory.get()}/intermediates/flutter/${variant.name}/deferred_libs"
}
}
defaultConfig {
minSdk = 21
targetSdk = 35
versionCode = flutterVersionCode.toInteger()
versionName = flutterVersionName
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}
dependencies {
implementation project(":app")
}