chore(build): Reduce global warnings (#1684)
This commit is contained in:
parent
1769a8c6e1
commit
632b626f35
@ -3,4 +3,6 @@ object AndroidConfig {
|
||||
const val minSdk = 21
|
||||
const val targetSdk = 32
|
||||
const val namespace = "eu.kanade.tachiyomi.animeextension"
|
||||
const val coreNamespace = "eu.kanade.tachiyomi.lib.core"
|
||||
const val multisrcNamespace = "eu.kanade.tachiyomi.lib.themesources"
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ plugins {
|
||||
|
||||
android {
|
||||
compileSdk = AndroidConfig.compileSdk
|
||||
namespace = AndroidConfig.namespace
|
||||
namespace = AndroidConfig.coreNamespace
|
||||
|
||||
defaultConfig {
|
||||
minSdk = AndroidConfig.minSdk
|
||||
|
@ -1,2 +0,0 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="eu.kanade.tachiyomi.lib.chillxextractor" />
|
@ -6,11 +6,10 @@ plugins {
|
||||
|
||||
android {
|
||||
compileSdk = AndroidConfig.compileSdk
|
||||
namespace = "eu.kanade.tachiyomi.lib.themesources"
|
||||
namespace = AndroidConfig.multisrcNamespace
|
||||
|
||||
defaultConfig {
|
||||
minSdk = 29
|
||||
targetSdk = AndroidConfig.targetSdk
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
@ -36,9 +35,9 @@ dependencies {
|
||||
}
|
||||
|
||||
tasks {
|
||||
val generateExtensions by registering {
|
||||
register("generateExtensions") {
|
||||
doLast {
|
||||
val isWindows = System.getProperty("os.name").toString().toLowerCase().contains("win")
|
||||
val isWindows = System.getProperty("os.name").toString().lowercase().contains("win")
|
||||
var classPath = (
|
||||
configurations.compileOnly.get().asFileTree.toList() +
|
||||
listOf(
|
||||
|
@ -5,6 +5,7 @@ import java.io.File
|
||||
/**
|
||||
* Finds and calls all `ThemeSourceGenerator`s
|
||||
*/
|
||||
@Suppress("unused_parameter")
|
||||
fun main(args: Array<String>) {
|
||||
val userDir = System.getProperty("user.dir")!!
|
||||
val sourcesDirPath = "$userDir/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc"
|
||||
|
@ -6,6 +6,7 @@ import java.io.File
|
||||
* Finds all themes and creates an Intellij Idea run configuration for their generators
|
||||
* Should be run after creation/deletion of each theme
|
||||
*/
|
||||
@Suppress("unused_parameter")
|
||||
fun main(args: Array<String>) {
|
||||
val userDir = System.getProperty("user.dir")!!
|
||||
val sourcesDirPath = "$userDir/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc"
|
||||
|
@ -142,7 +142,7 @@ interface ThemeSourceGenerator {
|
||||
writeSourceClasses(projectSrcPath, srcOverridePath, source, themePkg, themeClass)
|
||||
copyThemeClasses(userDir, themePkg, projectRootPath)
|
||||
copyThemeReadmes(userDir, themePkg, overridesPath, projectRootPath)
|
||||
copyResFiles(resOverridePath, defaultResPath, source, projectRootPath)
|
||||
copyResFiles(resOverridePath, defaultResPath, projectRootPath)
|
||||
}
|
||||
}
|
||||
|
||||
@ -182,7 +182,7 @@ interface ThemeSourceGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
private fun copyResFiles(resOverridePath: String, defaultResPath: String, source: ThemeSourceData, projectRootPath: String): Any {
|
||||
private fun copyResFiles(resOverridePath: String, defaultResPath: String, projectRootPath: String): Any {
|
||||
// check if res override exists if not copy default res
|
||||
val resOverride = File(resOverridePath)
|
||||
return if (resOverride.exists()) {
|
||||
|
@ -1,2 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="eu.kanade.tachiyomi.animeextension" />
|
||||
<manifest />
|
||||
|
Loading…
x
Reference in New Issue
Block a user