-
-
Notifications
You must be signed in to change notification settings - Fork 124
Expand file tree
/
Copy pathsettings.gradle.kts
More file actions
71 lines (63 loc) · 2.03 KB
/
settings.gradle.kts
File metadata and controls
71 lines (63 loc) · 2.03 KB
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
@file:Suppress("UnstableApiUsage")
import java.util.Properties
val localProps = Properties().apply {
val file = rootDir.resolve("local.properties")
if (file.exists()) file.inputStream().use(::load)
}
fun githubUser(): String? =
localProps.getProperty("gpr.user")
?: providers.gradleProperty("gpr.user").orNull
?: System.getenv("GITHUB_ACTOR")
fun githubToken(): String? =
localProps.getProperty("gpr.key")
?: providers.gradleProperty("gpr.key").orNull
?: System.getenv("GITHUB_TOKEN")
pluginManagement {
repositories {
mavenLocal()
mavenCentral()
google()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenLocal()
mavenCentral()
google()
maven("https://jitpack.io") {
metadataSources {
mavenPom()
artifact()
}
}
maven {
// A repository must be specified for some reason. "registry" is a dummy.
url = uri("https://maven.pkg.github.com/MorpheApp/registry")
credentials {
val gprUser: String? = githubUser()
val gprKey: String? = githubToken()
username = gprUser.orEmpty().ifBlank { "anonymous" }
password = gprKey.orEmpty()
}
}
}
}
rootProject.name = "morphe-manager"
include(":app")
// Include morphe-patcher and morphe-library as composite builds if they exist locally
mapOf(
"morphe-patcher" to "app.morphe:morphe-patcher",
// "morphe-library" to "app.morphe:morphe-library", // FIXME: Must upgrade library gradle to use this
// "ARSCLib" to "com.github.REAndroid:arsclib"
).forEach { (libraryPath, libraryName) ->
val libDir = file("../$libraryPath")
if (libDir.exists()) {
includeBuild(libDir) {
dependencySubstitution {
substitute(module(libraryName)).using(project(":"))
}
}
}
}