For preview versions that is the last stable version, and the {@link
+ * StringOption#IDE_TARGET_DEVICE_CODENAME} will also be set.
+ */
+ IDE_TARGET_DEVICE_API(PROPERTY_BUILD_API, ApiStage.Stable),
+
+ /**
+ * Size of the buffers in kilobytes used to read .class files and storage for writing .dex files
+ * translations into.
+ */
+ DEXING_READ_BUFFER_SIZE("android.dexingReadBuffer.size", ApiStage.Experimental),
+ DEXING_WRITE_BUFFER_SIZE("android.dexingWriteBuffer.size", ApiStage.Experimental),
+
+ /** Number of buckets used by `DexArchiveBuilderTask` and `DexMergingTask`. */
+ DEXING_NUMBER_OF_BUCKETS("android.dexingNumberOfBuckets", ApiStage.Experimental),
+
+ /**
+ * Maximum number of dynamic features that can be allocated before Oreo platforms.
+ */
+ PRE_O_MAX_NUMBER_OF_FEATURES("android.maxNumberOfFeaturesBeforeOreo", ApiStage.Experimental),
+
+ /**
+ * Override the thread pool size dedicated to AAPT2 work units when not running with WorkerAPI.
+ */
+ AAPT2_THREAD_POOL_SIZE("android.aapt2ThreadPoolSize", ApiStage.Experimental),
+
+ /**
+ * Max number of R8 workers to run at once
+ */
+ R8_MAX_WORKERS("android.r8.maxWorkers", ApiStage.Experimental),
+
+ /**
+ * Flags for Android Test Retention
+ * >=1: enable Android Test Retention and set it as maximum number of snapshots.
+ * 0: disable Android Test Retention.
+ * <0: enable Android Test Retention with unlimited number of snapshots.
+ */
+ TEST_FAILURE_RETENTION("android.experimental.testOptions.emulatorSnapshots.maxSnapshotsForTestFailures", ApiStage.Experimental),
+
+ /**
+ * The number of shards ran on Managed Devices during testing.
+ */
+ MANAGED_DEVICE_SHARD_POOL_SIZE("android.experimental.androidTest.numManagedDeviceShards", ApiStage.Experimental),
+
+ /**
+ * The timeout duration in minute for Gradle Managed Device setup steps (booting AVD and creating snapshot image)
+ * If the value is 0 or negative value, it will never time out.
+ */
+ GRADLE_MANAGED_DEVICE_SETUP_TIMEOUT_MINUTES("android.experimental.testOptions.managedDevices.setupTimeoutMinutes", ApiStage.Experimental),
+
+ /**
+ * Maximum number of concurrent Gradle Managed Devices (AVDs) to be active at any one point in time.
+ *
+ * If the value is 0 or negative value, there is no maximum devices.
+ */
+ GRADLE_MANAGED_DEVICE_MAX_CONCURRENT_DEVICES("android.experimental.testOptions.managedDevices.maxConcurrentDevices", ApiStage.Experimental),
+
+ /**
+ * The timeout duration in seconds for install apk
+ * If the value is 0 or negative value, it will be set to a default value by UTP.
+ */
+ INSTALL_APK_TIMEOUT("android.experimental.testOptions.installApkTimeout", ApiStage.Experimental),
+ /* ------------
+ * REMOVED APIS
+ */
+
+ THREAD_POOL_SIZE(
+ "android.threadPoolSize",
+ ApiStage.Removed(
+ VERSION_BEFORE_4_0,
+ "The android.threadPoolSize property has no effect"
+ )
+ ),
+
+ ;
+
+ override val status = stage.status
+
+ override fun parse(value: Any): Int {
+ if (value is CharSequence) {
+ try {
+ return Integer.parseInt(value.toString())
+ } catch (ignored: NumberFormatException) {
+ // Throws below.
+ }
+
+ }
+ if (value is Number) {
+ return value.toInt()
+ }
+ throw IllegalArgumentException(
+ "Cannot parse project property "
+ + this.propertyName
+ + "='"
+ + value
+ + "' of type '"
+ + value.javaClass
+ + "' as integer."
+ )
+ }
+}
diff --git a/subprojects/builder-model-impl/src/main/java/com/android/build/gradle/options/Option.kt b/subprojects/builder-model-impl/src/main/java/com/android/build/gradle/options/Option.kt
new file mode 100644
index 000000000..104f79388
--- /dev/null
+++ b/subprojects/builder-model-impl/src/main/java/com/android/build/gradle/options/Option.kt
@@ -0,0 +1,93 @@
+/*
+ * This file is part of AndroidIDE.
+ *
+ * AndroidIDE is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AndroidIDE is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with AndroidIDE. If not, see > {
return if (this.projects.isNotEmpty()) {
@@ -64,23 +64,23 @@ open class CachingProject(val project: IProject) : IProject {
}
}
- override fun getProjectSyncIssues(): CompletableFuture