-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathsettings.gradle
190 lines (171 loc) · 8.2 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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
pluginManagement {
gradle.ext.kotlinVersion = '1.6.10'
gradle.ext.agpVersion = '7.1.1'
gradle.ext.daggerVersion = "2.41"
gradle.ext.detektVersion = '1.15.0'
gradle.ext.navComponentVersion = '2.4.2'
plugins {
id "org.jetbrains.kotlin.android" version gradle.ext.kotlinVersion
id "org.jetbrains.kotlin.jvm" version gradle.ext.kotlinVersion
id "org.jetbrains.kotlin.kapt" version gradle.ext.kotlinVersion
id "org.jetbrains.kotlin.plugin.serialization" version gradle.ext.kotlinVersion
id "org.jetbrains.kotlin.plugin.parcelize" version gradle.ext.kotlinVersion
id "org.jetbrains.kotlin.plugin.allopen" version gradle.ext.kotlinVersion
id "com.android.application" version gradle.ext.agpVersion
id "com.android.library" version gradle.ext.agpVersion
id 'com.google.gms.google-services' version '4.3.8'
id "io.sentry.android.gradle" version "2.0.0"
id "io.gitlab.arturbosch.detekt" version gradle.ext.detektVersion
id "se.bjurr.violations.violation-comments-to-github-gradle-plugin" version "1.67"
id "com.automattic.android.fetchstyle" version "1.1"
id "androidx.navigation.safeargs.kotlin" version gradle.ext.navComponentVersion
}
repositories {
maven {
url 'https://a8c-libs.s3.amazonaws.com/android'
content {
includeGroup "com.automattic.android"
}
}
gradlePluginPortal()
google()
}
resolutionStrategy {
eachPlugin {
// TODO: Remove this when fetchstyle starts supporting Plugin Marker Artifacts
if (requested.id.id == "com.automattic.android.fetchstyle") {
useModule("com.automattic.android:fetchstyle:1.1")
}
// TODO: Remove this when 'dagger.hilt' starts supporting Plugin Marker Artifacts
if (requested.id.id == 'dagger.hilt.android.plugin') {
useModule("com.google.dagger:hilt-android-gradle-plugin:$gradle.ext.daggerVersion")
}
}
}
}
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"} }
}
}
}
}
rootProject.name = 'WPAndroid'
include ':WordPress'
include ':libs:image-editor:ImageEditor'
include ':libs:networking:WordPressNetworking'
include ':libs:analytics'
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')
}
}
}
}