Skip to content

Commit bfcd851

Browse files
author
Pete Bentley
committed
Add a property for skipping Android subprojects.
1 parent 827d29f commit bfcd851

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
android.useAndroidX=true
2+
# Set to false in $HOME/.gradle/gradle.properties (or pass -Pconscrypt.includeAndroid=false)
3+
# to exclude Android sub-projects, e.g. when iterating on common/ code.
4+
conscrypt.includeAndroid=true

settings.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ dependencyResolutionManagement {
1414
}
1515

1616
rootProject.name = "conscrypt"
17-
if (System.env.ANDROID_HOME && file(System.env.ANDROID_HOME).exists()) {
17+
if (providers.gradleProperty('conscrypt.includeAndroid').getOrElse('true').toBoolean()
18+
&& System.env.ANDROID_HOME && file(System.env.ANDROID_HOME).exists()) {
1819
include ":conscrypt-android"
1920
include ":conscrypt-android-platform"
2021
include ":conscrypt-android-stub"
@@ -27,7 +28,9 @@ if (System.env.ANDROID_HOME && file(System.env.ANDROID_HOME).exists()) {
2728
project(':conscrypt-benchmark-android').projectDir = "$rootDir/benchmark-android" as File
2829
project(':conscrypt-libcore-stub').projectDir = "$rootDir/libcore-stub" as File
2930
} else {
30-
logger.warn('Android SDK has not been detected. Skipping Android projects.')
31+
logger.warn('Android projects not included. ' +
32+
'Ensure ANDROID_HOME is set and set conscrypt.includeAndroid=true ' +
33+
'in gradle.properties to include them.')
3134
}
3235

3336
include ":conscrypt-api-doclet"

0 commit comments

Comments
 (0)