mirror of
https://github.com/alesimula/Murine-launcher.git
synced 2026-10-28 09:43:42 +00:00
81 lines
2.9 KiB
Groovy
81 lines
2.9 KiB
Groovy
pluginManagement {
|
|
repositories {
|
|
google {
|
|
content {
|
|
includeGroupByRegex("com\\.android.*")
|
|
includeGroupByRegex("com\\.google.*")
|
|
includeGroupByRegex("androidx.*")
|
|
}
|
|
}
|
|
google()
|
|
mavenCentral()
|
|
gradlePluginPortal()
|
|
}
|
|
}
|
|
|
|
dependencyResolutionManagement {
|
|
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
|
repositories {
|
|
google {
|
|
content {
|
|
includeGroupByRegex("com\\.android.*")
|
|
includeGroupByRegex("com\\.google.*")
|
|
includeGroupByRegex("androidx.*")
|
|
}
|
|
}
|
|
google()
|
|
mavenCentral()
|
|
maven { url = 'https://jitpack.io' }
|
|
gradlePluginPortal()
|
|
}
|
|
}
|
|
|
|
|
|
// Previous explicit form, kept in case a module ever needs a project name that differs
|
|
// from its folder (that is what the map used to provide):
|
|
//// All modules; any child folder holding a build script becomes a subproject of it.
|
|
//[
|
|
// 'IconLoader' : 'iconloaderlib',
|
|
// 'Animation' : 'animationlib',
|
|
// 'Shared' : 'shared',
|
|
// 'WMShared' : 'wm_shared',
|
|
// 'msdl' : 'msdllib',
|
|
// 'flags' : 'flagslib',
|
|
// 'HiddenApi' : 'hidden-api',
|
|
// 'systemUIPluginCore': 'systemUIPluginCore',
|
|
// 'androidx-lib' : 'androidx-lib',
|
|
// 'compatLib' : 'compatLib',
|
|
// 'SettingsLib' : 'SettingsLib'
|
|
//].each { name, dir ->
|
|
// File root = new File(rootDir, "modules/$dir")
|
|
// include ":$name"
|
|
// project(":$name").projectDir = root // set before children resolve against it
|
|
// root.listFiles()
|
|
// .findAll { new File(it, 'build.gradle').exists() || new File(it, 'build.gradle.kts').exists() }
|
|
// .sort { it.name }
|
|
// .each { include ":$name:${it.name}" }
|
|
//}
|
|
|
|
// Included so the IDE marks modules/ as a module too; it holds no build script itself.
|
|
include ':modules'
|
|
|
|
final File MODULES_DIR = new File(rootDir, 'modules')
|
|
|
|
// Folders under modules/ that are not projects themselves but hold subprojects.
|
|
final List<String> MODULE_CONTAINERS = [
|
|
'SettingsLib'
|
|
]
|
|
|
|
def isProject = { File f ->
|
|
f.isDirectory() && (new File(f, 'build.gradle').exists() || new File(f, 'build.gradle.kts').exists())
|
|
}
|
|
|
|
// A folder under modules/ is a project if it has a build script (or is listed as a container);
|
|
// only then are its children scanned for subprojects.
|
|
MODULES_DIR.listFiles().findAll { it.isDirectory() }.sort { it.name }.each { File dir ->
|
|
if (!isProject(dir) && !(dir.name in MODULE_CONTAINERS)) return
|
|
include ":${dir.name}"
|
|
project(":${dir.name}").projectDir = dir // set before children resolve against it
|
|
dir.listFiles().findAll(isProject).sort { it.name }.each { include ":${dir.name}:${it.name}" }
|
|
}
|