Moved debuggers from mirai-core to mirai-debug

This commit is contained in:
Him188 2019-10-02 20:50:31 +08:00
parent 8e33e07ceb
commit 39d8406018
9 changed files with 106 additions and 14 deletions

2
.gitignore vendored
View File

@ -13,7 +13,7 @@
# Package Files #
*.war
*.jar
!/mirai-core/lib/jpcap.jar
!/mirai-debug/lib/jpcap.jar
*.nar
*.ear
*.zip

View File

@ -23,7 +23,7 @@
<artifactId>jpcap</artifactId>
<version>0.1.18-002</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jpcap.jar</systemPath>
<systemPath>../mirai-debug/lib/jpcap.jar</systemPath>
</dependency>
<dependency>

View File

@ -1,8 +0,0 @@
import net.mamoe.mirai.utils.toUHexString
/**
* @author Him188moe
*/
fun main() {
println("牛逼".toByteArray().toUHexString())
}

101
mirai-debug/pom.xml Normal file
View File

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>mirai-debug</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<parent>
<groupId>net.mamoe</groupId>
<artifactId>mirai</artifactId>
<version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<dependencies>
<dependency>
<groupId>net.mamoe</groupId>
<artifactId>mirai-core</artifactId>
<version>1.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/jpcap/jpcap -->
<dependency>
<groupId>jpcap</groupId>
<artifactId>jpcap</artifactId>
<version>0.1.18-002</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jpcap.jar</systemPath>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines-core</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-reflect</artifactId>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main/kotlin</sourceDirectory>
<resources>
<resource>
<directory>/src/main/resources</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<configuration>
<args>
<arg>-XXLanguage:+InlineClasses</arg>
</args>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -5,10 +5,7 @@ import jpcap.packet.IPPacket
import jpcap.packet.UDPPacket
import net.mamoe.mirai.network.protocol.tim.TIMProtocol
import net.mamoe.mirai.network.protocol.tim.packet.*
import net.mamoe.mirai.network.protocol.tim.packet.login.ServerLoginResponseFailedPacket
import net.mamoe.mirai.network.protocol.tim.packet.login.ServerLoginResponseKeyExchangePacket
import net.mamoe.mirai.network.protocol.tim.packet.login.ServerLoginResponseSuccessPacket
import net.mamoe.mirai.network.protocol.tim.packet.login.ServerLoginResponseVerificationCodeInitPacket
import net.mamoe.mirai.network.protocol.tim.packet.login.*
import net.mamoe.mirai.utils.*
import java.io.DataInputStream

View File

@ -15,6 +15,8 @@
<module>mirai-console</module>
<module>mirai-api</module>
<module>mirai-demos</module>
<module>mirai-debug</module>
</modules>
<repositories>