Move packets to their own project
This commit is contained in:
parent
b021a4b753
commit
0689944d77
23 changed files with 27 additions and 6 deletions
|
@ -1,5 +1,4 @@
|
|||
# Blokk
|
||||
## To Do
|
||||
- Move packets to their own project
|
||||
- Stop Using Spek
|
||||
- Support packet compression
|
||||
|
|
|
@ -12,7 +12,7 @@ repositories {
|
|||
val nettyVersion = properties["version.netty"].toString()
|
||||
|
||||
dependencies {
|
||||
api(project(":blokk-api"))
|
||||
api(project(":blokk-packets"))
|
||||
|
||||
// Netty
|
||||
api("io.netty:netty-buffer:${nettyVersion}")
|
||||
|
|
20
blokk-packets/build.gradle.kts
Normal file
20
blokk-packets/build.gradle.kts
Normal file
|
@ -0,0 +1,20 @@
|
|||
plugins {
|
||||
kotlin("jvm")
|
||||
}
|
||||
|
||||
group = rootProject.group
|
||||
version = rootProject.version
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(project(":blokk-api"))
|
||||
}
|
||||
|
||||
tasks {
|
||||
compileKotlin {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
}
|
||||
}
|
|
@ -4,15 +4,13 @@ import space.blokk.net.packets.IncomingPacket
|
|||
|
||||
/**
|
||||
* This is the first packet a client should send. Per default, the server immediately switches
|
||||
* the [session's currentProtocol][space.blokk.net.Session.currentProtocol] to
|
||||
* `STATUS` or `LOGIN`,
|
||||
* the [session's currentProtocol][space.blokk.net.Session.currentProtocol] to `STATUS` or `LOGIN`,
|
||||
* depending on the value of [loginAttempt].
|
||||
*
|
||||
* @param protocolVersion The number of the [protocol version](https://wiki.vg/Protocol_version_numbers) used by the client.
|
||||
* @param serverAddress Hostname or IP address that was used to connect.
|
||||
* @param serverPort Port that was used to connect.
|
||||
* @param loginAttempt Whether the server should use the `STATUS` or
|
||||
* the `LOGIN` protocol from now on.
|
||||
* @param loginAttempt Whether the server should use the `STATUS` or the `LOGIN` protocol from now on.
|
||||
*/
|
||||
data class HandshakePacket(
|
||||
val protocolVersion: Int,
|
|
@ -1,5 +1,6 @@
|
|||
plugins {
|
||||
kotlin("jvm")
|
||||
kotlin("kapt")
|
||||
id("com.github.johnrengelman.shadow") version "6.0.0"
|
||||
}
|
||||
|
||||
|
@ -23,6 +24,7 @@ dependencies {
|
|||
|
||||
// Blokk
|
||||
implementation(project(":blokk-api"))
|
||||
implementation(project(":blokk-packets"))
|
||||
implementation(project(":blokk-packet-codecs"))
|
||||
|
||||
// Logging
|
||||
|
@ -42,6 +44,7 @@ dependencies {
|
|||
implementation("com.squareup.okhttp3:okhttp:4.8.1")
|
||||
implementation("com.sksamuel.hoplite:hoplite-core:1.3.3")
|
||||
implementation("com.sksamuel.hoplite:hoplite-yaml:1.3.3")
|
||||
kapt("com.squareup.moshi:moshi-kotlin-codegen:${moshiVersion}")
|
||||
}
|
||||
|
||||
tasks {
|
||||
|
|
|
@ -9,4 +9,5 @@ rootProject.name = "blokk"
|
|||
|
||||
include(":blokk-api")
|
||||
include(":blokk-server")
|
||||
include(":blokk-packets")
|
||||
include(":blokk-packet-codecs")
|
||||
|
|
Reference in a new issue