forked from wordpress-mobile/WordPress-Android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.gradle
92 lines (80 loc) · 3.66 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
plugins {
id "com.gradle.enterprise" version "3.4.1"
}
include ':WordPress'
include ':libs:stories-android:stories'
project(':libs:stories-android:stories').projectDir = new File(rootProject.projectDir, 'libs/stories-android/stories')
include ':mp4compose'
project(':mp4compose').projectDir = new File(rootProject.projectDir, 'libs/stories-android/mp4compose')
include ':photoeditor'
project(':photoeditor').projectDir = new File(rootProject.projectDir, 'libs/stories-android/photoeditor')
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 = "com.github.wordpress-mobile.WordPress-FluxC-Android"
gradle.ext.wputilsBinaryPath = "org.wordpress:utils"
gradle.ext.gutenbergMobileBinaryPath = "org.wordpress-mobile.gutenberg-mobile:react-native-gutenberg-bridge"
gradle.ext.loginFlowBinaryPath = "org.wordpress:login"
gradle.ext.includedBuildGutenbergMobilePath = null
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:fluxc") 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')
}
}
}
}
// Build cache is only enabled for CI, at least for now
if (System.getenv().containsKey("CI")) {
buildCache {
remote(HttpBuildCache) {
url = "http://10.0.2.215:5071/cache/"
allowUntrustedServer = true
allowInsecureProtocol = true
push = true
}
}
}