chore(build): Reduce global warnings (#1684)

This commit is contained in:
Claudemirovsky 2023-06-07 08:28:34 +00:00 committed by GitHub
parent 1769a8c6e1
commit 632b626f35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 12 additions and 11 deletions

View File

@ -3,4 +3,6 @@ object AndroidConfig {
const val minSdk = 21 const val minSdk = 21
const val targetSdk = 32 const val targetSdk = 32
const val namespace = "eu.kanade.tachiyomi.animeextension" const val namespace = "eu.kanade.tachiyomi.animeextension"
const val coreNamespace = "eu.kanade.tachiyomi.lib.core"
const val multisrcNamespace = "eu.kanade.tachiyomi.lib.themesources"
} }

View File

@ -4,7 +4,7 @@ plugins {
android { android {
compileSdk = AndroidConfig.compileSdk compileSdk = AndroidConfig.compileSdk
namespace = AndroidConfig.namespace namespace = AndroidConfig.coreNamespace
defaultConfig { defaultConfig {
minSdk = AndroidConfig.minSdk minSdk = AndroidConfig.minSdk

View File

@ -15,4 +15,4 @@ android {
dependencies { dependencies {
compileOnly(libs.bundles.common) compileOnly(libs.bundles.common)
} }
// BUMPS: 0 // BUMPS: 0

View File

@ -1,2 +0,0 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="eu.kanade.tachiyomi.lib.chillxextractor" />

View File

@ -6,11 +6,10 @@ plugins {
android { android {
compileSdk = AndroidConfig.compileSdk compileSdk = AndroidConfig.compileSdk
namespace = "eu.kanade.tachiyomi.lib.themesources" namespace = AndroidConfig.multisrcNamespace
defaultConfig { defaultConfig {
minSdk = 29 minSdk = 29
targetSdk = AndroidConfig.targetSdk
} }
kotlinOptions { kotlinOptions {
@ -36,9 +35,9 @@ dependencies {
} }
tasks { tasks {
val generateExtensions by registering { register("generateExtensions") {
doLast { doLast {
val isWindows = System.getProperty("os.name").toString().toLowerCase().contains("win") val isWindows = System.getProperty("os.name").toString().lowercase().contains("win")
var classPath = ( var classPath = (
configurations.compileOnly.get().asFileTree.toList() + configurations.compileOnly.get().asFileTree.toList() +
listOf( listOf(

View File

@ -5,6 +5,7 @@ import java.io.File
/** /**
* Finds and calls all `ThemeSourceGenerator`s * Finds and calls all `ThemeSourceGenerator`s
*/ */
@Suppress("unused_parameter")
fun main(args: Array<String>) { fun main(args: Array<String>) {
val userDir = System.getProperty("user.dir")!! val userDir = System.getProperty("user.dir")!!
val sourcesDirPath = "$userDir/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc" val sourcesDirPath = "$userDir/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc"

View File

@ -6,6 +6,7 @@ import java.io.File
* Finds all themes and creates an Intellij Idea run configuration for their generators * Finds all themes and creates an Intellij Idea run configuration for their generators
* Should be run after creation/deletion of each theme * Should be run after creation/deletion of each theme
*/ */
@Suppress("unused_parameter")
fun main(args: Array<String>) { fun main(args: Array<String>) {
val userDir = System.getProperty("user.dir")!! val userDir = System.getProperty("user.dir")!!
val sourcesDirPath = "$userDir/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc" val sourcesDirPath = "$userDir/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc"

View File

@ -142,7 +142,7 @@ interface ThemeSourceGenerator {
writeSourceClasses(projectSrcPath, srcOverridePath, source, themePkg, themeClass) writeSourceClasses(projectSrcPath, srcOverridePath, source, themePkg, themeClass)
copyThemeClasses(userDir, themePkg, projectRootPath) copyThemeClasses(userDir, themePkg, projectRootPath)
copyThemeReadmes(userDir, themePkg, overridesPath, 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 // check if res override exists if not copy default res
val resOverride = File(resOverridePath) val resOverride = File(resOverridePath)
return if (resOverride.exists()) { return if (resOverride.exists()) {

View File

@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest package="eu.kanade.tachiyomi.animeextension" /> <manifest />