You've already forked revanced-patcher
mirror of
https://github.com/revanced/revanced-patcher
synced 2025-09-06 16:38:50 +02:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
817b8db019 | ||
![]() |
a321b8971b | ||
![]() |
783b2de9db | ||
![]() |
77604d4078 | ||
![]() |
21b5404180 | ||
![]() |
9ac6d5c7da | ||
![]() |
1b39278b24 | ||
![]() |
0ebab8bf59 | ||
![]() |
112bc998f4 |
24
.github/ISSUE_TEMPLATE/bug-report.md
vendored
Normal file
24
.github/ISSUE_TEMPLATE/bug-report.md
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a bug report on the patcher. Do not submit suggestions for patches here.
|
||||
title: 'problem: some problem'
|
||||
labels: bug
|
||||
assignees: oSumAtrIX, Sculas
|
||||
|
||||
---
|
||||
|
||||
## 🐞 Issue
|
||||
|
||||
<!-- Describe your issue in detail here -->
|
||||
|
||||
## ⚙ Reproduce
|
||||
|
||||
<!-- Include your environment and steps to reproduce the issue as detailed as possible -->
|
||||
|
||||
## 🛠 Solution
|
||||
|
||||
<!-- If applicable, add a possible solution -->
|
||||
|
||||
## ⚠ Additional context
|
||||
|
||||
<!-- Add any other context about the problem here -->
|
24
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
24
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest a change for the patcher. Do not submit suggestions for patches here.
|
||||
title: 'feat: some feature'
|
||||
labels: feature-request
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## 🐞 Issue
|
||||
|
||||
<!-- Explain here, what the current problem is and why it leads you to request a feature change -->
|
||||
|
||||
## ❗ Solution
|
||||
|
||||
<!-- Explain how your current issue can be solved -->
|
||||
|
||||
## ❓ Motivation
|
||||
|
||||
<!-- Explain why your feature should be considered -->
|
||||
|
||||
## ⚠ Additional context
|
||||
|
||||
<!-- Add any other context or screenshots about the feature request here -->
|
22
CHANGELOG.md
22
CHANGELOG.md
@@ -1,3 +1,25 @@
|
||||
## [2.5.2](https://github.com/revanced/revanced-patcher/compare/v2.5.1...v2.5.2) (2022-07-24)
|
||||
|
||||
## [2.5.1](https://github.com/revanced/revanced-patcher/compare/v2.5.0...v2.5.1) (2022-07-17)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* close stream when closing `DomFileEditor` ([77604d4](https://github.com/revanced/revanced-patcher/commit/77604d40785847b775155c0e75b663a3c7336aa3))
|
||||
|
||||
# [2.5.0](https://github.com/revanced/revanced-patcher/compare/v2.4.0...v2.5.0) (2022-07-11)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* missing additional items [skip ci] ([0ebab8b](https://github.com/revanced/revanced-patcher/commit/0ebab8bf598d993df6e340651205cba48f1ef725))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* feature request issue template ([1b39278](https://github.com/revanced/revanced-patcher/commit/1b39278b24ba2f964d93bd8ad2e28472ee036d90))
|
||||
* issue templates [skip ci] ([112bc99](https://github.com/revanced/revanced-patcher/commit/112bc998f4761a647cb9eab7454e35264fa96fd9))
|
||||
|
||||
# [2.4.0](https://github.com/revanced/revanced-patcher/compare/v2.3.1...v2.4.0) (2022-07-09)
|
||||
|
||||
|
||||
|
@@ -24,7 +24,7 @@ dependencies {
|
||||
implementation("xpp3:xpp3:1.1.4c")
|
||||
implementation("org.smali:smali:2.5.2")
|
||||
implementation("app.revanced:multidexlib2:2.5.2.r2")
|
||||
implementation("org.apktool:apktool-lib:2.6.9-SNAPSHOT")
|
||||
implementation("org.apktool:apktool-lib:2.7.0-SNAPSHOT")
|
||||
|
||||
testImplementation(kotlin("test"))
|
||||
}
|
||||
|
@@ -1,2 +1,2 @@
|
||||
kotlin.code.style = official
|
||||
version = 2.4.0
|
||||
version = 2.5.2
|
||||
|
@@ -26,17 +26,24 @@ class ResourceData(private val resourceCacheDirectory: File) : Data, Iterable<Fi
|
||||
}
|
||||
}
|
||||
|
||||
class DomFileEditor internal constructor(inputStream: InputStream, private val outputStream: Lazy<OutputStream>) : Closeable {
|
||||
class DomFileEditor internal constructor(
|
||||
private val inputStream: InputStream,
|
||||
private val outputStream: Lazy<OutputStream>,
|
||||
) : Closeable {
|
||||
val file: Document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(inputStream)
|
||||
.also(Document::normalize)
|
||||
|
||||
// lazily open an output stream
|
||||
// this is required because when constructing a DomFileEditor the output stream is created along with the input stream, which is not allowed
|
||||
// the workaround is to lazily create the output stream. This way it would be used after the input stream is closed, which happens in the constructor
|
||||
constructor(file: File) : this(file.inputStream(), lazy { file.outputStream() })
|
||||
|
||||
val file: Document =
|
||||
DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(inputStream).also(Document::normalize)
|
||||
override fun close() {
|
||||
val result = StreamResult(outputStream.value)
|
||||
TransformerFactory.newInstance().newTransformer().transform(DOMSource(file), result)
|
||||
|
||||
override fun close() =
|
||||
TransformerFactory.newInstance().newTransformer().transform(DOMSource(file), StreamResult(outputStream.value))
|
||||
inputStream.close()
|
||||
outputStream.value.close()
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user