Skip to content

Commit

Permalink
build(api): protobuf&retrofit2:converter-protobuf & retrofit2:convert…
Browse files Browse the repository at this point in the history
…er-kotlinx-serialization
  • Loading branch information
muedsa committed Dec 2, 2024
1 parent d8ff06b commit 0e782bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,25 @@ android {

dependencies {
// 提供以下依赖的API给TvBox和插件使用
val protobufVersion = "4.29.0"
val jsoupVersion = "1.18.3"
val ktxJsonVersion = "1.7.3"
val retrofitVersion = "2.11.0"
val retrofitKtxSerialization = "1.0.0"
val retrofitKtxSerialization = "2.11.0"
val retrofitProtobuf = "2.11.0"
val okhttp3LoggingVersion = "4.12.0"
val timberVersion = "5.0.1"
val datastoreVersion = "1.1.1"
val junitVersion = "4.13.2"
val kotlinxCoroutinesTestVersion = "1.9.0"

api("com.google.protobuf:protobuf-java-lite:$protobufVersion")
api("com.google.protobuf:protobuf-kotlin-lite:$protobufVersion")
api("org.jsoup:jsoup:$jsoupVersion")
api("org.jetbrains.kotlinx:kotlinx-serialization-json:$ktxJsonVersion")
api("com.squareup.retrofit2:retrofit:$retrofitVersion")
api("com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:$retrofitKtxSerialization")
api("com.squareup.retrofit2:converter-kotlinx-serialization:$retrofitKtxSerialization")
api("com.squareup.retrofit2:converter-protobuf:$retrofitProtobuf")
api("com.squareup.okhttp3:logging-interceptor:$okhttp3LoggingVersion")
api("com.jakewharton.timber:timber:$timberVersion")
compileOnlyApi("androidx.datastore:datastore-preferences:$datastoreVersion")
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/com/muedsa/tvbox/tool/HttpTool.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.muedsa.tvbox.tool

import com.jakewharton.retrofit2.converter.kotlinx.serialization.asConverterFactory
import okhttp3.CacheControl
import okhttp3.CookieJar
import okhttp3.MediaType.Companion.toMediaType
Expand All @@ -12,6 +11,7 @@ import org.jsoup.Connection
import org.jsoup.Jsoup
import org.jsoup.nodes.Document
import retrofit2.Retrofit
import retrofit2.converter.kotlinx.serialization.asConverterFactory
import java.net.CookieStore

const val ChromeUserAgent =
Expand Down

0 comments on commit 0e782bb

Please sign in to comment.