diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000000000000000000000000000000000..53c4ab343b555af463b79cdc4e0fb84fa1674e0e --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +/*.yml +/*.md +/Dockerfile* +build/ diff --git a/.gitignore b/.gitignore index 49ca4c228ed79f9d56056083a5bfcf559e1cd597..1c376df641bbe7b4c7ccd2c185efa2e8938c5d02 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,4 @@ /.idea/* !/.idea/copyright/ .DS_Store -/captures build/ -/reports/ -/persistence/schemas/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c3aab52e7ed402a861f75316c036d5639fabc2c7..b9395ae77745ee918e3aa58bb402934268932cd2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: "k8r.eu/justjanne/quasseldroid-build-env:5d24a78" +image: "k8r.eu/justjanne/quasseldroid-build-env:latest" cache: key: "$CI_PROJECT_NAME" @@ -43,7 +43,7 @@ test: - if: "$CI_COMMIT_BRANCH == 'master'" when: on_success -release: +release-artifacts: stage: "release" cache: { } script: @@ -54,3 +54,16 @@ release: rules: - if: "$CI_COMMIT_TAG != '' && $CI_COMMIT_BRANCH == 'master'" when: on_success +release-docs: + stage: "release" + cache: { } + image: + name: gcr.io/kaniko-project/executor:debug + entrypoint: [""] + script: + - mkdir -p /kaniko/.docker + - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json + - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:${CI_COMMIT_TAG:-$CI_COMMIT_SHORT_SHA}-docs --destination $CI_REGISTRY_IMAGE:docs + rules: + - if: "$CI_COMMIT_BRANCH == 'master'" + when: on_success diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..9d08654ee9ec8ae58abb134f17ec5f326daf394d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM k8r.eu/justjanne/quasseldroid-build-env:5d24a78 as builder +RUN mkdir /build && \ + mkdir /build/.gradle +COPY . /build/src +WORKDIR /build/src/ +ENV GRADLE_USER_HOME=/build/.gradle +RUN /build/src/gradlew dokkaHtmlMultiModule + +FROM nginx:stable-alpine +COPY --from=builder /build/src/build/dokka/htmlMultiModule/ /usr/share/nginx/html/javadoc +EXPOSE 80 diff --git a/build.gradle.kts b/build.gradle.kts index 8ab34c8081ce7b85db0df073f821c51a2caafd05..f468b554a52c5f58fe2ce0b3e80ae931f97284ae 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,7 +2,6 @@ import de.justjanne.coverageconverter.CoverageConverterExtension plugins { id("org.jlleitschuh.gradle.ktlint") version "10.0.0" apply false - id("org.jetbrains.dokka") version "1.4.20" apply false id("com.vanniktech.maven.publish") version "0.13.0" apply false id("de.justjanne.jacoco-cobertura-converter") apply false } @@ -12,17 +11,13 @@ buildscript { mavenCentral() } dependencies { + classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.4.20") classpath("org.jetbrains.kotlin", "kotlin-gradle-plugin", "1.4.30") } } -subprojects { - apply(plugin = "org.jetbrains.kotlin.jvm") +allprojects { apply(plugin = "org.jetbrains.dokka") - apply(plugin = "org.jlleitschuh.gradle.ktlint") - apply(plugin = "jacoco") - apply(plugin = "de.justjanne.jacoco-cobertura-converter") - repositories { mavenCentral() exclusiveContent { @@ -41,6 +36,13 @@ subprojects { } } } +} + +subprojects { + apply(plugin = "org.jetbrains.kotlin.jvm") + apply(plugin = "org.jlleitschuh.gradle.ktlint") + apply(plugin = "jacoco") + apply(plugin = "de.justjanne.jacoco-cobertura-converter") dependencies { val implementation by configurations diff --git a/libquassel-protocol/src/main/kotlin/de/justjanne/libquassel/protocol/types/HandshakeMessage.kt b/libquassel-protocol/src/main/kotlin/de/justjanne/libquassel/protocol/types/HandshakeMessage.kt index 447e6a299f1a637bcd9f100bc123683b2d5afaee..442f5354e4a4b5643da295f92e7e4364d0906aa4 100644 --- a/libquassel-protocol/src/main/kotlin/de/justjanne/libquassel/protocol/types/HandshakeMessage.kt +++ b/libquassel-protocol/src/main/kotlin/de/justjanne/libquassel/protocol/types/HandshakeMessage.kt @@ -30,6 +30,7 @@ import de.justjanne.libquassel.protocol.variant.QVariantMap sealed class HandshakeMessage { /** * Client registration message containing metadata about the connecting client + * * Core should respond with either [ClientInitAck] or [ClientInitReject] */ data class ClientInit( @@ -54,7 +55,9 @@ sealed class HandshakeMessage { /** * Message representing a successful client registration attempt + * * Contains metadata about the core + * * Client should proceed with either [ClientLogin] or [CoreSetupData] */ data class ClientInitAck( @@ -85,10 +88,11 @@ sealed class HandshakeMessage { /** * Message representing a failed client registration attempt + * * Client should abort the connection */ data class ClientInitReject( - /**Username + /** * HTML-formatted error message */ val errorString: String? @@ -96,6 +100,7 @@ sealed class HandshakeMessage { /** * Client login message containing authentication data + * * Core should respond with either [ClientLoginAck] or [ClientLoginReject] */ data class ClientLogin( @@ -111,6 +116,7 @@ sealed class HandshakeMessage { /** * Message representing a successful client login attempt + * * Client will receive [SessionInit] immediately afterwards */ object ClientLoginAck : HandshakeMessage() { @@ -121,6 +127,7 @@ sealed class HandshakeMessage { /** * Message representing a failed client login attempt + * * Client should retry with different [ClientLogin] or abort the connection */ data class ClientLoginReject( @@ -132,6 +139,7 @@ sealed class HandshakeMessage { /** * Message representing a successful core configuration attempt + * * Client should proceed with [ClientLogin] */ object CoreSetupAck : HandshakeMessage() { @@ -142,7 +150,9 @@ sealed class HandshakeMessage { /** * Core configuration message containing initial configuration properties + * * Configuration has to happen before login + * * Core should respond with either [CoreSetupAck] or [CoreSetupReject] */ data class CoreSetupData( @@ -174,6 +184,7 @@ sealed class HandshakeMessage { /** * Message representing a failed core configuration attempt + * * Client should retry with different [CoreSetupData] or abort the connection */ data class CoreSetupReject( @@ -189,18 +200,21 @@ sealed class HandshakeMessage { data class SessionInit( /** * List of Identity sync objects existing at the current time + * * Identity objects created or modified after [SessionInit] will be defined * via sync updates and RPC identity creation messages */ val identities: QVariantList?, /** * List of existing buffers at the current time + * * Buffers created or deleted after [SessionInit] will be defined via RPC * messages */ val bufferInfos: QVariantList?, /** * List of Ids of Network sync objects existing at the current time + * * Network objects created or modified after [SessionInit] will be defined * via sync updates and RPC identity creation messages */