123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- //
- // Copyright (c) Contributors to the Open 3D Engine Project.
- // For complete copyright and license terms please see the LICENSE at the root of this distribution.
- //
- // SPDX-License-Identifier: Apache-2.0 OR MIT
- //
- apply plugin: "com.android.${TARGET_TYPE}"
- android {
- ${PROJECT_NAMESPACE_OPTION}
- ${SIGNING_CONFIGS}
- compileSdkVersion sdkVer
- buildToolsVersion buildToolsVer
- ndkVersion ndkPlatformVer
- lintOptions {
- abortOnError false
- checkReleaseBuilds false
- }
- defaultConfig {
- minSdkVersion minSdkVer
- targetSdkVersion sdkVer
- ${NATIVE_CMAKE_SECTION_DEFAULT_CONFIG}
- }
- buildTypes {
- debug {
- debuggable true
- ${NATIVE_CMAKE_SECTION_DEBUG_CONFIG}
- ${SIGNING_DEBUG_CONFIG}
- }
- profile {
- getIsDefault().set(true)
- debuggable true
- ${NATIVE_CMAKE_SECTION_PROFILE_CONFIG}
- ${SIGNING_PROFILE_CONFIG}
- }
- release {
- debuggable false
- minifyEnabled false
- ${NATIVE_CMAKE_SECTION_RELEASE_CONFIG}
- ${SIGNING_RELEASE_CONFIG}
- }
- }
- compileOptions {
- targetCompatibility JavaVersion.VERSION_1_8
- sourceCompatibility JavaVersion.VERSION_1_8
- }
- ${NATIVE_CMAKE_SECTION_ANDROID}
- sourceSets {
- main {
- ${OVERRIDE_JAVA_SOURCESET}
- jniLibs {
- srcDirs = ["src/main/jniLibs"${OPTIONAL_JNI_SRC_LIB_SET}]
- }
- }
- }
- packagingOptions {
- pickFirst '**/*.so'
- }
- // APKs will attempt to compress file types it doesn't recognized as already compressed (ie jpeg, mp3, etc)
- // However, when it compresses an O3DE PAK file, whether the PAK was created with compression or not,
- // there is a bug causing the app to softlock when attempting to open the PAK.
- // See https://github.com/o3de/o3de/issues/17625
- aaptOptions {
- noCompress 'pak'
- }
- }
- // Inject the zip64 option into package task to allow 4GiB apks
- tasks.withType(Zip) {
- if (name == "packageDebug" || name == "packageProfile" || name == "packageRelease") {
- zip64 = true
- }
- }
- ${PROJECT_DEPENDENCIES}
- afterEvaluate {
- ${CUSTOM_APPLY_ASSET_LAYOUT_DEBUG_TASK}
- ${CUSTOM_APPLY_ASSET_LAYOUT_PROFILE_TASK}
- ${CUSTOM_APPLY_ASSET_LAYOUT_RELEASE_TASK}
- ${CUSTOM_GRADLE_COPY_NATIVE_DEBUG_LIB_TASK}
- ${CUSTOM_GRADLE_COPY_NATIVE_PROFILE_LIB_TASK}
- ${CUSTOM_GRADLE_COPY_NATIVE_RELEASE_LIB_TASK}
- }
|