Tachiyomi-Extensions/settings.gradle.kts

86 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
New Lib: Text Interceptor (#13859) * move TextInterceptor to `lib` to be used for author notes, image alt texts and what not * refactor Tapastic to use `lib:extensions-lib` * Refactor Webtoons to use `:lib-textinterceptor` this turned out to be more complicated than I thought it'd be TextInterceptor was used for Author Notes which, looking at previous messages, was only intended to be added to Webtoons Source and not the entire webtoons multisrc (i.e. WebtoonsTranslate and DongmanManhua don't seem to be making use of the Show Author's Notes setting). This was in my favor, since having to deal with additional.gradle to add dependencies to multisrc files doesn't seem to work... I'll ask previous contributors just in case * Fix `json` access missed this while copying over code from `generated-src` to `multisrc/{overrides,src}` * remove unused import * make HOST name more clear couldve used a better schema but that's something for some other time also put the HOST in the lib itself so that one doesn't lose track of it in the extensions * use android provided methods instead of hardcoding based on https://github.com/tachiyomiorg/tachiyomi-extensions/pull/13859/files#r996276738 that suggested the following SO answer: https://github.com/tachiyomiorg/tachiyomi-extensions/pull/13859/files * remove unused import * move url generation to helper function * fix error oops sorry for that happened when I was copy pasting back and forth between two sources and one generated source Co-authored-by: Navaneeth M Nambiar <nmnambiar@hornbill>
2023-01-11 17:34:06 +00:00
listOf("dataimage", "unpacker", "cryptoaes", "textinterceptor").forEach {
include(":lib-$it")
project(":lib-$it").projectDir = File("lib/$it")
}
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) }
}