diff --git a/build.gradle.kts b/build.gradle.kts index a6acf140..52f8a2b7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,5 @@ +import dev.usbharu.hideout.core.infrastructure.exposedrepository.UserDetails.password + /* * Copyright (C) 2024 usbharu * @@ -52,6 +54,7 @@ repositories { dependencies { implementation("dev.usbharu:hideout-core:0.0.1") implementation("dev.usbharu:hideout-mastodon:1.0-SNAPSHOT") + implementation("dev.usbharu:hideout-activitypub:1.0-SNAPSHOT") } tasks.register("run") { diff --git a/hideout-activitypub/build.gradle.kts b/hideout-activitypub/build.gradle.kts index 36ec82b7..6a2d223a 100644 --- a/hideout-activitypub/build.gradle.kts +++ b/hideout-activitypub/build.gradle.kts @@ -1,5 +1,10 @@ +import dev.usbharu.hideout.core.infrastructure.exposedrepository.Instance.version +import kotlinx.kover.gradle.plugin.dsl.CoverageUnit + plugins { - kotlin("jvm") version "1.9.25" + alias(libs.plugins.kotlin.jvm) + alias(libs.plugins.detekt) + alias(libs.plugins.kover) } group = "dev.usbharu" @@ -18,4 +23,85 @@ tasks.test { } kotlin { jvmToolchain(21) -} \ No newline at end of file +} + + +configurations { + matching { it.name == "detekt" }.all { + resolutionStrategy.eachDependency { + if (requested.group == "org.jetbrains.kotlin") { + useVersion(io.gitlab.arturbosch.detekt.getSupportedKotlinVersion()) + } + } + } + all { + exclude("org.apache.logging.log4j", "log4j-slf4j2-impl") + } +} + +tasks { + withType { + exclude("**/generated/**") + setSource("src/main/kotlin") + exclude("build/") + configureEach { + exclude("**/org/koin/ksp/generated/**", "**/generated/**") + } + } + withType() { + configureEach { + exclude("**/org/koin/ksp/generated/**", "**/generated/**") + } + } + withType { + useJUnitPlatform() + } +} + + +project.gradle.taskGraph.whenReady { + if (this.hasTask(":koverGenerateArtifact")) { + val task = this.allTasks.find { it.name == "test" } + val verificationTask = task as VerificationTask + verificationTask.ignoreFailures = true + } +} + +kover { + currentProject { + sources { + + + } + } + + reports { + verify { + rule { + bound { + minValue = 50 + coverageUnits = CoverageUnit.INSTRUCTION + } + } + } + total { + xml { + title = "Hideout ActivityPub" + xmlFile = file("$buildDir/reports/kover/hideout-activitypub.xml") + } + } + filters { + excludes { + annotatedBy("org.springframework.context.annotation.Configuration") + annotatedBy("org.springframework.boot.context.properties.ConfigurationProperties") + packages( + "dev.usbharu.hideout.controller.mastodon.generated", + "dev.usbharu.hideout.domain.mastodon.model.generated" + ) + packages("org.springframework") + packages("org.jetbrains") + } + } + + } +} diff --git a/hideout-activitypub/settings.gradle.kts b/hideout-activitypub/settings.gradle.kts index 8f4bdd48..c083363f 100644 --- a/hideout-activitypub/settings.gradle.kts +++ b/hideout-activitypub/settings.gradle.kts @@ -3,3 +3,14 @@ plugins { } rootProject.name = "hideout-activitypub" +dependencyResolutionManagement { + repositories { + mavenCentral() + } + + versionCatalogs { + create("libs") { + from(files("../libs.versions.toml")) + } + } +} \ No newline at end of file diff --git a/owl/build.gradle.kts b/owl/build.gradle.kts index fddf3a79..066d8b10 100644 --- a/owl/build.gradle.kts +++ b/owl/build.gradle.kts @@ -1,6 +1,10 @@ +import kotlinx.kover.gradle.plugin.dsl.CoverageUnit + plugins { alias(libs.plugins.kotlin.jvm) id("maven-publish") + alias(libs.plugins.kover) + alias(libs.plugins.detekt) } @@ -27,6 +31,7 @@ subprojects { apply { plugin("org.jetbrains.kotlin.jvm") plugin("maven-publish") + plugin(rootProject.libs.plugins.kover.get().pluginId) } kotlin { jvmToolchain(21) @@ -38,7 +43,13 @@ subprojects { } - + project.gradle.taskGraph.whenReady { + if (this.hasTask(":koverGenerateArtifact")) { + val task = this.allTasks.find { println(it.name);it.name == "test" } + val verificationTask = task as VerificationTask + verificationTask.ignoreFailures = true + } + } tasks.test { useJUnitPlatform() } @@ -69,4 +80,57 @@ subprojects { } } } -} \ No newline at end of file +} + +dependencies { + kover(project(":owl-broker")) + kover(project(":owl-broker:owl-broker-mongodb")) + kover(project(":owl-common")) + kover(project(":owl-common:owl-common-serialize-jackson")) + kover(project(":owl-consumer")) + kover(project(":owl-producer")) + kover(project(":owl-producer:owl-producer-api")) + kover(project(":owl-producer:owl-producer-default")) + kover(project(":owl-producer:owl-producer-embedded")) +} + + + +project.gradle.taskGraph.whenReady { + if (this.hasTask(":koverGenerateArtifact")) { + val task = this.allTasks.find { it.name == "test" } + val verificationTask = task as VerificationTask + verificationTask.ignoreFailures = true + } +} + +kover { + currentProject { + sources { + excludedSourceSets.addAll("grpc", "grpckt") + } + } + reports { + verify { + rule { + bound { + minValue = 50 + coverageUnits = CoverageUnit.INSTRUCTION + } + } + } + total { + xml { + title = "Hideout Core" + xmlFile = file("$buildDir/reports/kover/hideout-core.xml") + } + filters { + excludes { + packages("dev.usbharu.owl.generated") + } + } + } + + + } +} diff --git a/owl/gradle/wrapper/gradle-wrapper.properties b/owl/gradle/wrapper/gradle-wrapper.properties index 0aaefbca..9355b415 100644 --- a/owl/gradle/wrapper/gradle-wrapper.properties +++ b/owl/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/owl/owl-broker/build.gradle.kts b/owl/owl-broker/build.gradle.kts index 8c055cfc..42b90f13 100644 --- a/owl/owl-broker/build.gradle.kts +++ b/owl/owl-broker/build.gradle.kts @@ -35,7 +35,7 @@ protobuf { artifact = libs.protoc.gen.grpc.java.get().toString() } create("grpckt") { - artifact = libs.protoc.gen.grpc.kotlin.get().toString() + "jdk8@jar" + artifact = libs.protoc.gen.grpc.kotlin.get().toString() + ":jdk8@jar" } } generateProtoTasks { diff --git a/owl/owl-broker/owl-broker-mongodb/src/test/kotlin/dev/usbharu/owl/broker/mongodb/MongodbConsumerRepositoryTest.kt b/owl/owl-broker/owl-broker-mongodb/src/test/kotlin/dev/usbharu/owl/broker/mongodb/MongodbConsumerRepositoryTest.kt index b71c5ea4..2bd00586 100644 --- a/owl/owl-broker/owl-broker-mongodb/src/test/kotlin/dev/usbharu/owl/broker/mongodb/MongodbConsumerRepositoryTest.kt +++ b/owl/owl-broker/owl-broker-mongodb/src/test/kotlin/dev/usbharu/owl/broker/mongodb/MongodbConsumerRepositoryTest.kt @@ -7,12 +7,14 @@ import dev.usbharu.owl.broker.domain.model.consumer.Consumer import kotlinx.coroutines.runBlocking import org.bson.UuidRepresentation import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Test import java.util.* class MongodbConsumerRepositoryTest { @Test + @Disabled fun name() { val clientSettings = diff --git a/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/external/GrpcExtension.kt b/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/external/GrpcExtension.kt index 4271b55c..93159174 100644 --- a/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/external/GrpcExtension.kt +++ b/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/external/GrpcExtension.kt @@ -17,7 +17,7 @@ package dev.usbharu.owl.broker.external import com.google.protobuf.Timestamp -import dev.usbharu.owl.Uuid +import dev.usbharu.owl.generated.Uuid import java.time.Instant import java.util.* diff --git a/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/AssignmentTaskService.kt b/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/AssignmentTaskService.kt index f92faf17..e3f0752c 100644 --- a/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/AssignmentTaskService.kt +++ b/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/AssignmentTaskService.kt @@ -17,13 +17,13 @@ package dev.usbharu.owl.broker.interfaces.grpc -import dev.usbharu.owl.AssignmentTaskServiceGrpcKt -import dev.usbharu.owl.Task import dev.usbharu.owl.broker.external.toTimestamp import dev.usbharu.owl.broker.external.toUUID import dev.usbharu.owl.broker.service.QueuedTaskAssigner import dev.usbharu.owl.common.property.PropertySerializeUtils import dev.usbharu.owl.common.property.PropertySerializerFactory +import dev.usbharu.owl.generated.AssignmentTaskServiceGrpcKt +import dev.usbharu.owl.generated.Task import io.grpc.Status import io.grpc.StatusException import kotlinx.coroutines.flow.Flow diff --git a/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/DefinitionTaskService.kt b/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/DefinitionTaskService.kt index d00d584a..59afb0d1 100644 --- a/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/DefinitionTaskService.kt +++ b/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/DefinitionTaskService.kt @@ -17,11 +17,11 @@ package dev.usbharu.owl.broker.interfaces.grpc import com.google.protobuf.Empty -import dev.usbharu.owl.DefinitionTask -import dev.usbharu.owl.DefinitionTask.TaskDefined -import dev.usbharu.owl.DefinitionTaskServiceGrpcKt.DefinitionTaskServiceCoroutineImplBase import dev.usbharu.owl.broker.domain.model.taskdefinition.TaskDefinition import dev.usbharu.owl.broker.service.RegisterTaskService +import dev.usbharu.owl.generated.DefinitionTask +import dev.usbharu.owl.generated.DefinitionTask.TaskDefined +import dev.usbharu.owl.generated.DefinitionTaskServiceGrpcKt.DefinitionTaskServiceCoroutineImplBase import kotlin.coroutines.CoroutineContext import kotlin.coroutines.EmptyCoroutineContext diff --git a/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/ProducerService.kt b/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/ProducerService.kt index 47bbb62e..d2157a2d 100644 --- a/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/ProducerService.kt +++ b/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/ProducerService.kt @@ -16,11 +16,11 @@ package dev.usbharu.owl.broker.interfaces.grpc -import dev.usbharu.owl.ProducerOuterClass -import dev.usbharu.owl.ProducerServiceGrpcKt.ProducerServiceCoroutineImplBase import dev.usbharu.owl.broker.external.toUUID import dev.usbharu.owl.broker.service.ProducerService import dev.usbharu.owl.broker.service.RegisterProducerRequest +import dev.usbharu.owl.generated.ProducerOuterClass +import dev.usbharu.owl.generated.ProducerServiceGrpcKt.ProducerServiceCoroutineImplBase import kotlin.coroutines.CoroutineContext import kotlin.coroutines.EmptyCoroutineContext diff --git a/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/SubscribeTaskService.kt b/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/SubscribeTaskService.kt index 62539d55..d8ed8386 100644 --- a/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/SubscribeTaskService.kt +++ b/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/SubscribeTaskService.kt @@ -16,11 +16,11 @@ package dev.usbharu.owl.broker.interfaces.grpc -import dev.usbharu.owl.Consumer -import dev.usbharu.owl.SubscribeTaskServiceGrpcKt.SubscribeTaskServiceCoroutineImplBase import dev.usbharu.owl.broker.external.toUUID import dev.usbharu.owl.broker.service.ConsumerService import dev.usbharu.owl.broker.service.RegisterConsumerRequest +import dev.usbharu.owl.generated.Consumer +import dev.usbharu.owl.generated.SubscribeTaskServiceGrpcKt.SubscribeTaskServiceCoroutineImplBase import kotlin.coroutines.CoroutineContext import kotlin.coroutines.EmptyCoroutineContext diff --git a/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/TaskPublishService.kt b/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/TaskPublishService.kt index 10b2154f..8a7bff55 100644 --- a/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/TaskPublishService.kt +++ b/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/TaskPublishService.kt @@ -16,15 +16,15 @@ package dev.usbharu.owl.broker.interfaces.grpc -import dev.usbharu.owl.PublishTaskOuterClass -import dev.usbharu.owl.PublishTaskOuterClass.PublishedTask -import dev.usbharu.owl.PublishTaskOuterClass.PublishedTasks -import dev.usbharu.owl.TaskPublishServiceGrpcKt.TaskPublishServiceCoroutineImplBase import dev.usbharu.owl.broker.external.toUUID import dev.usbharu.owl.broker.service.PublishTask import dev.usbharu.owl.broker.service.TaskPublishService import dev.usbharu.owl.common.property.PropertySerializeUtils import dev.usbharu.owl.common.property.PropertySerializerFactory +import dev.usbharu.owl.generated.PublishTaskOuterClass +import dev.usbharu.owl.generated.PublishTaskOuterClass.PublishedTask +import dev.usbharu.owl.generated.PublishTaskOuterClass.PublishedTasks +import dev.usbharu.owl.generated.TaskPublishServiceGrpcKt.TaskPublishServiceCoroutineImplBase import io.grpc.Status import io.grpc.StatusException import org.slf4j.LoggerFactory diff --git a/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/TaskResultService.kt b/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/TaskResultService.kt index 90d10f6b..300d3cf5 100644 --- a/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/TaskResultService.kt +++ b/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/TaskResultService.kt @@ -17,13 +17,13 @@ package dev.usbharu.owl.broker.interfaces.grpc import com.google.protobuf.Empty -import dev.usbharu.owl.TaskResultOuterClass -import dev.usbharu.owl.TaskResultServiceGrpcKt import dev.usbharu.owl.broker.domain.model.taskresult.TaskResult import dev.usbharu.owl.broker.external.toUUID import dev.usbharu.owl.broker.service.TaskManagementService import dev.usbharu.owl.common.property.PropertySerializeUtils import dev.usbharu.owl.common.property.PropertySerializerFactory +import dev.usbharu.owl.generated.TaskResultOuterClass +import dev.usbharu.owl.generated.TaskResultServiceGrpcKt import io.grpc.Status import io.grpc.StatusException import kotlinx.coroutines.CancellationException diff --git a/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/TaskResultSubscribeService.kt b/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/TaskResultSubscribeService.kt index e0635d9a..5855cc6d 100644 --- a/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/TaskResultSubscribeService.kt +++ b/owl/owl-broker/src/main/kotlin/dev/usbharu/owl/broker/interfaces/grpc/TaskResultSubscribeService.kt @@ -16,11 +16,11 @@ package dev.usbharu.owl.broker.interfaces.grpc -import dev.usbharu.owl.* import dev.usbharu.owl.broker.external.toUUID import dev.usbharu.owl.broker.service.TaskManagementService import dev.usbharu.owl.common.property.PropertySerializeUtils import dev.usbharu.owl.common.property.PropertySerializerFactory +import dev.usbharu.owl.generated.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.map import kotlin.coroutines.CoroutineContext diff --git a/owl/owl-broker/src/main/proto/consumer.proto b/owl/owl-broker/src/main/proto/consumer.proto index 252d4a27..8ded7398 100644 --- a/owl/owl-broker/src/main/proto/consumer.proto +++ b/owl/owl-broker/src/main/proto/consumer.proto @@ -1,7 +1,7 @@ syntax = "proto3"; import "uuid.proto"; -option java_package = "dev.usbharu.owl"; +option java_package = "dev.usbharu.owl.generated"; message SubscribeTaskRequest { string name = 1; diff --git a/owl/owl-broker/src/main/proto/definition_task.proto b/owl/owl-broker/src/main/proto/definition_task.proto index 6cab5257..1e7b63f7 100644 --- a/owl/owl-broker/src/main/proto/definition_task.proto +++ b/owl/owl-broker/src/main/proto/definition_task.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -option java_package = "dev.usbharu.owl"; +option java_package = "dev.usbharu.owl.generated"; import "google/protobuf/empty.proto"; import "uuid.proto"; diff --git a/owl/owl-broker/src/main/proto/producer.proto b/owl/owl-broker/src/main/proto/producer.proto index b4bbcd7a..7f3e9f05 100644 --- a/owl/owl-broker/src/main/proto/producer.proto +++ b/owl/owl-broker/src/main/proto/producer.proto @@ -2,7 +2,7 @@ syntax = "proto3"; import "uuid.proto"; -option java_package = "dev.usbharu.owl"; +option java_package = "dev.usbharu.owl.generated"; message Producer { string name = 1; diff --git a/owl/owl-broker/src/main/proto/property.proto b/owl/owl-broker/src/main/proto/property.proto index 138e7e22..bb1f5d48 100644 --- a/owl/owl-broker/src/main/proto/property.proto +++ b/owl/owl-broker/src/main/proto/property.proto @@ -2,7 +2,7 @@ syntax = "proto3"; import "google/protobuf/empty.proto"; -option java_package = "dev.usbharu.owl"; +option java_package = "dev.usbharu.owl.generated"; message Property{ oneof value { diff --git a/owl/owl-broker/src/main/proto/publish_task.proto b/owl/owl-broker/src/main/proto/publish_task.proto index 620e6396..db3292e8 100644 --- a/owl/owl-broker/src/main/proto/publish_task.proto +++ b/owl/owl-broker/src/main/proto/publish_task.proto @@ -4,7 +4,7 @@ import "google/protobuf/timestamp.proto"; import "uuid.proto"; -option java_package = "dev.usbharu.owl"; +option java_package = "dev.usbharu.owl.generated"; message PublishTask { diff --git a/owl/owl-broker/src/main/proto/task.proto b/owl/owl-broker/src/main/proto/task.proto index 48566fdb..7e2621bc 100644 --- a/owl/owl-broker/src/main/proto/task.proto +++ b/owl/owl-broker/src/main/proto/task.proto @@ -3,7 +3,7 @@ import "uuid.proto"; import "google/protobuf/timestamp.proto"; import "property.proto"; -option java_package = "dev.usbharu.owl"; +option java_package = "dev.usbharu.owl.generated"; message ReadyRequest { int32 number_of_concurrent = 1; diff --git a/owl/owl-broker/src/main/proto/task_result.proto b/owl/owl-broker/src/main/proto/task_result.proto index 642f7425..a6a74b9a 100644 --- a/owl/owl-broker/src/main/proto/task_result.proto +++ b/owl/owl-broker/src/main/proto/task_result.proto @@ -3,7 +3,7 @@ import "uuid.proto"; import "google/protobuf/empty.proto"; import "property.proto"; -option java_package = "dev.usbharu.owl"; +option java_package = "dev.usbharu.owl.generated"; message TaskResult { UUID id = 1; diff --git a/owl/owl-broker/src/main/proto/task_result_producer.proto b/owl/owl-broker/src/main/proto/task_result_producer.proto index 6102a020..ac6169eb 100644 --- a/owl/owl-broker/src/main/proto/task_result_producer.proto +++ b/owl/owl-broker/src/main/proto/task_result_producer.proto @@ -2,7 +2,7 @@ syntax = "proto3"; import "uuid.proto"; import "task_result.proto"; -option java_package = "dev.usbharu.owl"; +option java_package = "dev.usbharu.owl.generated"; message TaskResults { string name = 1; diff --git a/owl/owl-broker/src/main/proto/uuid.proto b/owl/owl-broker/src/main/proto/uuid.proto index 26d61001..1dca5916 100644 --- a/owl/owl-broker/src/main/proto/uuid.proto +++ b/owl/owl-broker/src/main/proto/uuid.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -option java_package = "dev.usbharu.owl"; +option java_package = "dev.usbharu.owl.generated"; message UUID { uint64 most_significant_uuid_bits = 1; diff --git a/owl/owl-consumer/build.gradle.kts b/owl/owl-consumer/build.gradle.kts index 403f8c88..f629d302 100644 --- a/owl/owl-consumer/build.gradle.kts +++ b/owl/owl-consumer/build.gradle.kts @@ -33,7 +33,7 @@ protobuf { artifact = libs.protoc.gen.grpc.java.get().toString() } create("grpckt") { - artifact = libs.protoc.gen.grpc.kotlin.get().toString() + "jdk8@jar" + artifact = libs.protoc.gen.grpc.kotlin.get().toString() + ":jdk8@jar" } } generateProtoTasks { diff --git a/owl/owl-consumer/src/main/kotlin/dev/usbharu/owl/consumer/Consumer.kt b/owl/owl-consumer/src/main/kotlin/dev/usbharu/owl/consumer/Consumer.kt index 56ac00c7..ee925335 100644 --- a/owl/owl-consumer/src/main/kotlin/dev/usbharu/owl/consumer/Consumer.kt +++ b/owl/owl-consumer/src/main/kotlin/dev/usbharu/owl/consumer/Consumer.kt @@ -16,10 +16,10 @@ package dev.usbharu.owl.consumer -import dev.usbharu.owl.* -import dev.usbharu.owl.Uuid.UUID import dev.usbharu.owl.common.property.PropertySerializeUtils import dev.usbharu.owl.common.property.PropertySerializerFactory +import dev.usbharu.owl.generated.* +import dev.usbharu.owl.generated.Uuid.UUID import kotlinx.coroutines.* import kotlinx.coroutines.flow.* import org.slf4j.LoggerFactory diff --git a/owl/owl-consumer/src/main/kotlin/dev/usbharu/owl/consumer/StandaloneConsumer.kt b/owl/owl-consumer/src/main/kotlin/dev/usbharu/owl/consumer/StandaloneConsumer.kt index 34f75a05..a9b42635 100644 --- a/owl/owl-consumer/src/main/kotlin/dev/usbharu/owl/consumer/StandaloneConsumer.kt +++ b/owl/owl-consumer/src/main/kotlin/dev/usbharu/owl/consumer/StandaloneConsumer.kt @@ -16,11 +16,11 @@ package dev.usbharu.owl.consumer -import dev.usbharu.owl.AssignmentTaskServiceGrpcKt -import dev.usbharu.owl.SubscribeTaskServiceGrpcKt -import dev.usbharu.owl.TaskResultServiceGrpcKt import dev.usbharu.owl.common.property.CustomPropertySerializerFactory import dev.usbharu.owl.common.property.PropertySerializerFactory +import dev.usbharu.owl.generated.AssignmentTaskServiceGrpcKt +import dev.usbharu.owl.generated.SubscribeTaskServiceGrpcKt +import dev.usbharu.owl.generated.TaskResultServiceGrpcKt import io.grpc.ManagedChannelBuilder import java.nio.file.Path diff --git a/owl/owl-producer/owl-producer-default/build.gradle.kts b/owl/owl-producer/owl-producer-default/build.gradle.kts index 7994b7f9..d4d4fe15 100644 --- a/owl/owl-producer/owl-producer-default/build.gradle.kts +++ b/owl/owl-producer/owl-producer-default/build.gradle.kts @@ -34,7 +34,7 @@ protobuf { artifact = libs.protoc.gen.grpc.java.get().toString() } create("grpckt") { - artifact = libs.protoc.gen.grpc.kotlin.get().toString() + "jdk8@jar" + artifact = libs.protoc.gen.grpc.kotlin.get().toString() + ":jdk8@jar" } } generateProtoTasks { diff --git a/owl/owl-producer/owl-producer-default/src/main/kotlin/dev/usbharu/owl/producer/defaultimpl/DefaultOwlProducer.kt b/owl/owl-producer/owl-producer-default/src/main/kotlin/dev/usbharu/owl/producer/defaultimpl/DefaultOwlProducer.kt index e4a1dfd4..065eb28e 100644 --- a/owl/owl-producer/owl-producer-default/src/main/kotlin/dev/usbharu/owl/producer/defaultimpl/DefaultOwlProducer.kt +++ b/owl/owl-producer/owl-producer-default/src/main/kotlin/dev/usbharu/owl/producer/defaultimpl/DefaultOwlProducer.kt @@ -17,12 +17,12 @@ package dev.usbharu.owl.producer.defaultimpl import com.google.protobuf.timestamp -import dev.usbharu.owl.* -import dev.usbharu.owl.Uuid.UUID import dev.usbharu.owl.common.property.PropertySerializeUtils import dev.usbharu.owl.common.task.PublishedTask import dev.usbharu.owl.common.task.Task import dev.usbharu.owl.common.task.TaskDefinition +import dev.usbharu.owl.generated.* +import dev.usbharu.owl.generated.Uuid.UUID import dev.usbharu.owl.producer.api.OwlProducer import java.time.Instant @@ -69,7 +69,7 @@ class DefaultOwlProducer(private val defaultOwlProducerConfig: DefaultOwlProduce ) val now = Instant.now() val publishTask = taskPublishServiceCoroutineStub.publishTask( - dev.usbharu.owl.publishTask { + dev.usbharu.owl.generated.publishTask { this.producerId = this@DefaultOwlProducer.producerId this.publishedAt = timestamp { diff --git a/settings.gradle.kts b/settings.gradle.kts index 8c6faaff..dca54015 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -21,6 +21,7 @@ rootProject.name = "hideout" includeBuild("hideout-core") includeBuild("hideout-mastodon") +includeBuild("hideout-activitypub") dependencyResolutionManagement { repositories {