-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathsettings.gradle
154 lines (136 loc) · 6.42 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
plugins {
id "com.gradle.enterprise" version "3.9"
id 'com.gradle.common-custom-user-data-gradle-plugin' version '1.6.5'
}
gradleEnterprise {
server = "https://gradle.a8c.com"
allowUntrustedServer = false
buildScan {
def disableGE = System.getenv("GRADLE_ENTERPRISE_ANALYTICS_DISABLE")
if (!(disableGE == "1" || disableGE == "true")) {
publishAlways()
}
capture {
taskInputFiles = true
}
uploadInBackground = System.getenv("CI") == null
if (!System.getenv().containsKey("CI")) {
// Obfuscate personal data unless it's a CI build
obfuscation {
username { username -> System.getenv("GRADLE_ENTERPRISE_ANALYTICS_USERNAME") ?: username }
hostname { hostname -> System.getenv("GRADLE_ENTERPRISE_ANALYTICS_HOSTNAME") ?: hostname }
ipAddresses { addresses -> addresses.collect { address -> "0.0.0.0"} }
}
}
}
}
if (System.getenv().containsKey("CI")) {
buildCache {
remote(HttpBuildCache) {
url = "http://10.0.2.215:5071/cache/"
allowUntrustedServer = true
allowInsecureProtocol = true
push = true
}
}
}
rootProject.name = 'WPAndroid'
include ':WordPress'
include ':libs:image-editor:ImageEditor'
include ':libs:networking:WordPressNetworking'
include ':libs:analytics:WordPressAnalytics'
include ':libs:editor:WordPressEditor'
include ':libs:WordPressProcessors'
include ':libs:WordPressAnnotations'
include ':WordPressMocks'
project(':WordPressMocks').projectDir = new File(rootProject.projectDir, properties.getOrDefault('wp.wordpress_mocks_path', 'libs/mocks') + '/WordPressMocks')
gradle.ext.fluxCBinaryPath = "org.wordpress:fluxc"
gradle.ext.wputilsBinaryPath = "org.wordpress:utils"
gradle.ext.gutenbergMobileBinaryPath = "org.wordpress-mobile.gutenberg-mobile:react-native-gutenberg-bridge"
gradle.ext.includedBuildGutenbergMobilePath = null
gradle.ext.loginFlowBinaryPath = "org.wordpress:login"
gradle.ext.storiesAndroidPath = "com.automattic:stories"
gradle.ext.storiesAndroidMp4ComposePath = "com.automattic.stories:mp4compose"
gradle.ext.storiesAndroidPhotoEditorPath = "com.automattic.stories:photoeditor"
gradle.ext.aztecAndroidAztecPath = "org.wordpress:aztec"
gradle.ext.aztecAndroidWordPressShortcodesPath = "org.wordpress.aztec:wordpress-shortcodes"
gradle.ext.aztecAndroidWordPressCommentsPath = "org.wordpress.aztec:wordpress-comments"
gradle.ext.aztecAndroidGlideLoaderPath = "org.wordpress.aztec:glide-loader"
gradle.ext.aztecAndroidPicassoLoaderPath = "org.wordpress.aztec:picasso-loader"
gradle.ext.aboutAutomatticBinaryPath = "com.automattic:about"
def localBuilds = new File('local-builds.gradle')
if (localBuilds.exists()) {
apply from: localBuilds
/*
In order to add a new included build:
1. Define a property for its path in the `local-builds.gradle-example` file.
2. Check if that property exists in `ext` since it may be commented out.
3. Include the build using the property.
4. Add dependencySubstitution block and substitute the binary module with the project.
Note that `project` dependencies are resolved in the context of the included build.
https://docs.gradle.org/current/javadoc/org/gradle/api/initialization/ConfigurableIncludedBuild.html#dependencySubstitution-org.gradle.api.Action-
*/
if (ext.has("localFluxCPath")) {
includeBuild(ext.localFluxCPath) {
dependencySubstitution {
println "Substituting fluxc with the local build"
substitute module("$gradle.ext.fluxCBinaryPath") with project(':fluxc')
}
}
}
if (ext.has("localWPUtilsPath")) {
includeBuild(ext.localWPUtilsPath) {
dependencySubstitution {
println "Substituting wputils with the local build"
substitute module("$gradle.ext.wputilsBinaryPath") with project(':WordPressUtils')
}
}
}
if (ext.has("localGutenbergMobilePath")) {
gradle.ext.includedBuildGutenbergMobilePath = ext.localGutenbergMobilePath
includeBuild("$ext.localGutenbergMobilePath/gutenberg/packages/react-native-bridge/android") {
dependencySubstitution {
println "Substituting gutenberg-mobile with the local build"
substitute module("$gradle.ext.gutenbergMobileBinaryPath") with project(':react-native-bridge')
}
}
}
if (ext.has("localLoginFlowPath")) {
includeBuild(ext.localLoginFlowPath) {
dependencySubstitution {
println "Substituting login-flow with the local build"
substitute module("$gradle.ext.loginFlowBinaryPath") with project(':WordPressLoginFlow')
}
}
}
if (ext.has("localStoriesAndroidPath")) {
includeBuild(ext.localStoriesAndroidPath) {
dependencySubstitution {
println "Substituting stories-android with the local build"
substitute module("$gradle.ext.storiesAndroidPath") with project(':stories')
substitute module("$gradle.ext.storiesAndroidMp4ComposePath") with project(':mp4compose')
substitute module("$gradle.ext.storiesAndroidPhotoEditorPath") with project(':photoeditor')
}
}
}
if (ext.has("localAztecAndroidPath")) {
includeBuild(ext.localAztecAndroidPath) {
dependencySubstitution {
println "Substituting AztecEditor-Android with the local build"
substitute module("$gradle.ext.aztecAndroidAztecPath") with project(':aztec')
substitute module("$gradle.ext.aztecAndroidWordPressShortcodesPath") with project(':wordpress-shortcodes')
substitute module("$gradle.ext.aztecAndroidWordPressCommentsPath") with project(':wordpress-comments')
substitute module("$gradle.ext.aztecAndroidGlideLoaderPath") with project(':glide-loader')
substitute module("$gradle.ext.aztecAndroidPicassoLoaderPath") with project(':picasso-loader')
}
}
}
if (ext.has("localAboutAutomatticPath")) {
includeBuild(ext.localAboutAutomatticPath) {
dependencySubstitution {
println "Substituting about-automattic with the local build"
substitute module("$gradle.ext.aboutAutomatticBinaryPath") using project(':library')
}
}
}
}