Skip to content

Commit c37f539

Browse files
committed
refactor: 调整过期的API
1 parent 2c6e42c commit c37f539

File tree

4 files changed

+5
-14
lines changed

4 files changed

+5
-14
lines changed

applications/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ fun DependencyHandlerScope.resolveBuildInPlugins() {
2727
val sdPlugins = project.property("sdPlugins").toString()
2828
println("Prepare built-in plugins: $sdPlugins")
2929
if (sdPlugins == "all") {
30-
project(":plugins").dependencyProject.childProjects.map { it.key }
30+
listOf("common", "telegram4j", "foreign")
3131
} else {
3232
sdPlugins.split(",")
3333
.filter { it.isNotBlank() }

core/src/test/kotlin/io/github/shoaky/sourcedownloader/integration/SourceProcessorTest.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ class SourceProcessorTest {
218218
processor.run()
219219
val contents = processingStorage.queryAllContent(ProcessingQuery(processorName))
220220
.associateBy { it.itemContent.sourceItem.title }
221+
println(contents)
221222
// 如果实现了对被替换文件的状态更新,这里需要断言REPLACED
222223
assertEquals(
223224
FileContentStatus.NORMAL, contents.getValue("test-replace1")

core/src/test/resources/config.yaml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,6 @@ components:
9898
downloadUri: "file://test1"
9999
files:
100100
- path: "test1.jpg"
101-
file-resolver:
102-
- name: "normal-case"
103-
type: "fixed"
104-
- name: "error-item"
105-
type: "fixed"
106-
- name: "replace-case"
107-
type: "fixed"
108-
- name: "media-type-case"
109-
type: "fixed"
110-
- name: "long-title"
111-
type: "fixed"
112101
downloader:
113102
- name: "mock"
114103
type: "mock"

sdk/src/main/kotlin/io/github/shoaky/sourcedownloader/sdk/util/Jackson.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,12 @@ object AdaptabilityHandler : DeserializationProblemHandler() {
112112

113113
override fun handleUnexpectedToken(
114114
ctxt: DeserializationContext,
115-
targetType: Class<*>,
115+
targetType: JavaType,
116116
t: JsonToken,
117117
p: JsonParser,
118118
failureMsg: String?
119119
): Any {
120-
if (targetType != OffsetDateTime::class.java) {
120+
if (targetType.rawClass != OffsetDateTime::class.java) {
121121
return super.handleUnexpectedToken(ctxt, targetType, t, p, failureMsg)
122122
}
123123

@@ -131,6 +131,7 @@ object AdaptabilityHandler : DeserializationProblemHandler() {
131131
}
132132
return Jackson.convert<LocalDateTime>(numbers).atOffset(ZONE_OFFSET)
133133
}
134+
134135
}
135136

136137
class JoinStringSerializer : StdSerializer<Collection<*>>(Collection::class.java) {

0 commit comments

Comments
 (0)