Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mirai
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Mirai
Commits
15527b56
Commit
15527b56
authored
Apr 22, 2020
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add compatibility tests
parent
4b05cb45
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
4 deletions
+70
-4
compatibility-validator/build.gradle.kts
compatibility-validator/build.gradle.kts
+2
-4
java-compatibility-validator/build.gradle.kts
java-compatibility-validator/build.gradle.kts
+47
-0
java-compatibility-validator/src/main/java/test/MPPCompatibilityTest.java
...ty-validator/src/main/java/test/MPPCompatibilityTest.java
+20
-0
settings.gradle
settings.gradle
+1
-0
No files found.
compatibility-validator/build.gradle.kts
View file @
15527b56
...
...
@@ -23,8 +23,7 @@ kotlin {
dependencies
{
api
(
kotlin
(
"stdlib"
))
runtimeOnly
(
project
(
":mirai-core-qqandroid"
))
compileOnly
(
"net.mamoe:mirai-core-qqandroid-jvm:0.33.0"
)
api
(
kotlinx
(
"coroutines-core"
,
Versions
.
Kotlin
.
coroutines
))
compileOnly
(
"net.mamoe:mirai-core-qqandroid:0.38.0"
)
}
}
...
...
@@ -34,8 +33,7 @@ kotlin {
api
(
kotlin
(
"test"
))
api
(
kotlin
(
"test-junit"
))
runtimeOnly
(
project
(
":mirai-core-qqandroid"
))
compileOnly
(
"net.mamoe:mirai-core-qqandroid-jvm:0.33.0"
)
api
(
kotlinx
(
"coroutines-core"
,
Versions
.
Kotlin
.
coroutines
))
compileOnly
(
"net.mamoe:mirai-core-qqandroid:0.38.0"
)
}
}
}
...
...
java-compatibility-validator/build.gradle.kts
0 → 100644
View file @
15527b56
@
file
:
Suppress
(
"UNUSED_VARIABLE"
)
plugins
{
kotlin
(
"jvm"
)
java
}
description
=
"Java compatibility validator for mirai-core and mirai-core-qqandroid"
repositories
{
mavenCentral
()
jcenter
()
}
kotlin
{
sourceSets
{
all
{
languageSettings
.
enableLanguageFeature
(
"InlineClasses"
)
languageSettings
.
useExperimentalAnnotation
(
"kotlin.Experimental"
)
}
main
{
dependencies
{
api
(
kotlin
(
"stdlib"
))
api
(
project
(
":mirai-core-qqandroid"
))
}
}
test
{
dependencies
{
api
(
kotlin
(
"stdlib"
))
api
(
kotlin
(
"test"
))
api
(
kotlin
(
"test-junit"
))
api
(
project
(
":mirai-core-qqandroid"
))
}
}
}
}
tasks
.
withType
<
org
.
jetbrains
.
kotlin
.
gradle
.
tasks
.
KotlinCompile
>
{
kotlinOptions
.
jvmTarget
=
"1.8"
}
java
{
sourceCompatibility
=
JavaVersion
.
VERSION_1_8
targetCompatibility
=
JavaVersion
.
VERSION_1_8
}
\ No newline at end of file
java-compatibility-validator/src/main/java/test/MPPCompatibilityTest.java
0 → 100644
View file @
15527b56
package
test
;
import
net.mamoe.mirai.Bot
;
import
net.mamoe.mirai.contact.Contact
;
import
net.mamoe.mirai.contact.QQ
;
/*
* Copyright 2020 Mamoe Technologies and contributors.
*
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
*
* https://github.com/mamoe/mirai/blob/master/LICENSE
*/
public
class
MPPCompatibilityTest
{
public
static
void
main
(
String
[]
args
)
{
final
QQ
next
=
Bot
.
getInstances
().
get
(
0
).
getFriends
().
iterator
().
next
();
((
Contact
)
next
).
sendMessage
(
""
);
}
}
settings.gradle
View file @
15527b56
...
...
@@ -24,6 +24,7 @@ rootProject.name = 'mirai'
include
(
':mirai-core'
)
include
(
':mirai-core-qqandroid'
)
//include(':compatibility-validator') // THIS WILL CAUSE A DEPENDENCY RESOLUTION BUG
//include(':java-compatibility-validator')
// include(':mirai-api-http')
enableFeaturePreview
(
'GRADLE_METADATA'
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment