mirror of
https://github.com/ReVanced/revanced-library.git
synced 2026-01-18 08:53:57 +00:00
Compare commits
6 Commits
v3.0.0
...
v3.0.1-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b1cf1f190 | ||
|
|
dd5c37ddec | ||
|
|
9adccc04dd | ||
|
|
ed94d29461 | ||
|
|
efc72cdc55 | ||
|
|
737e272481 |
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@@ -10,6 +10,9 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
name: Release
|
name: Release
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -49,5 +52,5 @@ jobs:
|
|||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: npm exec semantic-release
|
run: npm exec semantic-release
|
||||||
|
|||||||
@@ -23,7 +23,8 @@
|
|||||||
"assets": [
|
"assets": [
|
||||||
"CHANGELOG.md",
|
"CHANGELOG.md",
|
||||||
"gradle.properties"
|
"gradle.properties"
|
||||||
]
|
],
|
||||||
|
"message": "chore: Release v${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -1,3 +1,12 @@
|
|||||||
|
## [3.0.1-dev.2](https://github.com/ReVanced/revanced-library/compare/v3.0.1-dev.1...v3.0.1-dev.2) (2024-10-01)
|
||||||
|
|
||||||
|
## [3.0.1-dev.1](https://github.com/ReVanced/revanced-library/compare/v3.0.0...v3.0.1-dev.1) (2024-08-16)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Serialize compatible packages as a map instead of a set of pairs. ([737e272](https://github.com/ReVanced/revanced-library/commit/737e272481fe3b0b4c89233d139b5e657a0c1de4))
|
||||||
|
|
||||||
# [3.0.0](https://github.com/ReVanced/revanced-library/compare/v2.3.0...v3.0.0) (2024-08-06)
|
# [3.0.0](https://github.com/ReVanced/revanced-library/compare/v2.3.0...v3.0.0) (2024-08-06)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version = 3.0.0
|
version = 3.0.1-dev.2
|
||||||
#Gradle
|
#Gradle
|
||||||
org.gradle.jvmargs = -Xmx2048M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options="-Xmx2048M"
|
org.gradle.jvmargs = -Xmx2048M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options="-Xmx2048M"
|
||||||
org.gradle.caching = true
|
org.gradle.caching = true
|
||||||
|
|||||||
3002
package-lock.json
generated
3002
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
|||||||
"@saithodev/semantic-release-backmerge": "^4.0.1",
|
"@saithodev/semantic-release-backmerge": "^4.0.1",
|
||||||
"@semantic-release/changelog": "^6.0.3",
|
"@semantic-release/changelog": "^6.0.3",
|
||||||
"@semantic-release/git": "^10.0.1",
|
"@semantic-release/git": "^10.0.1",
|
||||||
"gradle-semantic-release-plugin": "^1.9.1",
|
"gradle-semantic-release-plugin": "^1.10.1",
|
||||||
"semantic-release": "^23.0.2"
|
"semantic-release": "^24.1.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,19 @@
|
|||||||
package app.revanced.library
|
package app.revanced.library
|
||||||
|
|
||||||
import app.revanced.patcher.patch.*
|
import app.revanced.patcher.patch.Option
|
||||||
import kotlinx.serialization.*
|
import app.revanced.patcher.patch.Patch
|
||||||
|
import app.revanced.patcher.patch.VersionName
|
||||||
|
import kotlinx.serialization.ExperimentalSerializationApi
|
||||||
|
import kotlinx.serialization.KSerializer
|
||||||
import kotlinx.serialization.builtins.*
|
import kotlinx.serialization.builtins.*
|
||||||
import kotlinx.serialization.descriptors.buildClassSerialDescriptor
|
import kotlinx.serialization.descriptors.buildClassSerialDescriptor
|
||||||
import kotlinx.serialization.descriptors.element
|
import kotlinx.serialization.descriptors.element
|
||||||
import kotlinx.serialization.encoding.Decoder
|
import kotlinx.serialization.encoding.Decoder
|
||||||
import kotlinx.serialization.encoding.Encoder
|
import kotlinx.serialization.encoding.Encoder
|
||||||
import kotlinx.serialization.encoding.encodeStructure
|
import kotlinx.serialization.encoding.encodeStructure
|
||||||
import kotlinx.serialization.json.*
|
import kotlinx.serialization.json.Json
|
||||||
|
import kotlinx.serialization.json.encodeToStream
|
||||||
|
import kotlinx.serialization.serializer
|
||||||
import java.io.OutputStream
|
import java.io.OutputStream
|
||||||
|
|
||||||
private class PatchSerializer : KSerializer<Patch<*>> {
|
private class PatchSerializer : KSerializer<Patch<*>> {
|
||||||
@@ -17,7 +22,7 @@ private class PatchSerializer : KSerializer<Patch<*>> {
|
|||||||
element<String?>("description")
|
element<String?>("description")
|
||||||
element<Boolean>("use")
|
element<Boolean>("use")
|
||||||
element<List<String>>("dependencies")
|
element<List<String>>("dependencies")
|
||||||
element<Set<Package>?>("compatiblePackages")
|
element<Map<PackageName, Set<VersionName>?>?>("compatiblePackages")
|
||||||
element("options", OptionSerializer.descriptor)
|
element("options", OptionSerializer.descriptor)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,8 +57,8 @@ private class PatchSerializer : KSerializer<Patch<*>> {
|
|||||||
encodeNullableSerializableElement(
|
encodeNullableSerializableElement(
|
||||||
descriptor,
|
descriptor,
|
||||||
4,
|
4,
|
||||||
SetSerializer(PairSerializer(String.serializer(), SetSerializer(String.serializer()).nullable)),
|
MapSerializer(String.serializer(), SetSerializer(String.serializer()).nullable),
|
||||||
value.compatiblePackages,
|
value.compatiblePackages?.associate { (packageName, versions) -> packageName to versions },
|
||||||
)
|
)
|
||||||
encodeSerializableElement(
|
encodeSerializableElement(
|
||||||
descriptor,
|
descriptor,
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
package app.revanced.library
|
package app.revanced.library
|
||||||
|
|
||||||
import app.revanced.patcher.patch.*
|
import app.revanced.patcher.patch.booleanOption
|
||||||
|
import app.revanced.patcher.patch.bytecodePatch
|
||||||
|
import app.revanced.patcher.patch.floatsOption
|
||||||
|
import app.revanced.patcher.patch.stringOption
|
||||||
import kotlinx.serialization.json.*
|
import kotlinx.serialization.json.*
|
||||||
import java.io.ByteArrayOutputStream
|
import java.io.ByteArrayOutputStream
|
||||||
import kotlin.test.Test
|
import kotlin.test.Test
|
||||||
@@ -33,7 +36,7 @@ class SerializationTest {
|
|||||||
|
|
||||||
assert(deserializedPatch["name"]!!.jsonPrimitive.content == "Test patch")
|
assert(deserializedPatch["name"]!!.jsonPrimitive.content == "Test patch")
|
||||||
|
|
||||||
assert(deserializedPatch["compatiblePackages"]!!.jsonArray.size == 2) {
|
assert(deserializedPatch["compatiblePackages"]!!.jsonObject.size == 2) {
|
||||||
"The patch should be compatible with two packages."
|
"The patch should be compatible with two packages."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user