Compare commits
56 Commits
c5c6d77479
...
9602aa5dd5
Author | SHA1 | Date |
---|---|---|
AwkwardPeak7 | 9602aa5dd5 | |
AwkwardPeak7 | 9fa6b8cb51 | |
AwkwardPeak7 | 8e7bba9d87 | |
Chopper | 42d15fed81 | |
Chopper | 913ceb3017 | |
Vetle Ledaal | 2de6f14215 | |
Cuong M. Tran | 9ab07589ad | |
Tef | bf1fc04a2e | |
bapeey | d97962de20 | |
Vetle Ledaal | 63c57ec13e | |
bapeey | 0d2056cabf | |
Secozzi | ca8faa3a7e | |
bapeey | 3ce4e729f9 | |
beerpsi | ea913b5957 | |
beerpsi | 27c4ed1430 | |
beerpsi | e95e761833 | |
beerpsi | bf53943984 | |
beerpsi | 42ad2a5859 | |
beerpsi | a5e314f149 | |
beerpsi | fac4fa1278 | |
beerpsi | 3e9c022f6a | |
beerpsi | a799bf8a5c | |
beerpsi | 93c5dbc650 | |
beerpsi | 5acf24daa9 | |
beerpsi | da8c562990 | |
bapeey | 41b6762f16 | |
bapeey | fd7c47329b | |
Chopper | 71e3830576 | |
stevenyomi | 0edd4a94c0 | |
beerpsi | beb88a4d60 | |
AwkwardPeak7 | 489729f52b | |
Secozzi | df9983f9b0 | |
Tef | 6ac91bca39 | |
Secozzi | c24753e7e7 | |
Secozzi | fa74b489b2 | |
beerpsi | 943516d451 | |
beerpsi | d91b683ee2 | |
BrutuZ | 95caddf343 | |
bapeey | 791d48fce1 | |
everfio | 746dcba08b | |
mohamedotaku | 03b9df50ff | |
mohamedotaku | dc3bddb317 | |
bapeey | f20236ab94 | |
bapeey | 75558ac6da | |
Secozzi | ee254eaebd | |
beerpsi | 1debb5fd1f | |
mohamedotaku | 42caf828c1 | |
stevenyomi | 988be5901b | |
stevenyomi | d7e1e2a448 | |
stevenyomi | 205d95cc07 | |
stevenyomi | d9f7e58f01 | |
Cuong M. Tran | 93d1700373 | |
KirinRaikage | b3668dfe11 | |
stevenyomi | 812c064b27 | |
stevenyomi | a723109122 | |
beerpsi | 07fc9a086a |
|
@ -25,51 +25,6 @@ jobs:
|
|||
steps:
|
||||
- name: Clone repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
build_multisrc:
|
||||
name: Build multisrc modules
|
||||
needs: prepare
|
||||
runs-on: arch
|
||||
steps:
|
||||
- name: Checkout master branch
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: 17
|
||||
distribution: temurin
|
||||
|
||||
- name: Prepare signing key
|
||||
run: |
|
||||
echo ${{ secrets.SIGNING_KEY }} | base64 -d > signingkey.jks
|
||||
|
||||
- name: Generate sources from the multi-source library
|
||||
uses: gradle/gradle-build-action@v2
|
||||
env:
|
||||
CI_MODULE_GEN: "true"
|
||||
with:
|
||||
arguments: :multisrc:generateExtensions
|
||||
|
||||
- name: Build extensions
|
||||
uses: gradle/gradle-build-action@v2
|
||||
env:
|
||||
CI_MULTISRC: "true"
|
||||
ALIAS: ${{ secrets.ALIAS }}
|
||||
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
||||
KEY_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
||||
with:
|
||||
arguments: assembleRelease
|
||||
|
||||
- name: Upload APKs
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: "multisrc-apks"
|
||||
path: "**/*.apk"
|
||||
retention-days: 1
|
||||
|
||||
- name: Clean up CI files
|
||||
run: rm signingkey.jks
|
||||
|
||||
build_individual:
|
||||
name: Build individual modules
|
||||
|
@ -92,12 +47,10 @@ jobs:
|
|||
- name: Build extensions
|
||||
uses: gradle/gradle-build-action@v2
|
||||
env:
|
||||
CI_MULTISRC: "false"
|
||||
ALIAS: ${{ secrets.ALIAS }}
|
||||
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
||||
KEY_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
||||
with:
|
||||
arguments: assembleRelease
|
||||
run: ./gradlew -p src assembleRelease
|
||||
|
||||
- name: Upload APKs
|
||||
uses: actions/upload-artifact@v3
|
||||
|
@ -112,7 +65,6 @@ jobs:
|
|||
publish_repo:
|
||||
name: Publish repo
|
||||
needs:
|
||||
- build_multisrc
|
||||
- build_individual
|
||||
runs-on: arch
|
||||
steps:
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="MadaraGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
|
||||
<module name="tachiyomi-extensions.multisrc.main" />
|
||||
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.madara.MadaraGenerator" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=madara" />
|
||||
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=madara" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,11 +0,0 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="MangaThemesiaGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
|
||||
<module name="tachiyomi-extensions.multisrc.main" />
|
||||
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesiaGenerator" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mangathemesia" />
|
||||
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mangathemesia" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
|
@ -423,14 +423,15 @@ will be cached.
|
|||
|
||||
```kotlin
|
||||
private fun parseDate(dateStr: String): Long {
|
||||
return runCatching { DATE_FORMATTER.parse(dateStr)?.time }
|
||||
.getOrNull() ?: 0L
|
||||
return try {
|
||||
dateFormat.parse(dateStr)!!.time
|
||||
} catch (_: ParseException) {
|
||||
0L
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val DATE_FORMATTER by lazy {
|
||||
SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.ENGLISH)
|
||||
}
|
||||
private val dateFormat by lazy {
|
||||
SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.ENGLISH)
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
.gradle/
|
||||
build/
|
|
@ -3,5 +3,14 @@ plugins {
|
|||
}
|
||||
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
google()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(libs.gradle.agp)
|
||||
implementation(libs.gradle.kotlin)
|
||||
implementation(libs.gradle.serialization)
|
||||
implementation(libs.gradle.kotlinter)
|
||||
}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
dependencyResolutionManagement {
|
||||
versionCatalogs {
|
||||
create("libs") {
|
||||
from(files("../gradle/libs.versions.toml"))
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
import org.gradle.api.plugins.ExtensionAware
|
||||
import org.gradle.kotlin.dsl.extra
|
||||
|
||||
var ExtensionAware.baseVersionCode: Int
|
||||
get() = extra.get("baseVersionCode") as Int
|
||||
set(value) = extra.set("baseVersionCode", value)
|
|
@ -0,0 +1,64 @@
|
|||
plugins {
|
||||
id("com.android.library")
|
||||
kotlin("android")
|
||||
id("kotlinx-serialization")
|
||||
id("org.jmailen.kotlinter")
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdk = AndroidConfig.compileSdk
|
||||
|
||||
defaultConfig {
|
||||
minSdk = AndroidConfig.minSdk
|
||||
}
|
||||
|
||||
namespace = "eu.kanade.tachiyomi.multisrc.${project.name}"
|
||||
|
||||
sourceSets {
|
||||
named("main") {
|
||||
manifest.srcFile("AndroidManifest.xml")
|
||||
java.setSrcDirs(listOf("src"))
|
||||
res.setSrcDirs(listOf("res"))
|
||||
assets.setSrcDirs(listOf("assets"))
|
||||
}
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
resValues = false
|
||||
shaders = false
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += "-opt-in=kotlinx.serialization.ExperimentalSerializationApi"
|
||||
}
|
||||
}
|
||||
|
||||
kotlinter {
|
||||
experimentalRules = true
|
||||
disabledRules = arrayOf(
|
||||
"experimental:argument-list-wrapping", // Doesn't play well with Android Studio
|
||||
"experimental:comment-wrapping",
|
||||
)
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
// TODO: use versionCatalogs.named("libs") in Gradle 8.5
|
||||
val libs = project.extensions.getByType<VersionCatalogsExtension>().named("libs")
|
||||
dependencies {
|
||||
compileOnly(libs.findBundle("common").get())
|
||||
}
|
||||
|
||||
tasks {
|
||||
preBuild {
|
||||
dependsOn(lintKotlin)
|
||||
}
|
||||
|
||||
if (System.getenv("CI") != "true") {
|
||||
lintKotlin {
|
||||
dependsOn(formatKotlin)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8,6 +8,8 @@ assert !ext.has("libVersion")
|
|||
|
||||
assert extName.chars().max().asInt < 0x180 : "Extension name should be romanized"
|
||||
|
||||
Project theme = ext.has("themePkg") ? project(":lib-multisrc:$themePkg") : null
|
||||
|
||||
android {
|
||||
compileSdk AndroidConfig.compileSdk
|
||||
|
||||
|
@ -25,7 +27,7 @@ android {
|
|||
minSdk AndroidConfig.minSdk
|
||||
targetSdk AndroidConfig.targetSdk
|
||||
applicationIdSuffix project.parent.name + "." + project.name
|
||||
versionCode extVersionCode
|
||||
versionCode theme == null ? extVersionCode : theme.baseVersionCode + overrideVersionCode
|
||||
versionName "1.4.$versionCode"
|
||||
base {
|
||||
archivesName = "tachiyomi-$applicationIdSuffix-v$versionName"
|
||||
|
@ -34,8 +36,18 @@ android {
|
|||
manifestPlaceholders = [
|
||||
appName : "Tachiyomi: $extName",
|
||||
extClass: extClass,
|
||||
nsfw: project.ext.find("isNsfw") ? 1 : 0,
|
||||
nsfw : project.ext.find("isNsfw") ? 1 : 0,
|
||||
]
|
||||
String baseUrl = project.ext.find("baseUrl") ?: ""
|
||||
if (theme != null && !baseUrl.isEmpty()) {
|
||||
def split = baseUrl.split("://")
|
||||
assert split.length == 2
|
||||
def path = split[1].split("/")
|
||||
manifestPlaceholders += [
|
||||
SOURCEHOST : path[0],
|
||||
SOURCESCHEME: split[0],
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
|
@ -88,6 +100,7 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
if (theme != null) implementation(theme) // Overrides core launcher icons
|
||||
implementation(project(":core"))
|
||||
compileOnly(libs.bundles.common)
|
||||
}
|
||||
|
@ -108,4 +121,6 @@ tasks.register("writeManifestFile") {
|
|||
}
|
||||
|
||||
preBuild.dependsOn(writeManifestFile, lintKotlin)
|
||||
lintKotlin.dependsOn(formatKotlin)
|
||||
if (System.getenv("CI") != "true") {
|
||||
lintKotlin.dependsOn(formatKotlin)
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
plugins {
|
||||
id("lib-multisrc")
|
||||
}
|
||||
|
||||
baseVersionCode = 3
|
|
@ -0,0 +1,5 @@
|
|||
plugins {
|
||||
id("lib-multisrc")
|
||||
}
|
||||
|
||||
baseVersionCode = 6
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
|
@ -0,0 +1,5 @@
|
|||
plugins {
|
||||
id("lib-multisrc")
|
||||
}
|
||||
|
||||
baseVersionCode = 9
|
|
@ -0,0 +1,5 @@
|
|||
plugins {
|
||||
id("lib-multisrc")
|
||||
}
|
||||
|
||||
baseVersionCode = 1
|
|
@ -0,0 +1,9 @@
|
|||
plugins {
|
||||
id("lib-multisrc")
|
||||
}
|
||||
|
||||
baseVersionCode = 3
|
||||
|
||||
dependencies {
|
||||
api(project(":lib:synchrony"))
|
||||
}
|
|
@ -126,7 +126,7 @@ abstract class ColaManga(
|
|||
}
|
||||
}
|
||||
|
||||
override fun searchMangaSelector() = "dl.fed-data-info, ${popularMangaSelector()}"
|
||||
override fun searchMangaSelector() = "dl.fed-deta-info, ${popularMangaSelector()}"
|
||||
|
||||
override fun searchMangaFromElement(element: Element): SManga {
|
||||
if (element.tagName() == "li") {
|
||||
|
@ -143,7 +143,7 @@ abstract class ColaManga(
|
|||
}
|
||||
}
|
||||
|
||||
override fun searchMangaNextPageSelector() = popularMangaSelector()
|
||||
override fun searchMangaNextPageSelector() = popularMangaNextPageSelector()
|
||||
|
||||
protected abstract val statusTitle: String
|
||||
protected abstract val authorTitle: String
|
|
@ -0,0 +1,5 @@
|
|||
plugins {
|
||||
id("lib-multisrc")
|
||||
}
|
||||
|
||||
baseVersionCode = 1
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
|
@ -0,0 +1,9 @@
|
|||
plugins {
|
||||
id("lib-multisrc")
|
||||
}
|
||||
|
||||
baseVersionCode = 7
|
||||
|
||||
dependencies {
|
||||
api(project(":lib:speedbinb"))
|
||||
}
|
|
@ -1,16 +1,20 @@
|
|||
package eu.kanade.tachiyomi.multisrc.comicgamma
|
||||
|
||||
import eu.kanade.tachiyomi.lib.speedbinb.SpeedBinbInterceptor
|
||||
import eu.kanade.tachiyomi.lib.speedbinb.SpeedBinbReader
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.source.model.FilterList
|
||||
import eu.kanade.tachiyomi.source.model.MangasPage
|
||||
import eu.kanade.tachiyomi.source.model.Page
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||
import kotlinx.serialization.json.Json
|
||||
import org.jsoup.nodes.Document
|
||||
import org.jsoup.nodes.Element
|
||||
import org.jsoup.select.Evaluator
|
||||
import rx.Observable
|
||||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
import java.util.TimeZone
|
||||
|
@ -22,7 +26,11 @@ open class ComicGamma(
|
|||
) : ParsedHttpSource() {
|
||||
override val supportsLatest = false
|
||||
|
||||
override val client = network.client.newBuilder().addInterceptor(PtImgInterceptor).build()
|
||||
private val json = Injekt.get<Json>()
|
||||
|
||||
override val client = network.client.newBuilder()
|
||||
.addInterceptor(SpeedBinbInterceptor(json))
|
||||
.build()
|
||||
|
||||
override fun popularMangaRequest(page: Int) = GET("$baseUrl/manga/", headers)
|
||||
override fun popularMangaNextPageSelector(): String? = null
|
||||
|
@ -54,10 +62,9 @@ open class ComicGamma(
|
|||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList) =
|
||||
throw UnsupportedOperationException()
|
||||
|
||||
override fun pageListParse(document: Document) =
|
||||
document.select("#content > div[data-ptimg]").mapIndexed { i, e ->
|
||||
Page(i, imageUrl = e.attr("abs:data-ptimg"))
|
||||
}
|
||||
private val reader by lazy { SpeedBinbReader(client, headers, json) }
|
||||
|
||||
override fun pageListParse(document: Document) = reader.pageListParse(document)
|
||||
|
||||
override fun mangaDetailsParse(document: Document): SManga {
|
||||
val titleElement = document.selectFirst(Evaluator.Class("manga__title"))!!
|
|
@ -0,0 +1,5 @@
|
|||
plugins {
|
||||
id("lib-multisrc")
|
||||
}
|
||||
|
||||
baseVersionCode = 1
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1006 B After Width: | Height: | Size: 1006 B |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
|
@ -0,0 +1,5 @@
|
|||
plugins {
|
||||
id("lib-multisrc")
|
||||
}
|
||||
|
||||
baseVersionCode = 4
|
|
@ -0,0 +1,5 @@
|
|||
plugins {
|
||||
id("lib-multisrc")
|
||||
}
|
||||
|
||||
baseVersionCode = 5
|
|
@ -0,0 +1,5 @@
|
|||
plugins {
|
||||
id("lib-multisrc")
|
||||
}
|
||||
|
||||
baseVersionCode = 9
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,5 @@
|
|||
plugins {
|
||||
id("lib-multisrc")
|
||||
}
|
||||
|
||||
baseVersionCode = 3
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
|
@ -0,0 +1,5 @@
|
|||
plugins {
|
||||
id("lib-multisrc")
|
||||
}
|
||||
|
||||
baseVersionCode = 5
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
@ -0,0 +1,5 @@
|
|||
plugins {
|
||||
id("lib-multisrc")
|
||||
}
|
||||
|
||||
baseVersionCode = 5
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 913 B After Width: | Height: | Size: 913 B |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
|
@ -0,0 +1,5 @@
|
|||
plugins {
|
||||
id("lib-multisrc")
|
||||
}
|
||||
|
||||
baseVersionCode = 1
|
|
@ -0,0 +1,5 @@
|
|||
plugins {
|
||||
id("lib-multisrc")
|
||||
}
|
||||
|
||||
baseVersionCode = 22
|