-
Notifications
You must be signed in to change notification settings - Fork 273
/
settings.gradle
64 lines (61 loc) · 2.19 KB
/
settings.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
plugins {
id("com.github.burrunan.s3-build-cache") version "1.2"
id("com.gradle.enterprise") version "3.7"
}
include (
':stream-chat-android-ui-utils',
':stream-chat-android-ui-common',
':stream-chat-android-ui-components',
':stream-chat-android-ui-components-sample',
':stream-chat-android-ui-guides',
':stream-chat-android-state',
':stream-chat-android-offline',
':stream-chat-android-client',
':stream-chat-android-client-test',
':stream-chat-android-core',
':stream-chat-android-test',
':stream-chat-android-docs',
':stream-chat-android-previewdata',
':stream-chat-android-compose',
':stream-chat-android-compose-sample',
':stream-chat-android-markdown-transformer',
':stream-chat-android-ui-uitests',
':stream-chat-android-benchmark',
)
buildCache {
local {
enabled = !System.getenv().containsKey("CI")
removeUnusedEntriesAfterDays = 7
}
Properties localProperties = new Properties()
File file = new File("local.properties")
if (file.exists()) {
file.newDataInputStream().withCloseable { localProperties.load(it) }
}
String streamAWSRegion = localProperties.get("buildCache.AWSRegion") ?: System.getenv("BUILD_CACHE_AWS_REGION") ?: ""
String streamAWSBucket = localProperties.get("buildCache.AWSBucket") ?: System.getenv("BUILD_CACHE_AWS_BUCKET") ?: ""
String streamAWSAccessKeyId = localProperties.get("buildCache.AWSAccessKeyId") ?: System.getenv("BUILD_CACHE_AWS_ACCESS_KEY_ID") ?: ""
String streamAWSSecretKey = localProperties.get("buildCache.AWSSecretKey") ?: System.getenv("BUILD_CACHE_AWS_SECRET_KEY") ?: ""
Boolean streamBuildCacheDisabled = Boolean.parseBoolean(localProperties.get("buildCache.disabled"))
if (!streamBuildCacheDisabled &&
!streamAWSRegion.isBlank() &&
!streamAWSBucket.isBlank() &&
!streamAWSAccessKeyId.isBlank() &&
!streamAWSSecretKey.isBlank()
) {
remote(com.github.burrunan.s3cache.AwsS3BuildCache) {
region = streamAWSRegion
bucket = streamAWSBucket
prefix = 'cache/'
awsAccessKeyId = streamAWSAccessKeyId
awsSecretKey = streamAWSSecretKey
push = System.getenv().containsKey("CI")
}
}
}
gradleEnterprise {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
}
}