Merge pull request #313 from mamoe/binary-compatibility

Add binary-validator
This commit is contained in:
Him188 2020-05-09 15:37:33 +08:00 committed by GitHub
commit d607568970
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 5 deletions

View File

@ -18,6 +18,7 @@ buildscript {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.Kotlin.stdlib}")
classpath("org.jetbrains.kotlin:kotlin-serialization:${Versions.Kotlin.stdlib}")
classpath("org.jetbrains.kotlinx:atomicfu-gradle-plugin:${Versions.Kotlin.atomicFU}")
classpath("org.jetbrains.kotlinx:binary-compatibility-validator:${Versions.Kotlin.binaryValidator}")
}
}
@ -26,6 +27,10 @@ plugins {
// id("com.jfrog.bintray") version Versions.Publishing.bintray apply false
}
// https://github.com/kotlin/binary-compatibility-validator
apply(plugin = "binary-compatibility-validator")
project.ext.set("isAndroidSDKAvailable", false)
// until

View File

@ -18,6 +18,7 @@ object Versions {
const val atomicFU = "0.14.2"
const val serialization = "0.20.0"
const val ktor = "1.3.2"
const val binaryValidator = "0.2.3"
const val io = "0.1.16"
const val coroutinesIo = "0.1.16"

View File

@ -0,0 +1,13 @@
apiValidation {
ignoredPackages += [
"net.mamoe.mirai.event.internal",
"net.mamoe.mirai.utils.internal"
]
ignoredPackages += [
"net.mamoe.mirai.qqandroid.contact",
"net.mamoe.mirai.qqandroid.message",
"net.mamoe.mirai.qqandroid.network",
"net.mamoe.mirai.qqandroid.utils"
]
}

View File

@ -504,8 +504,8 @@ internal class MsgSvc : ProtoBuf {
@Serializable
internal class SecretFileHead(
@ProtoId(1) @JvmField val secretFileMsg: SubMsgType0xc1.MsgBody? = null,
@ProtoId(2) @JvmField val secretFileStatus: SubMsgType0x1a.MsgBody? = null
@ProtoId(1) @JvmField val secretFileMsg: SubMsgType0xc1.MsgBody? = null
// @ProtoId(2) @JvmField val secretFileStatus: SubMsgType0x1a.MsgBody? = null
)
@Serializable
@ -815,6 +815,7 @@ internal class SubMsgType0xc1 {
) : ProtoBuf
}
/*
@Serializable
internal class SubMsgType0x1a {
@Serializable
@ -830,4 +831,4 @@ internal class SubMsgType0x1a {
@ProtoId(9) @JvmField val fromUin: Long = 0L,
@ProtoId(10) @JvmField val toUin: Long = 0L
) : ProtoBuf
}
}*/

View File

@ -515,6 +515,7 @@ internal class Submsgtype0x129 {
}
/*
internal class Submsgtype0x1a {
internal class SubMsgType0x1a : ProtoBuf {
@Serializable
@ -531,7 +532,7 @@ internal class Submsgtype0x1a {
@ProtoId(10) @JvmField val toUin: Long = 0L
) : ProtoBuf
}
}
}*/
internal class Submsgtype0x26 {
@ -2730,6 +2731,7 @@ internal class Submsgtype0xbe {
}
/*
internal class Submsgtype0xc1 {
internal class Submsgtype0xc1 : ProtoBuf {
@Serializable
@ -2740,7 +2742,7 @@ internal class Submsgtype0xc1 {
) : ProtoBuf
}
}
*/
internal class Submsgtype0xc3 {
internal class Submsgtype0xc3 : ProtoBuf {