diff --git a/src/main/kotlin/app/revanced/patcher/PatcherResult.kt b/src/main/kotlin/app/revanced/patcher/PatcherResult.kt index 302eda2..acd797d 100644 --- a/src/main/kotlin/app/revanced/patcher/PatcherResult.kt +++ b/src/main/kotlin/app/revanced/patcher/PatcherResult.kt @@ -65,10 +65,10 @@ class PatcherResult internal constructor( return ( ( (result * 31) + - (if (this.resources?.resourcesApk == null) 0 else this.resources?.resourcesApk.hashCode()) + (if (this.resources?.resourcesApk == null) 0 else this.resources.resourcesApk.hashCode()) ) * 31 ) + - (if (this.resources?.doNotCompress == null) 0 else this.resources?.doNotCompress.hashCode()) + (if (this.resources?.doNotCompress == null) 0 else this.resources.doNotCompress.hashCode()) } @Deprecated("This method is not used anymore") @@ -85,12 +85,15 @@ class PatcherResult internal constructor( return false } + @Suppress("DEPRECATION") @Deprecated("This method is not used anymore") fun getDexFiles() = component1() + @Suppress("DEPRECATION") @Deprecated("This method is not used anymore") fun getResourceFile() = component2() + @Suppress("DEPRECATION") @Deprecated("This method is not used anymore") fun getDoNotCompress() = component3() diff --git a/src/main/kotlin/app/revanced/patcher/data/BytecodeContext.kt b/src/main/kotlin/app/revanced/patcher/data/BytecodeContext.kt index ac4bf7d..50d8d63 100644 --- a/src/main/kotlin/app/revanced/patcher/data/BytecodeContext.kt +++ b/src/main/kotlin/app/revanced/patcher/data/BytecodeContext.kt @@ -123,6 +123,7 @@ class BytecodeContext internal constructor(private val config: PatcherConfig) : DexIO.DEFAULT_MAX_DEX_POOL_SIZE, ) { _, entryName, _ -> logger.info("Compiled $entryName") } }.listFiles(FileFilter { it.isFile })!!.map { + @Suppress("DEPRECATION") PatcherResult.PatchedDexFile(it.name, it.inputStream()) }.toSet() diff --git a/src/main/kotlin/app/revanced/patcher/data/ResourceContext.kt b/src/main/kotlin/app/revanced/patcher/data/ResourceContext.kt index e9a29b2..71f935b 100644 --- a/src/main/kotlin/app/revanced/patcher/data/ResourceContext.kt +++ b/src/main/kotlin/app/revanced/patcher/data/ResourceContext.kt @@ -39,6 +39,7 @@ class ResourceContext internal constructor( val document = DocumentOperatable() @Deprecated("Use document instead.") + @Suppress("DEPRECATION") val xmlEditor = XmlFileHolder() /** @@ -242,13 +243,16 @@ class ResourceContext internal constructor( inner class DocumentOperatable { operator fun get(inputStream: InputStream) = Document(inputStream) + @Suppress("DEPRECATION") operator fun get(path: String) = Document(this@ResourceContext[path]) } @Deprecated("Use DocumentOperatable instead.") inner class XmlFileHolder { + @Suppress("DEPRECATION") operator fun get(inputStream: InputStream) = DomFileEditor(inputStream) + @Suppress("DEPRECATION") operator fun get(path: String): DomFileEditor { return DomFileEditor(this@ResourceContext[path]) } diff --git a/src/main/kotlin/app/revanced/patcher/extensions/MethodFingerprintExtensions.kt b/src/main/kotlin/app/revanced/patcher/extensions/MethodFingerprintExtensions.kt index 96dc393..413f1fd 100644 --- a/src/main/kotlin/app/revanced/patcher/extensions/MethodFingerprintExtensions.kt +++ b/src/main/kotlin/app/revanced/patcher/extensions/MethodFingerprintExtensions.kt @@ -7,6 +7,7 @@ object MethodFingerprintExtensions { /** * The [FuzzyPatternScanMethod] annotation of a [MethodFingerprint]. */ + @Suppress("EXTENSION_SHADOWED_BY_MEMBER") @Deprecated( message = "Use the property instead.", replaceWith = ReplaceWith("this.fuzzyPatternScanMethod"),