forked from woocommerce/woocommerce-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.gradle
118 lines (105 loc) · 4.98 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
pluginManagement {
gradle.ext.agpVersion = '7.1.1'
gradle.ext.daggerVersion = '2.40.5'
gradle.ext.detektVersion = '1.19.0'
gradle.ext.kotlinVersion = '1.6.10'
gradle.ext.navigationVersion = '2.4.1'
repositories {
gradlePluginPortal()
google()
}
plugins {
id 'androidx.navigation.safeargs.kotlin' version gradle.ext.navigationVersion
id 'com.android.application' version gradle.ext.agpVersion
id 'com.android.library' version gradle.ext.agpVersion
id 'com.automattic.android.fetchstyle'
id 'com.google.gms.google-services' version '4.3.8'
id 'io.github.wzieba.tracks.plugin' version '1.0.0'
id 'io.gitlab.arturbosch.detekt' version gradle.ext.detektVersion
id 'io.sentry.android.gradle' version '2.1.5'
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.allopen' version gradle.ext.kotlinVersion
id 'org.jetbrains.kotlin.plugin.parcelize' version gradle.ext.kotlinVersion
id 'se.bjurr.violations.violation-comments-to-github-gradle-plugin' version '1.68.3'
}
resolutionStrategy {
eachPlugin {
if (requested.id.id == 'dagger.hilt.android.plugin') {
useModule("com.google.dagger:hilt-android-gradle-plugin:$gradle.ext.daggerVersion")
}
// TODO: Remove this as soon as fetchstyle starts supporting Plugin Marker Artifacts
if (requested.id.id == "com.automattic.android.fetchstyle") {
useModule("com.automattic.android:fetchstyle:1.1")
}
}
}
}
plugins {
id 'com.gradle.enterprise' version '3.8.1'
}
include ':quicklogin'
include ':libs:cardreader'
include ':WooCommerce'
gradle.ext.fluxCBinaryPath = "org.wordpress:fluxc"
gradle.ext.fluxCWooCommercePluginBinaryPath = "org.wordpress.fluxc.plugins:woocommerce"
gradle.ext.loginFlowBinaryPath = "org.wordpress:login"
gradle.ext.mediaPickerBinaryPath = "org.wordpress:mediapicker"
gradle.ext.mediaPickerDomainBinaryPath = "org.wordpress.mediapicker:domain"
gradle.ext.mediaPickerSourceDeviceBinaryPath = "org.wordpress.mediapicker:source-device"
gradle.ext.mediaPickerSourceGifBinaryPath = "org.wordpress.mediapicker:source-gif"
gradle.ext.mediaPickerSourceWordPressBinaryPath = "org.wordpress.mediapicker:source-wordpress"
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')
substitute module(gradle.ext.fluxCWooCommercePluginBinaryPath) with project(':plugins:woocommerce')
}
}
}
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("localMediaPickerPath")) {
includeBuild(ext.localMediaPickerPath) {
dependencySubstitution {
println "Substituting media-picker with the local build"
substitute module("$gradle.ext.mediaPickerBinaryPath") with project(':mediapicker')
substitute module("$gradle.ext.mediaPickerDomainBinaryPath") with project(':mediapicker:domain')
substitute module("$gradle.ext.mediaPickerSourceDeviceBinaryPath") with project(':mediapicker:source-device')
substitute module("$gradle.ext.mediaPickerSourceGifBinaryPath") with project(':mediapicker:source-gif')
substitute module("$gradle.ext.mediaPickerSourceWordPressBinaryPath") with project(':mediapicker:source-wordpress')
}
}
}
}
// Use the build cache in CI
if (System.getenv().containsKey("CI")) {
buildCache {
remote(HttpBuildCache) {
url = "http://10.0.2.215:5071/cache/"
allowUntrustedServer = true
allowInsecureProtocol = true
push = true
}
}
}