Tachiyomi-Extensions/settings.gradle.kts

88 lines
3.0 KiB
Plaintext
Raw Normal View History

2020-12-20 17:16:23 +00:00
include(":core")
2020-06-26 02:45:45 +00:00
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
// all the directories under /lib instead of manually adding each to a list
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")
// Loads all extensions
File(rootDir, "src").eachDir { dir ->
dir.eachDir { subdir ->
2021-03-09 22:50:49 +00:00
val name = ":extensions:individual:${dir.name}:${subdir.name}"
2021-02-13 00:05:45 +00:00
include(name)
project(name).projectDir = File("src/${dir.name}/${subdir.name}")
}
2020-12-16 03:18:54 +00:00
}
2022-06-05 00:55:39 +00:00
// Loads all generated extensions from multisrc
2021-02-13 00:05:45 +00:00
File(rootDir, "generated-src").eachDir { dir ->
dir.eachDir { subdir ->
2021-03-09 22:50:49 +00:00
val name = ":extensions:multisrc:${dir.name}:${subdir.name}"
2021-02-13 00:05:45 +00:00
include(name)
project(name).projectDir = File("generated-src/${dir.name}/${subdir.name}")
}
lib-themesources, split Genkan into single-source extensions (#5154) * lib themesources copied from SnakeDoc83/tachiyomi-extensions/library * update to the newer Genkan * update genkan generator * GenkanOriginal * code cleanup * add all Genkan sources * generate inside generated-src, res override * src override * move overrides out of library * move overrides to a better place * remove leftover generated files * remove leftover generated files * add generators main class * comment the code * Now sources are purely generated * uncomment generators * enhance comments * icons by @as280093 * fix pathing issues * nullpointerexception proof * runAllGenerators task * more flexibility in lib structure, fix a fiew errors * update github workflows * correct nonames scans directory name * rename SK Scans to Sleeping Knight Scans * fix typo * update depencencies * remove defaultRes from dependencies * fix bug with nsfw * fix nsfw generation * themesourcesLibraryVersion is included in build.gradle extVersionCode * improve javadoc * fix formatting and language code generation * comply with #5214 * common dependencies * rename and move lib/themesources into /multisrc * use not depricated form * cleanup runAllGenerators task * cleanup even more * oops extra file * remove test code * comments * update docs and refactor * update docs * requested changes * clean up dependencies * sealed dataClass * refactor * refactor string generators * bring back writeAndroidManifest * update overrideVersionCode javadoc * update overrideVersionCode javadoc * move dependency to extension source * refactor runAllGenerators * improve docs * remove extra file
2021-02-06 22:32:04 +00:00
}
2020-06-26 02:45:45 +00:00
2021-02-13 00:05:45 +00:00
/**
* If you're developing locally and only want to work with a single module,
* comment out the parts above and uncomment below.
*/
// val lang = "all"
// val name = "mangadex"
// val projectName = ":extensions:individual:$lang:$name"
// val projectName = ":extensions:multisrc:$lang:$name"
// include(projectName)
// project(projectName).projectDir = File("src/${lang}/${name}")
// project(projectName).projectDir = File("generated-src/${lang}/${name}")
2021-02-13 00:05:45 +00:00
} else {
// Running in CI (GitHub Actions)
val isMultisrc = System.getenv("CI_MULTISRC") == "true"
2022-06-05 00:55:39 +00:00
val chunkSize = System.getenv("CI_CHUNK_SIZE").toInt()
val chunk = System.getenv("CI_CHUNK_NUM").toInt()
2021-02-13 00:05:45 +00:00
if (isMultisrc) {
include(":multisrc")
project(":multisrc").projectDir = File("multisrc")
// Loads generated extensions from multisrc
2022-06-05 00:55:39 +00:00
File(rootDir, "generated-src").getChunk(chunk, chunkSize)?.forEach {
val name = ":extensions:multisrc:${it.parentFile.name}:${it.name}"
println(name)
include(name)
project(name).projectDir = File("generated-src/${it.parentFile.name}/${it.name}")
2021-02-13 00:05:45 +00:00
}
} else {
2022-06-05 00:55:39 +00:00
// Loads individual extensions
File(rootDir, "src").getChunk(chunk, chunkSize)?.forEach {
val name = ":extensions:individual:${it.parentFile.name}:${it.name}"
println(name)
include(name)
project(name).projectDir = File("src/${it.parentFile.name}/${it.name}")
2021-02-13 00:05:45 +00:00
}
}
}
2022-06-05 00:55:39 +00:00
fun File.getChunk(chunk: Int, chunkSize: Int): List<File>? {
return listFiles()
// Lang folder
?.filter { it.isDirectory }
// Extension subfolders
?.mapNotNull { dir -> dir.listFiles()?.filter { it.isDirectory } }
?.flatten()
?.sortedBy { it.name }
?.chunked(chunkSize)
?.get(chunk)
}
fun File.eachDir(block: (File) -> Unit) {
2020-06-26 02:45:45 +00:00
listFiles()?.filter { it.isDirectory }?.forEach { block(it) }
}