Tachiyomi-Extensions/settings.gradle.kts

86 lines
2.9 KiB
Plaintext
Raw Normal View History

2020-12-20 17:16:23 +00:00
include(":core")
2020-06-26 02:45:45 +00:00
// Load all modules under /lib
Random User-Agent Refactor (#17059) * lib-randomua * NHentai: Random mobile ua * Madara random UA overhaul * MangaThemesia random UA overhaul * MangaHub random UA overhaul * build errors and warnings * remove preference from Constellar * change to singleton object * network.client * fix copy paste and chapter deep link * exit early * use data class and enum options * missing import * suggested changes Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com> * re-add empty check to filters * convert to interceptor * update comment Co-authored-by: Alessandro Jean <14254807+alessandrojean@users.noreply.github.com> * update error message * initialize client by lazy * dont check on excluded Filters Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com> * newlines * move preference helper function into lib * move preference helper function into lib x2 * move check to lib too * move defaultRandomUserAgentType to constructor * rename the interceptor * organize the interceptor and preference stuff in different files * hide custom ua setting when random ua is enabled * English Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com> * catch specific exception Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com> * setVisible() fresh stuff * setVisible() fresh stuff * change summary * workaround * Update error message Co-authored-by: Alessandro Jean <14254807+alessandrojean@users.noreply.github.com> * Update comment Co-authored-by: Alessandro Jean <14254807+alessandrojean@users.noreply.github.com> --------- Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com> Co-authored-by: Alessandro Jean <14254807+alessandrojean@users.noreply.github.com>
2023-07-15 22:52:35 +00:00
File(rootDir, "lib").eachDir {
val libName = it.name
include(":lib-$libName")
project(":lib-$libName").projectDir = File("lib/$libName")
}
2022-06-05 00:55:39 +00:00
if (System.getenv("CI") == null || System.getenv("CI_MODULE_GEN") == "true") {
2021-06-20 21:45:22 +00:00
// Local development (full project build)
2021-02-13 00:05:45 +00:00
include(":multisrc")
project(":multisrc").projectDir = File("multisrc")
/**
* Add or remove modules to load as needed for local development here.
* To generate multisrc extensions first, run the `:multisrc:generateExtensions` task first.
2021-02-13 00:05:45 +00:00
*/
loadAllIndividualExtensions()
loadAllGeneratedMultisrcExtensions()
2024-01-09 00:41:44 +00:00
// loadIndividualExtension("all", "mangadex")
// loadGeneratedMultisrcExtension("en", "guya")
2021-02-13 00:05:45 +00:00
} else {
// Running in CI (GitHub Actions)
val isMultisrc = System.getenv("CI_MULTISRC") == "true"
if (isMultisrc) {
include(":multisrc")
project(":multisrc").projectDir = File("multisrc")
// Loads generated extensions from multisrc
2024-01-09 03:14:00 +00:00
File(rootDir, "generated-src").eachDir { dir ->
dir.eachDir { subdir ->
val name = ":extensions:multisrc:${dir.name}:${subdir.name}"
println(name)
include(name)
project(name).projectDir = File("generated-src/${dir.name}/${subdir.name}")
}
2021-02-13 00:05:45 +00:00
}
} else {
2022-06-05 00:55:39 +00:00
// Loads individual extensions
2024-01-09 03:14:00 +00:00
File(rootDir, "src").eachDir { dir ->
dir.eachDir { subdir ->
val name = ":extensions:individual:${dir.name}:${subdir.name}"
println(name)
include(name)
project(name).projectDir = File("src/${dir.name}/${subdir.name}")
}
2021-02-13 00:05:45 +00:00
}
}
}
fun loadAllIndividualExtensions() {
File(rootDir, "src").eachDir { dir ->
dir.eachDir { subdir ->
val name = ":extensions:individual:${dir.name}:${subdir.name}"
include(name)
project(name).projectDir = File("src/${dir.name}/${subdir.name}")
}
}
}
fun loadAllGeneratedMultisrcExtensions() {
File(rootDir, "generated-src").eachDir { dir ->
dir.eachDir { subdir ->
val name = ":extensions:multisrc:${dir.name}:${subdir.name}"
include(name)
project(name).projectDir = File("generated-src/${dir.name}/${subdir.name}")
}
}
}
fun loadIndividualExtension(lang: String, name: String) {
val projectName = ":extensions:individual:$lang:$name"
include(projectName)
project(projectName).projectDir = File("src/${lang}/${name}")
}
fun loadGeneratedMultisrcExtension(lang: String, name: String) {
val projectName = ":extensions:multisrc:$lang:$name"
include(projectName)
project(projectName).projectDir = File("generated-src/${lang}/${name}")
}
2022-06-05 00:55:39 +00:00
fun File.eachDir(block: (File) -> Unit) {
2020-06-26 02:45:45 +00:00
listFiles()?.filter { it.isDirectory }?.forEach { block(it) }
2024-01-09 03:14:00 +00:00
}