mirror of
https://github.com/fankes/moshi.git
synced 2025-10-19 16:09:21 +08:00
Update dependencies + Kotlin 1.7 + KotlinPoet 1.12.0 (#1543)
This commit is contained in:
@@ -61,12 +61,12 @@ tasks.withType<KotlinCompile>()
|
||||
.configureEach {
|
||||
kotlinOptions {
|
||||
val toAdd = mutableListOf(
|
||||
"-Xopt-in=kotlin.RequiresOptIn",
|
||||
"-Xopt-in=kotlin.contracts.ExperimentalContracts",
|
||||
"-Xjvm-default=enable"
|
||||
"-opt-in=kotlin.RequiresOptIn",
|
||||
"-opt-in=kotlin.contracts.ExperimentalContracts",
|
||||
"-Xjvm-default=all"
|
||||
)
|
||||
if (name.contains("test", true)) {
|
||||
toAdd += "-Xopt-in=kotlin.ExperimentalStdlibApi"
|
||||
toAdd += "-opt-in=kotlin.ExperimentalStdlibApi"
|
||||
}
|
||||
@Suppress("SuspiciousCollectionReassignment") // It's not suspicious
|
||||
freeCompilerArgs += toAdd
|
||||
|
@@ -425,15 +425,15 @@ internal class JsonUtf8Reader : JsonReader {
|
||||
return when {
|
||||
last == NUMBER_CHAR_DIGIT &&
|
||||
fitsInLong &&
|
||||
(value != Long.MIN_VALUE || negative)
|
||||
&& (value != 0L || !negative) -> {
|
||||
(value != Long.MIN_VALUE || negative) &&
|
||||
(value != 0L || !negative) -> {
|
||||
peekedLong = if (negative) value else -value
|
||||
buffer.skip(i)
|
||||
setPeeked(PEEKED_LONG)
|
||||
}
|
||||
last == NUMBER_CHAR_DIGIT ||
|
||||
last == NUMBER_CHAR_FRACTION_DIGIT
|
||||
|| last == NUMBER_CHAR_EXP_DIGIT -> {
|
||||
last == NUMBER_CHAR_FRACTION_DIGIT ||
|
||||
last == NUMBER_CHAR_EXP_DIGIT -> {
|
||||
peekedNumberLength = i.toInt()
|
||||
setPeeked(PEEKED_NUMBER)
|
||||
}
|
||||
|
Reference in New Issue
Block a user