Files
flutter/dev/integration_tests/deferred_components_test/android/component1/build.gradle
Ben Konyi c376ca22dd [ Device Lab ] Upgrade Device Lab projects to Java 18 (#165987)
Should resolve issues related to the following messages being output on
stderr:

```
warning: [options] source value 8 is obsolete and will be removed in a future release"
warning: [options] target value 8 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
```

Fixes https://github.com/flutter/flutter/issues/165973
2025-03-26 15:32:27 +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")
}