From ceb206289cfbe887920a48cd245bd5a7b41453a8 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Sat, 10 Aug 2024 12:18:52 +0900 Subject: [PATCH] chore: build-test --- .../workflows/pull-request-merge-check.yml | 2 + hideout-core/build.gradle.kts | 6 +-- owl/build.gradle.kts | 37 ++++++++++++++++++- owl/gradle.properties | 1 - 4 files changed, 41 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pull-request-merge-check.yml b/.github/workflows/pull-request-merge-check.yml index 28b4cda4..71055387 100644 --- a/.github/workflows/pull-request-merge-check.yml +++ b/.github/workflows/pull-request-merge-check.yml @@ -2,6 +2,8 @@ name: PullRequest Merge Check on: pull_request: + paths-ignore: + - 'owl/**' branches: - "develop" types: diff --git a/hideout-core/build.gradle.kts b/hideout-core/build.gradle.kts index 0ef80aa8..2e0c34e4 100644 --- a/hideout-core/build.gradle.kts +++ b/hideout-core/build.gradle.kts @@ -82,8 +82,8 @@ dependencies { implementation(libs.bundles.ktor.client) implementation(libs.bundles.apache.tika) implementation(libs.bundles.openapi) - implementation(libs.bundles.owl.producer) - implementation(libs.bundles.owl.broker) +// implementation(libs.bundles.owl.producer) +// implementation(libs.bundles.owl.broker) implementation(libs.bundles.spring.boot.oauth2) implementation(libs.bundles.spring.boot.data.mongodb) implementation("org.springframework.boot:spring-boot-starter-actuator") @@ -104,7 +104,7 @@ dependencies { implementation(libs.flyway.core) runtimeOnly(libs.flyway.postgresql) - implementation("dev.usbharu:owl-common-serialize-jackson:0.0.1") +// implementation("dev.usbharu:owl-common-serialize-jackson:0.0.1") implementation(libs.javacv) { exclude(module = "opencv") diff --git a/owl/build.gradle.kts b/owl/build.gradle.kts index 94bf8763..39ef7e0a 100644 --- a/owl/build.gradle.kts +++ b/owl/build.gradle.kts @@ -1,5 +1,6 @@ plugins { alias(libs.plugins.kotlin.jvm) + id("maven-publish") } @@ -13,9 +14,19 @@ allprojects { } } +tasks { + create("publishMavenPublicationToMavenLocal") { + subprojects.forEach { dependsOn("${it.path}:publishMavenPublicationToMavenLocal") } + } + create("publishMavenPublicationToGiteaRepository") { + subprojects.forEach { dependsOn("${it.path}:publishMavenPublicationToGiteaRepository") } + } +} + subprojects { apply { plugin("org.jetbrains.kotlin.jvm") + plugin("maven-publish") } kotlin { jvmToolchain(21) @@ -28,10 +39,34 @@ subprojects { } - tasks.test { useJUnitPlatform() } + publishing { + repositories { + maven { + name = "Gitea" + url = uri("https://git.usbharu.dev/api/packages/usbharu/maven") + credentials(HttpHeaderCredentials::class.java) { + name = "Authorization" + value = "token " + (project.findProperty("gpr.gitea") as String? ?: System.getenv("GITEA")) + } + + authentication { + create("header") + } + } + } + + publications { + register("maven") { + groupId = "dev.usbharu" + artifactId = project.name + version = project.version.toString() + from(components["kotlin"]) + } + } + } } \ No newline at end of file diff --git a/owl/gradle.properties b/owl/gradle.properties index 1108ef87..50785165 100644 --- a/owl/gradle.properties +++ b/owl/gradle.properties @@ -2,6 +2,5 @@ kotlin.code.style=official org.gradle.daemon=true org.gradle.parallel=true org.gradle.configureondemand=true -#ksp.useKSP2=true org.gradle.configuration-cache=true org.gradle.configuration-cache.problems=warn \ No newline at end of file