forked from square/anvil
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.gradle
72 lines (67 loc) · 2.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
pluginManagement {
repositories {
google()
gradlePluginPortal()
mavenCentral()
}
}
dependencyResolutionManagement {
versionCatalogs {
Map<String, String> overrides = new LinkedHashMap()
System.getProperties().forEach { key, value ->
String keyString = key.toString()
if (keyString.startsWith("override_")) {
overrides.put(keyString, value.toString())
if (keyString.endsWith("_kotlin")) {
// TODO hardcoded to match what's in libs.versions.toml, but kinda ugly
overrides.put("override_ksp", "$value-1.0.11")
}
}
}
libs {
for (Map.Entry<String, String> entry : overrides.entrySet()) {
String key = entry.getKey()
String value = entry.getValue()
String catalogKey = key.substring("override_".length())
println("Overriding $catalogKey with $value")
version(catalogKey, value)
}
}
}
repositories {
google()
mavenCentral()
if (hasProperty("anvil.allowSnapshots")) {
maven { url 'https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev' }
maven { url 'https://maven.pkg.jetbrains.space/kotlin/p/kotlin/bootstrap' }
maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots' }
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
}
}
include ':annotations'
include ':annotations-optional'
include ':compiler'
include ':compiler-api'
include ':compiler-utils'
include ':integration-tests:code-generator'
include ':integration-tests:code-generator-tests'
include ':integration-tests:dagger-factories-only'
include ':integration-tests:library'
include ':integration-tests:mpp:android-module'
include ':integration-tests:mpp:jvm-module'
include ':integration-tests:tests'
include ':sample:app'
include ':sample:library'
include ':sample:scopes'
// Use the local version instead of a remote artifact.
includeBuild('gradle-plugin') {
dependencySubstitution {
substitute module('com.squareup.anvil:gradle-plugin') using project(':')
}
}
// Include the benchmark modules if they exist.
def benchmarkSettingsFile = file('benchmark/settings.gradle')
if (benchmarkSettingsFile.exists()) {
apply from: benchmarkSettingsFile
}