// 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") }