diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index 36949df5..00000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "recommendations": [ - - "nrwl.angular-console", - "esbenp.prettier-vscode" - ] -} diff --git a/apps/server/build.gradle.kts b/apps/server/build.gradle.kts index b671eb31..ccd4b00d 100644 --- a/apps/server/build.gradle.kts +++ b/apps/server/build.gradle.kts @@ -41,6 +41,7 @@ dependencies { implementation("com.github.ajalt.clikt:clikt:$cliktVersion") implementation(project(":libs:server:domain")) + implementation(project(":libs:server:gateway")) implementation(project(":libs:server:persistence")) implementation(project(":libs:server:storage:azure")) implementation(project(":libs:server:storage:core")) diff --git a/apps/server/project.json b/apps/server/project.json index b666c8f7..59da070b 100644 --- a/apps/server/project.json +++ b/apps/server/project.json @@ -6,7 +6,7 @@ "targets": { "build": { "executor": "@jnxplus/nx-gradle:run-task", - "outputs": ["{projectRoot}/build"], + "outputs": ["{projectRoot}/build/classes", "{projectRoot}/build/libs"], "options": { "task": "quarkusBuild" } @@ -58,11 +58,7 @@ "options": { "task": "test" }, - "outputs": [ - "{projectRoot}/build/classes", - "{projectRoot}/build/reports", - "{projectRoot}/build/test-results" - ] + "outputs": ["{projectRoot}/build/jacoco-report"] }, "integration-test": { "executor": "@jnxplus/nx-gradle:run-task", diff --git a/apps/server/src/main/kotlin/org/nxcloudce/server/technical/producer/DomainUseCaseProducers.kt b/apps/server/src/main/kotlin/org/nxcloudce/server/technical/producer/DomainUseCaseProducers.kt index 88b3614b..f0857910 100644 --- a/apps/server/src/main/kotlin/org/nxcloudce/server/technical/producer/DomainUseCaseProducers.kt +++ b/apps/server/src/main/kotlin/org/nxcloudce/server/technical/producer/DomainUseCaseProducers.kt @@ -18,8 +18,8 @@ import org.nxcloudce.server.domain.workspace.interactor.GetWorkspaceAccessTokenI import org.nxcloudce.server.domain.workspace.usecase.CreateOrgAndWorkspace import org.nxcloudce.server.domain.workspace.usecase.CreateWorkspace import org.nxcloudce.server.domain.workspace.usecase.GetWorkspaceAccessToken -import org.nxcloudce.server.persistence.gateway.* -import org.nxcloudce.server.storage.gateway.StorageServiceImpl +import org.nxcloudce.server.gateway.persistence.* +import org.nxcloudce.server.gateway.storage.StorageServiceImpl @ApplicationScoped class DomainUseCaseProducers( diff --git a/apps/server/src/main/resources/application.yaml b/apps/server/src/main/resources/application.yaml index aeeaf520..2d115ac8 100644 --- a/apps/server/src/main/resources/application.yaml +++ b/apps/server/src/main/resources/application.yaml @@ -1,7 +1,6 @@ quarkus: http: - port: - 8080 + port: 8080 root-path: "/nx-cloud" mongodb: database: nx-cloud-ce diff --git a/libs/server/domain/project.json b/libs/server/domain/project.json index 068cf278..bc7f9a2d 100644 --- a/libs/server/domain/project.json +++ b/libs/server/domain/project.json @@ -9,7 +9,7 @@ "options": { "task": "build" }, - "outputs": ["{projectRoot}/build"] + "outputs": ["{projectRoot}/build/classes", "{projectRoot}/build/libs"] }, "lint": { "executor": "@jnxplus/nx-gradle:run-task", @@ -28,11 +28,7 @@ "options": { "task": "test" }, - "outputs": [ - "{projectRoot}/build/classes", - "{projectRoot}/build/reports", - "{projectRoot}/build/test-results" - ] + "outputs": ["{projectRoot}/build/jacoco-report"] } }, "tags": [] diff --git a/libs/server/gateway/README.md b/libs/server/gateway/README.md new file mode 100644 index 00000000..71574420 --- /dev/null +++ b/libs/server/gateway/README.md @@ -0,0 +1,5 @@ +# libs/server/gateway + +This library is part of [`apps/server`](../../../apps/server) application. + +It contains all implementation of `gateway`s defined by the `libs/server/domain` layer. diff --git a/libs/server/gateway/build.gradle.kts b/libs/server/gateway/build.gradle.kts new file mode 100644 index 00000000..f1c25dc1 --- /dev/null +++ b/libs/server/gateway/build.gradle.kts @@ -0,0 +1,80 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + +plugins { + kotlin("jvm") + kotlin("plugin.allopen") + id("io.quarkus") + id("com.diffplug.spotless") +} + +repositories { + mavenCentral() + mavenLocal() +} + +val javaVersion: String by project +val quarkusPlatformGroupId: String by project +val quarkusPlatformArtifactId: String by project +val quarkusPlatformVersion: String by project +val ktlintVersion: String by project +val atriumVersion: String by project +val mockkVersion: String by project +val quarkusMockkVersion: String by project + +dependencies { + implementation(enforcedPlatform("$quarkusPlatformGroupId:$quarkusPlatformArtifactId:$quarkusPlatformVersion")) + implementation("io.quarkus:quarkus-kotlin") + implementation("io.quarkus:quarkus-mongodb-panache-kotlin") + + implementation(project(":libs:server:domain")) + implementation(project(":libs:server:persistence")) + implementation(project(":libs:server:storage:core")) + + testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test") + testImplementation("ch.tutteli.atrium:atrium-fluent:$atriumVersion") + testImplementation("io.mockk:mockk:$mockkVersion") + testImplementation("io.quarkiverse.mockk:quarkus-junit5-mockk:$quarkusMockkVersion") + testImplementation("io.quarkus:quarkus-junit5") + testImplementation("io.quarkus:quarkus-jacoco") + testImplementation("io.quarkus:quarkus-test-hibernate-reactive-panache") +} + +group = "org.nxcloudce.server" +version = "0.4.2" + +java { + sourceCompatibility = JavaVersion.toVersion(javaVersion) + targetCompatibility = JavaVersion.toVersion(javaVersion) +} + +tasks.withType { + archiveBaseName = "${project.group}.${project.name}" +} + +tasks.withType { + systemProperty("java.util.logging.manager", "org.jboss.logmanager.LogManager") +} + +allOpen { + annotation("jakarta.enterprise.context.ApplicationScoped") + annotation("io.quarkus.test.junit.QuarkusTest") +} + +kotlin { + compilerOptions { + freeCompilerArgs.add("-Xjsr305=strict") + jvmTarget = JvmTarget.fromTarget(javaVersion) + javaParameters = true + } +} + +spotless { + kotlin { + ktlint(ktlintVersion) + } + + kotlinGradle { + target("*.gradle.kts") + ktlint(ktlintVersion) + } +} diff --git a/libs/server/gateway/project.json b/libs/server/gateway/project.json new file mode 100644 index 00000000..c119f163 --- /dev/null +++ b/libs/server/gateway/project.json @@ -0,0 +1,35 @@ +{ + "name": "libs/server/gateway", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", + "projectType": "library", + "sourceRoot": "libs/server/gateway/src", + "targets": { + "build": { + "executor": "@jnxplus/nx-gradle:run-task", + "options": { + "task": "build" + }, + "outputs": ["{projectRoot}/build/classes", "{projectRoot}/build/libs"] + }, + "lint": { + "executor": "@jnxplus/nx-gradle:run-task", + "options": { + "task": "spotlessCheck" + } + }, + "format": { + "executor": "@jnxplus/nx-gradle:run-task", + "options": { + "task": "spotlessApply" + } + }, + "test": { + "executor": "@jnxplus/nx-gradle:run-task", + "options": { + "task": "test" + }, + "outputs": ["{projectRoot}/build/jacoco-report"] + } + }, + "tags": [] +} diff --git a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/AccessTokenMapper.kt b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/AccessTokenMapper.kt similarity index 91% rename from apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/AccessTokenMapper.kt rename to libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/AccessTokenMapper.kt index 8f6cc562..5eaeaa5b 100644 --- a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/AccessTokenMapper.kt +++ b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/AccessTokenMapper.kt @@ -1,4 +1,4 @@ -package org.nxcloudce.server.persistence.gateway +package org.nxcloudce.server.gateway.persistence import org.nxcloudce.server.domain.workspace.model.* import org.nxcloudce.server.persistence.entity.AccessTokenEntity diff --git a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/AccessTokenRepositoryImpl.kt b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/AccessTokenRepositoryImpl.kt similarity index 97% rename from apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/AccessTokenRepositoryImpl.kt rename to libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/AccessTokenRepositoryImpl.kt index 1724e8e8..038e9df4 100644 --- a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/AccessTokenRepositoryImpl.kt +++ b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/AccessTokenRepositoryImpl.kt @@ -1,4 +1,4 @@ -package org.nxcloudce.server.persistence.gateway +package org.nxcloudce.server.gateway.persistence import io.smallrye.mutiny.Uni import io.smallrye.mutiny.coroutines.awaitSuspending diff --git a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/ArtifactMapper.kt b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/ArtifactMapper.kt similarity index 90% rename from apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/ArtifactMapper.kt rename to libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/ArtifactMapper.kt index cb1fe6ea..7079d35a 100644 --- a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/ArtifactMapper.kt +++ b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/ArtifactMapper.kt @@ -1,4 +1,4 @@ -package org.nxcloudce.server.persistence.gateway +package org.nxcloudce.server.gateway.persistence import org.nxcloudce.server.domain.run.model.Artifact import org.nxcloudce.server.domain.run.model.ArtifactId diff --git a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/ArtifactRepositoryImpl.kt b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/ArtifactRepositoryImpl.kt similarity index 97% rename from apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/ArtifactRepositoryImpl.kt rename to libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/ArtifactRepositoryImpl.kt index 3d7b1c25..d62b450e 100644 --- a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/ArtifactRepositoryImpl.kt +++ b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/ArtifactRepositoryImpl.kt @@ -1,4 +1,4 @@ -package org.nxcloudce.server.persistence.gateway +package org.nxcloudce.server.gateway.persistence import io.smallrye.mutiny.coroutines.awaitSuspending import jakarta.enterprise.context.ApplicationScoped diff --git a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/OrganizationMapper.kt b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/OrganizationMapper.kt similarity index 90% rename from apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/OrganizationMapper.kt rename to libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/OrganizationMapper.kt index a45f1ee9..54c8680e 100644 --- a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/OrganizationMapper.kt +++ b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/OrganizationMapper.kt @@ -1,4 +1,4 @@ -package org.nxcloudce.server.persistence.gateway +package org.nxcloudce.server.gateway.persistence import org.nxcloudce.server.domain.organization.model.Organization import org.nxcloudce.server.domain.organization.model.OrganizationId diff --git a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/OrganizationRepositoryImpl.kt b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/OrganizationRepositoryImpl.kt similarity index 96% rename from apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/OrganizationRepositoryImpl.kt rename to libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/OrganizationRepositoryImpl.kt index f00759b8..ed9e3116 100644 --- a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/OrganizationRepositoryImpl.kt +++ b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/OrganizationRepositoryImpl.kt @@ -1,4 +1,4 @@ -package org.nxcloudce.server.persistence.gateway +package org.nxcloudce.server.gateway.persistence import io.smallrye.mutiny.Uni import io.smallrye.mutiny.coroutines.awaitSuspending diff --git a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/RunMapper.kt b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/RunMapper.kt similarity index 98% rename from apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/RunMapper.kt rename to libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/RunMapper.kt index db05f6d4..10b8ea69 100644 --- a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/RunMapper.kt +++ b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/RunMapper.kt @@ -1,4 +1,4 @@ -package org.nxcloudce.server.persistence.gateway +package org.nxcloudce.server.gateway.persistence import org.bson.types.ObjectId import org.nxcloudce.server.domain.run.model.* @@ -49,7 +49,7 @@ fun RunEntity.toDomain(): Run = this@toDomain.projectGraph?.let { projectGraph -> ProjectGraph( nodes = - projectGraph.nodes?.let { + projectGraph.nodes.let { it.mapValues { (_, node) -> ProjectGraph.Project( type = node.type, @@ -82,7 +82,7 @@ fun RunEntity.toDomain(): Run = } }, dependencies = - projectGraph.dependencies?.let { + projectGraph.dependencies.let { it.mapValues { (_, dependencies) -> dependencies.map { dependency -> ProjectGraph.Dependency( diff --git a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/RunRepositoryImpl.kt b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/RunRepositoryImpl.kt similarity index 96% rename from apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/RunRepositoryImpl.kt rename to libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/RunRepositoryImpl.kt index b94d8270..c098327f 100644 --- a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/RunRepositoryImpl.kt +++ b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/RunRepositoryImpl.kt @@ -1,4 +1,4 @@ -package org.nxcloudce.server.persistence.gateway +package org.nxcloudce.server.gateway.persistence import io.smallrye.mutiny.coroutines.asFlow import io.smallrye.mutiny.coroutines.awaitSuspending diff --git a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/TaskMapper.kt b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/TaskMapper.kt similarity index 97% rename from apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/TaskMapper.kt rename to libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/TaskMapper.kt index 120d8536..4be0c2a0 100644 --- a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/TaskMapper.kt +++ b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/TaskMapper.kt @@ -1,4 +1,4 @@ -package org.nxcloudce.server.persistence.gateway +package org.nxcloudce.server.gateway.persistence import org.bson.types.ObjectId import org.nxcloudce.server.domain.run.model.* diff --git a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/TaskRepositoryImpl.kt b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/TaskRepositoryImpl.kt similarity index 96% rename from apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/TaskRepositoryImpl.kt rename to libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/TaskRepositoryImpl.kt index 1759fdb7..0b4ae220 100644 --- a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/TaskRepositoryImpl.kt +++ b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/TaskRepositoryImpl.kt @@ -1,4 +1,4 @@ -package org.nxcloudce.server.persistence.gateway +package org.nxcloudce.server.gateway.persistence import io.smallrye.mutiny.coroutines.asFlow import io.smallrye.mutiny.coroutines.awaitSuspending diff --git a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/TaskRunnerMetricMapper.kt b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/TaskRunnerMetricMapper.kt similarity index 95% rename from apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/TaskRunnerMetricMapper.kt rename to libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/TaskRunnerMetricMapper.kt index 785d05db..a5a0a985 100644 --- a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/TaskRunnerMetricMapper.kt +++ b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/TaskRunnerMetricMapper.kt @@ -1,4 +1,4 @@ -package org.nxcloudce.server.persistence.gateway +package org.nxcloudce.server.gateway.persistence import org.bson.types.ObjectId import org.nxcloudce.server.domain.metric.model.TaskRunnerMetric diff --git a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/TaskRunnerMetricRepositoryImpl.kt b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/TaskRunnerMetricRepositoryImpl.kt similarity index 95% rename from apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/TaskRunnerMetricRepositoryImpl.kt rename to libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/TaskRunnerMetricRepositoryImpl.kt index bb886ac9..4b50674a 100644 --- a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/TaskRunnerMetricRepositoryImpl.kt +++ b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/TaskRunnerMetricRepositoryImpl.kt @@ -1,4 +1,4 @@ -package org.nxcloudce.server.persistence.gateway +package org.nxcloudce.server.gateway.persistence import io.smallrye.mutiny.coroutines.awaitSuspending import jakarta.enterprise.context.ApplicationScoped diff --git a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/WorkspaceMapper.kt b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/WorkspaceMapper.kt similarity index 94% rename from apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/WorkspaceMapper.kt rename to libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/WorkspaceMapper.kt index 40f11127..36d72102 100644 --- a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/WorkspaceMapper.kt +++ b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/WorkspaceMapper.kt @@ -1,4 +1,4 @@ -package org.nxcloudce.server.persistence.gateway +package org.nxcloudce.server.gateway.persistence import org.bson.types.ObjectId import org.nxcloudce.server.domain.organization.model.OrganizationId diff --git a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/WorkspaceRepositoryImpl.kt b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/WorkspaceRepositoryImpl.kt similarity index 96% rename from apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/WorkspaceRepositoryImpl.kt rename to libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/WorkspaceRepositoryImpl.kt index accbd180..7576cbe1 100644 --- a/apps/server/src/main/kotlin/org/nxcloudce/server/persistence/gateway/WorkspaceRepositoryImpl.kt +++ b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/persistence/WorkspaceRepositoryImpl.kt @@ -1,4 +1,4 @@ -package org.nxcloudce.server.persistence.gateway +package org.nxcloudce.server.gateway.persistence import io.smallrye.mutiny.Uni import io.smallrye.mutiny.coroutines.awaitSuspending diff --git a/apps/server/src/main/kotlin/org/nxcloudce/server/storage/gateway/StorageServiceImpl.kt b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/storage/StorageServiceImpl.kt similarity index 95% rename from apps/server/src/main/kotlin/org/nxcloudce/server/storage/gateway/StorageServiceImpl.kt rename to libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/storage/StorageServiceImpl.kt index c5442f09..b1a80374 100644 --- a/apps/server/src/main/kotlin/org/nxcloudce/server/storage/gateway/StorageServiceImpl.kt +++ b/libs/server/gateway/src/main/kotlin/org/nxcloudce/server/gateway/storage/StorageServiceImpl.kt @@ -1,4 +1,4 @@ -package org.nxcloudce.server.storage.gateway +package org.nxcloudce.server.gateway.storage import jakarta.enterprise.context.ApplicationScoped import jakarta.enterprise.inject.Instance diff --git a/libs/server/domain/src/main/resources/META-INF/beans.xml b/libs/server/gateway/src/main/resources/META-INF/beans.xml similarity index 100% rename from libs/server/domain/src/main/resources/META-INF/beans.xml rename to libs/server/gateway/src/main/resources/META-INF/beans.xml diff --git a/apps/server/src/test/kotlin/org/nxcloudce/server/persistence/gateway/AccessTokenRepositoryImplTest.kt b/libs/server/gateway/src/test/kotlin/org/nxcloudce/server/gateway/persistence/AccessTokenRepositoryImplTest.kt similarity index 98% rename from apps/server/src/test/kotlin/org/nxcloudce/server/persistence/gateway/AccessTokenRepositoryImplTest.kt rename to libs/server/gateway/src/test/kotlin/org/nxcloudce/server/gateway/persistence/AccessTokenRepositoryImplTest.kt index 0ab5b0fc..98d3ba0d 100644 --- a/apps/server/src/test/kotlin/org/nxcloudce/server/persistence/gateway/AccessTokenRepositoryImplTest.kt +++ b/libs/server/gateway/src/test/kotlin/org/nxcloudce/server/gateway/persistence/AccessTokenRepositoryImplTest.kt @@ -1,4 +1,4 @@ -package org.nxcloudce.server.persistence.gateway +package org.nxcloudce.server.gateway.persistence import ch.tutteli.atrium.api.fluent.en_GB.its import ch.tutteli.atrium.api.fluent.en_GB.notToEqualNull diff --git a/apps/server/src/test/kotlin/org/nxcloudce/server/persistence/gateway/ArtifactRepositoryImplTest.kt b/libs/server/gateway/src/test/kotlin/org/nxcloudce/server/gateway/persistence/ArtifactRepositoryImplTest.kt similarity index 98% rename from apps/server/src/test/kotlin/org/nxcloudce/server/persistence/gateway/ArtifactRepositoryImplTest.kt rename to libs/server/gateway/src/test/kotlin/org/nxcloudce/server/gateway/persistence/ArtifactRepositoryImplTest.kt index 4d411917..9e9e7aee 100644 --- a/apps/server/src/test/kotlin/org/nxcloudce/server/persistence/gateway/ArtifactRepositoryImplTest.kt +++ b/libs/server/gateway/src/test/kotlin/org/nxcloudce/server/gateway/persistence/ArtifactRepositoryImplTest.kt @@ -1,4 +1,4 @@ -package org.nxcloudce.server.persistence.gateway +package org.nxcloudce.server.gateway.persistence import ch.tutteli.atrium.api.fluent.en_GB.* import ch.tutteli.atrium.api.verbs.expect diff --git a/apps/server/src/test/kotlin/org/nxcloudce/server/persistence/gateway/OrganizationRepositoryImplTest.kt b/libs/server/gateway/src/test/kotlin/org/nxcloudce/server/gateway/persistence/OrganizationRepositoryImplTest.kt similarity index 97% rename from apps/server/src/test/kotlin/org/nxcloudce/server/persistence/gateway/OrganizationRepositoryImplTest.kt rename to libs/server/gateway/src/test/kotlin/org/nxcloudce/server/gateway/persistence/OrganizationRepositoryImplTest.kt index 8a0d6167..d1087666 100644 --- a/apps/server/src/test/kotlin/org/nxcloudce/server/persistence/gateway/OrganizationRepositoryImplTest.kt +++ b/libs/server/gateway/src/test/kotlin/org/nxcloudce/server/gateway/persistence/OrganizationRepositoryImplTest.kt @@ -1,4 +1,4 @@ -package org.nxcloudce.server.persistence.gateway +package org.nxcloudce.server.gateway.persistence import ch.tutteli.atrium.api.fluent.en_GB.its import ch.tutteli.atrium.api.fluent.en_GB.toEqual diff --git a/apps/server/src/test/kotlin/org/nxcloudce/server/persistence/gateway/RunRepositoryImplTest.kt b/libs/server/gateway/src/test/kotlin/org/nxcloudce/server/gateway/persistence/RunRepositoryImplTest.kt similarity index 99% rename from apps/server/src/test/kotlin/org/nxcloudce/server/persistence/gateway/RunRepositoryImplTest.kt rename to libs/server/gateway/src/test/kotlin/org/nxcloudce/server/gateway/persistence/RunRepositoryImplTest.kt index 48cd840a..7665ce92 100644 --- a/apps/server/src/test/kotlin/org/nxcloudce/server/persistence/gateway/RunRepositoryImplTest.kt +++ b/libs/server/gateway/src/test/kotlin/org/nxcloudce/server/gateway/persistence/RunRepositoryImplTest.kt @@ -1,4 +1,4 @@ -package org.nxcloudce.server.persistence.gateway +package org.nxcloudce.server.gateway.persistence import ch.tutteli.atrium.api.fluent.en_GB.its import ch.tutteli.atrium.api.fluent.en_GB.toEqual diff --git a/apps/server/src/test/kotlin/org/nxcloudce/server/persistence/gateway/TaskRepositoryImplTest.kt b/libs/server/gateway/src/test/kotlin/org/nxcloudce/server/gateway/persistence/TaskRepositoryImplTest.kt similarity index 99% rename from apps/server/src/test/kotlin/org/nxcloudce/server/persistence/gateway/TaskRepositoryImplTest.kt rename to libs/server/gateway/src/test/kotlin/org/nxcloudce/server/gateway/persistence/TaskRepositoryImplTest.kt index acf73c41..7ad62b23 100644 --- a/apps/server/src/test/kotlin/org/nxcloudce/server/persistence/gateway/TaskRepositoryImplTest.kt +++ b/libs/server/gateway/src/test/kotlin/org/nxcloudce/server/gateway/persistence/TaskRepositoryImplTest.kt @@ -1,4 +1,4 @@ -package org.nxcloudce.server.persistence.gateway +package org.nxcloudce.server.gateway.persistence import ch.tutteli.atrium.api.fluent.en_GB.toEqual import ch.tutteli.atrium.api.verbs.expect diff --git a/apps/server/src/test/kotlin/org/nxcloudce/server/persistence/gateway/TaskRunnerMetricRepositoryImplTest.kt b/libs/server/gateway/src/test/kotlin/org/nxcloudce/server/gateway/persistence/TaskRunnerMetricRepositoryImplTest.kt similarity index 97% rename from apps/server/src/test/kotlin/org/nxcloudce/server/persistence/gateway/TaskRunnerMetricRepositoryImplTest.kt rename to libs/server/gateway/src/test/kotlin/org/nxcloudce/server/gateway/persistence/TaskRunnerMetricRepositoryImplTest.kt index 8eef3723..febdacde 100644 --- a/apps/server/src/test/kotlin/org/nxcloudce/server/persistence/gateway/TaskRunnerMetricRepositoryImplTest.kt +++ b/libs/server/gateway/src/test/kotlin/org/nxcloudce/server/gateway/persistence/TaskRunnerMetricRepositoryImplTest.kt @@ -1,4 +1,4 @@ -package org.nxcloudce.server.persistence.gateway +package org.nxcloudce.server.gateway.persistence import ch.tutteli.atrium.api.fluent.en_GB.toEqual import ch.tutteli.atrium.api.verbs.expect diff --git a/apps/server/src/test/kotlin/org/nxcloudce/server/persistence/gateway/WorkspaceRepositoryImplTest.kt b/libs/server/gateway/src/test/kotlin/org/nxcloudce/server/gateway/persistence/WorkspaceRepositoryImplTest.kt similarity index 97% rename from apps/server/src/test/kotlin/org/nxcloudce/server/persistence/gateway/WorkspaceRepositoryImplTest.kt rename to libs/server/gateway/src/test/kotlin/org/nxcloudce/server/gateway/persistence/WorkspaceRepositoryImplTest.kt index 1d8d3dbd..bfd5d3a7 100644 --- a/apps/server/src/test/kotlin/org/nxcloudce/server/persistence/gateway/WorkspaceRepositoryImplTest.kt +++ b/libs/server/gateway/src/test/kotlin/org/nxcloudce/server/gateway/persistence/WorkspaceRepositoryImplTest.kt @@ -1,4 +1,4 @@ -package org.nxcloudce.server.persistence.gateway +package org.nxcloudce.server.gateway.persistence import ch.tutteli.atrium.api.fluent.en_GB.its import ch.tutteli.atrium.api.fluent.en_GB.toEqual diff --git a/apps/server/src/test/kotlin/org/nxcloudce/server/storage/gateway/StorageServiceImplTest.kt b/libs/server/gateway/src/test/kotlin/org/nxcloudce/server/gateway/storage/StorageServiceImplTest.kt similarity index 97% rename from apps/server/src/test/kotlin/org/nxcloudce/server/storage/gateway/StorageServiceImplTest.kt rename to libs/server/gateway/src/test/kotlin/org/nxcloudce/server/gateway/storage/StorageServiceImplTest.kt index de55d781..9e69b400 100644 --- a/apps/server/src/test/kotlin/org/nxcloudce/server/storage/gateway/StorageServiceImplTest.kt +++ b/libs/server/gateway/src/test/kotlin/org/nxcloudce/server/gateway/storage/StorageServiceImplTest.kt @@ -1,4 +1,4 @@ -package org.nxcloudce.server.storage.gateway +package org.nxcloudce.server.gateway.storage import ch.tutteli.atrium.api.fluent.en_GB.toEqual import ch.tutteli.atrium.api.verbs.expect diff --git a/libs/server/persistence/project.json b/libs/server/persistence/project.json index a7e85f45..dcc71eb5 100644 --- a/libs/server/persistence/project.json +++ b/libs/server/persistence/project.json @@ -9,7 +9,7 @@ "options": { "task": "build" }, - "outputs": ["{projectRoot}/build"] + "outputs": ["{projectRoot}/build/classes", "{projectRoot}/build/libs"] }, "lint": { "executor": "@jnxplus/nx-gradle:run-task", @@ -28,11 +28,7 @@ "options": { "task": "test" }, - "outputs": [ - "{projectRoot}/build/classes", - "{projectRoot}/build/reports", - "{projectRoot}/build/test-results" - ] + "outputs": ["{projectRoot}/build/jacoco-report"] } }, "tags": [] diff --git a/libs/server/storage/azure/project.json b/libs/server/storage/azure/project.json index ebc4611a..27ac4823 100644 --- a/libs/server/storage/azure/project.json +++ b/libs/server/storage/azure/project.json @@ -9,7 +9,7 @@ "options": { "task": "build" }, - "outputs": ["{projectRoot}/build"] + "outputs": ["{projectRoot}/build/classes", "{projectRoot}/build/libs"] }, "lint": { "executor": "@jnxplus/nx-gradle:run-task", @@ -28,11 +28,7 @@ "options": { "task": "test" }, - "outputs": [ - "{projectRoot}/build/classes", - "{projectRoot}/build/reports", - "{projectRoot}/build/test-results" - ] + "outputs": ["{projectRoot}/build/jacoco-report"] } }, "tags": [] diff --git a/libs/server/storage/core/project.json b/libs/server/storage/core/project.json index 0db03224..ddc1cf5a 100644 --- a/libs/server/storage/core/project.json +++ b/libs/server/storage/core/project.json @@ -9,7 +9,7 @@ "options": { "task": "build" }, - "outputs": ["{projectRoot}/build"] + "outputs": ["{projectRoot}/build/classes", "{projectRoot}/build/libs"] }, "lint": { "executor": "@jnxplus/nx-gradle:run-task", @@ -28,11 +28,7 @@ "options": { "task": "test" }, - "outputs": [ - "{projectRoot}/build/classes", - "{projectRoot}/build/reports", - "{projectRoot}/build/test-results" - ] + "outputs": ["{projectRoot}/build/jacoco-report"] } }, "tags": [] diff --git a/libs/server/storage/gcs/project.json b/libs/server/storage/gcs/project.json index 61015aed..6ada7099 100644 --- a/libs/server/storage/gcs/project.json +++ b/libs/server/storage/gcs/project.json @@ -9,7 +9,7 @@ "options": { "task": "build" }, - "outputs": ["{projectRoot}/build"] + "outputs": ["{projectRoot}/build/classes", "{projectRoot}/build/libs"] }, "lint": { "executor": "@jnxplus/nx-gradle:run-task", @@ -28,11 +28,7 @@ "options": { "task": "test" }, - "outputs": [ - "{projectRoot}/build/classes", - "{projectRoot}/build/reports", - "{projectRoot}/build/test-results" - ] + "outputs": ["{projectRoot}/build/jacoco-report"] } }, "tags": [] diff --git a/libs/server/storage/s3/project.json b/libs/server/storage/s3/project.json index c2487155..dfe3b83f 100644 --- a/libs/server/storage/s3/project.json +++ b/libs/server/storage/s3/project.json @@ -9,7 +9,7 @@ "options": { "task": "build" }, - "outputs": ["{projectRoot}/build"] + "outputs": ["{projectRoot}/build/classes", "{projectRoot}/build/libs"] }, "lint": { "executor": "@jnxplus/nx-gradle:run-task", @@ -28,11 +28,7 @@ "options": { "task": "test" }, - "outputs": [ - "{projectRoot}/build/classes", - "{projectRoot}/build/reports", - "{projectRoot}/build/test-results" - ] + "outputs": ["{projectRoot}/build/jacoco-report"] } }, "tags": [] diff --git a/settings.gradle.kts b/settings.gradle.kts index 2b765437..0819e35f 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -21,6 +21,7 @@ pluginManagement { rootProject.name = "nx-cloud-ce" include(":apps:server") include(":libs:server:domain") +include(":libs:server:gateway") include(":libs:server:persistence") include(":libs:server:storage:azure") include(":libs:server:storage:core")