Change package name for "next" branch

This commit is contained in:
Koitharu
2022-07-13 15:49:23 +03:00
parent 69a0c779d9
commit 29c82177a9
3 changed files with 16 additions and 5 deletions

View File

@@ -28,6 +28,10 @@ android {
// define this values in your local.properties file
buildConfigField 'String', 'SHIKIMORI_CLIENT_ID', "\"${localProperty('shikimori.clientId')}\""
buildConfigField 'String', 'SHIKIMORI_CLIENT_SECRET', "\"${localProperty('shikimori.clientSecret')}\""
if (currentBranch() == "feature/nextgen") {
applicationIdSuffix = '.next'
}
}
buildTypes {
debug {
@@ -76,7 +80,7 @@ afterEvaluate {
}
}
dependencies {
implementation('com.github.nv95:kotatsu-parsers:330495556a') {
implementation('com.github.nv95:kotatsu-parsers:c5c84c8630') {
exclude group: 'org.json', module: 'json'
}

View File

@@ -36,10 +36,7 @@ class RemoteMangaRepository(private val parser: MangaParser) : MangaRepository {
override suspend fun getTags(): Set<MangaTag> = parser.getTags()
@Deprecated("")
fun getFaviconUrl(): String = parser.getFaviconUrl()
suspend fun getFavicons(): Favicons = parser.parseFavicons()
suspend fun getFavicons(): Favicons = parser.getFavicons()
fun getAuthProvider(): MangaParserAuthProvider? = parser as? MangaParserAuthProvider

View File

@@ -32,6 +32,16 @@ Object localProperty(String name, Object defaultValue = 'null') {
return value != null ? value : defaultValue
}
String currentBranch() {
def branchName = ""
try {
branchName = "git rev-parse --abbrev-ref HEAD".execute().text.trim();
} catch (ignored) {
println "Git not found"
}
return branchName
}
task clean(type: Delete) {
delete rootProject.buildDir
}