Add minimal gradle.properties to playground buidls
Latest AGP reads certain properties at configuration time which prevents
us from setting them via the settings file.
This CL adds a common shared properties file to playground projects that
only includes a subset of properties set in the AndroidX
gradle.properties file.
As that file is not allowed to include anything that is not defined in
androidX, the itegrity is checked in ValidatePlaygroundGradleProperties
task which is now included in the buildOnServer task dependencies for
the main AndroidX build.
Test: cd room && ./gradlew bOS
Change-Id: Ieb5e8a646872119b348718eaef3ab4729b4c8bbb
diff --git a/playground-common/androidx-shared.properties b/playground-common/androidx-shared.properties
new file mode 100644
index 0000000..606adab
--- /dev/null
+++ b/playground-common/androidx-shared.properties
@@ -0,0 +1,33 @@
+#
+# 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.
+
+android.useAndroidX=true
+# Disable features we do not use
+android.defaults.buildfeatures.aidl=false
+android.defaults.buildfeatures.buildconfig=false
+android.defaults.buildfeatures.renderscript=false
+android.defaults.buildfeatures.resvalues=false
+android.defaults.buildfeatures.shaders=false