#
# Copyright 2020 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Properties that are copied from main properties file
# We set playground properties in two steps:
# * This file is linked into gradle.properties under the project and limited to
#   just copying properties from the androidx properties file without any change.
#   Its integrity is validated as part of the buildOnServer task in AndroidX.
#   (validatePlaygroundGradleProperties task)
# * Additional settings are in playground.properties which are loaded dynamically
# This separation is necessary to ensure gradle can read certain properties
# at configuration time.

org.gradle.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC -XX:MaxMetaspaceSize=512m -Dkotlin.daemon.jvm.options=-XX:MaxMetaspaceSize=1g -Dlint.nullness.ignore-deprecated=true  -Dlint.nullness.ignore-deprecated=true
org.gradle.configureondemand=true
org.gradle.parallel=true
org.gradle.caching=true
# Disabled due to https://github.com/gradle/gradle/issues/18626
# org.gradle.vfs.watch=true
org.gradle.dependency.verification.console=verbose
org.gradle.configuration-cache=true
org.gradle.configuration-cache.problems=fail

android.lint.useK2Uast=true
android.lint.printStackTrace=true
android.uniquePackageNames=true
android.enableAdditionalTestOutput=true
android.useAndroidX=true
android.nonTransitiveRClass=true
android.experimental.lint.missingBaselineIsEmptyBaseline=true
# Remove when AGP defaults to 2.1.0
android.prefabVersion=2.1.0

# Generate versioned API files
androidx.writeVersionedApiFiles=true

androidx.compileSdk=34
androidx.targetSdkVersion=34
androidx.allowCustomCompileSdk=true

# Playground does not support constraints
androidx.constraints=false

# Disable features we do not use
android.defaults.buildfeatures.resvalues=false
android.defaults.buildfeatures.shaders=false

# Enable adding baseline-prof.txt files to AAR artifacts
android.experimental.enableArtProfiles=true
# Disables dependency constraints for libraries (b/276714425)
android.experimental.dependency.excludeLibraryComponentsFromConstraints=true
# Disallow resolving dependencies at configuration time, which is a slight performance problem
android.dependencyResolutionAtConfigurationTime.disallow=true
android.suppressUnsupportedOptionWarnings=android.suppressUnsupportedOptionWarnings,android.dependencyResolutionAtConfigurationTime.disallow,android.experimental.lint.missingBaselineIsEmptyBaseline,android.lint.printStackTrace,android.lint.baselineOmitLineNumbers,android.experimental.disableCompileSdkChecks,android.overrideVersionCheck,android.r8.maxWorkers,android.experimental.lint.reservedMemoryPerTask,android.experimental.dependency.excludeLibraryComponentsFromConstraints,android.prefabVersion,android.experimental.privacysandboxsdk.plugin.enable,android.experimental.privacysandboxsdk.requireServices,android.lint.useK2Uast,android.experimental.skipApksViaBundleIfPossible
# Workaround for b/162074215
android.includeDependencyInfoInApks=false

kotlin.stdlib.default.dependency=false
# mac targets cannot be built on linux, suppress the warning.
kotlin.native.ignoreDisabledTargets=true
kotlin.mpp.enableCInteropCommonization=true
# Suppress pointless warning about mpp being experimental
kotlin.mpp.stability.nowarn=true
# b/227307216
kotlin.mpp.absentAndroidTarget.nowarn=true

# Properties we often want to toggle
# ksp.version.check=false

kotlin.mpp.androidSourceSetLayoutVersion=2
# Suppress warnings about https://kotl.in/hierarchy-template
kotlin.mpp.applyDefaultHierarchyTemplate=false

# Enable com.android.privacy-sandbox-sdk plugin
android.experimental.privacysandboxsdk.plugin.enable=true
# Allow non-shim usage
android.experimental.privacysandboxsdk.requireServices=false
# Use fast-path APKs from AGP, ensuring that single APK will be used (for FTL configs)
android.experimental.skipApksViaBundleIfPossible=true
