-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
164 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
-keep class cn.lyric.getter.hook.MainHook | ||
-keep class cn.lyric.getter.api.data.* { *; } | ||
-keep class cn.lyric.getter.tool.MeiZuNotification{ *; } | ||
-keep class cn.lyric.getter.data.** { *; } | ||
-keep class com.google.gson.reflect.TypeToken { *; } | ||
-keep class * extends com.google.gson.reflect.TypeToken | ||
-keep class cn.lyric.getter.tool.MeiZuNotification { *; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
package cn.lyric.getter.data | ||
|
||
import com.google.gson.annotations.SerializedName | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class GithubReleaseApi( | ||
val assets: List<Asset>, | ||
val body: String, | ||
val name: String, | ||
@SerializedName("tag_name") val tagName: String | ||
@SerialName("tag_name") val tagName: String | ||
) | ||
|
||
@Serializable | ||
data class Asset( | ||
@SerializedName("browser_download_url") val browserDownloadUrl: String, | ||
@SerializedName("content_type") val contentType: String, | ||
@SerialName("browser_download_url") val browserDownloadUrl: String, | ||
@SerialName("content_type") val contentType: String, | ||
val name: String | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
package cn.lyric.getter.data | ||
|
||
import com.google.gson.annotations.SerializedName | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class NoticeData( | ||
val title: String, | ||
val subhead: String, | ||
val content: String, | ||
val url: String = "", | ||
@SerializedName("api_version") val apiVersion: Int = 0, | ||
@SerialName("api_version") val apiVersion: Int = 0, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
package cn.lyric.getter.tool | ||
|
||
import com.google.gson.Gson | ||
import com.google.gson.GsonBuilder | ||
import kotlinx.serialization.json.Json | ||
import java.io.InputStreamReader | ||
|
||
object JsonTools { | ||
val gson = Gson() | ||
val json = Json { | ||
prettyPrint = true | ||
ignoreUnknownKeys = true | ||
} | ||
|
||
inline fun <reified T> String.parseJSON(): T { | ||
return gson.fromJson(this, T::class.java) | ||
return json.decodeFromString(this) | ||
} | ||
|
||
inline fun <reified T> InputStreamReader.parseJSON(): T { | ||
return gson.fromJson(this, T::class.java) | ||
return json.decodeFromString(this.readText()) | ||
} | ||
|
||
fun Any.toJSON(print: Boolean = false): String { | ||
return if (print) { | ||
val gson = GsonBuilder().setPrettyPrinting().create() | ||
gson.toJson(this, Any::class.java) | ||
json.encodeToString(this) | ||
} else { | ||
gson.toJson(this, Any::class.java) | ||
Json.encodeToString(this) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
plugins { | ||
alias(libs.plugins.androidApplication) apply false | ||
alias(libs.plugins.kotlinAndroid) apply false | ||
alias(libs.plugins.kotlinSerialization) apply false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.