mirror of https://github.com/usbharu/Hideout.git
マルチプロジェクト構成に変更
This commit is contained in:
parent
4216beaf8a
commit
73451a1918
|
@ -49,6 +49,6 @@ out/
|
|||
/hideout-core/.kotlin/sessions/
|
||||
/hideout-mastodon/.kotlin/sessions/
|
||||
/http-client.private.env.json
|
||||
/logs/
|
||||
**/logs/
|
||||
/hideout-mastodon/logs/
|
||||
/hideout-mastodon/files/
|
||||
|
|
|
@ -14,52 +14,4 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.jvm)
|
||||
alias(libs.plugins.spring.boot)
|
||||
alias(libs.plugins.kotlin.spring)
|
||||
}
|
||||
|
||||
apply {
|
||||
plugin("io.spring.dependency-management")
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
url = uri("https://git.usbharu.dev/api/packages/usbharu/maven")
|
||||
}
|
||||
maven {
|
||||
name = "GitHubPackages"
|
||||
url = uri("https://maven.pkg.github.com/usbharu/http-signature")
|
||||
credentials {
|
||||
|
||||
username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME")
|
||||
password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN")
|
||||
}
|
||||
}
|
||||
maven {
|
||||
name = "GitHubPackages2"
|
||||
url = uri("https://maven.pkg.github.com/multim-dev/emoji-kt")
|
||||
credentials {
|
||||
|
||||
username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME")
|
||||
password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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") {
|
||||
dependsOn(gradle.includedBuild("hideout-core").task(":run"))
|
||||
}
|
||||
|
||||
springBoot {
|
||||
mainClass = "dev.usbharu.hideout.SpringApplicationKt"
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ plugins {
|
|||
alias(libs.plugins.kotlin.jvm)
|
||||
alias(libs.plugins.spring.boot)
|
||||
alias(libs.plugins.kotlin.spring)
|
||||
alias(libs.plugins.detekt)
|
||||
}
|
||||
|
||||
apply {
|
||||
|
@ -9,10 +10,13 @@ apply {
|
|||
}
|
||||
|
||||
|
||||
group = "dev.usbharu.hideout"
|
||||
version = "unspecified"
|
||||
|
||||
|
||||
allprojects {
|
||||
|
||||
group = "dev.usbharu.hideout"
|
||||
version = "1.0.0-SNAPSHOT"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
|
@ -39,10 +43,39 @@ allprojects {
|
|||
}
|
||||
}
|
||||
|
||||
subprojects {
|
||||
apply {
|
||||
plugin(rootProject.libs.plugins.kotlin.jvm.get().pluginId)
|
||||
plugin(rootProject.libs.plugins.detekt.get().pluginId)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation(kotlin("test"))
|
||||
detektPlugins(rootProject.libs.detekt.formatting)
|
||||
}
|
||||
}
|
||||
|
||||
tasks {
|
||||
register("run") {
|
||||
dependsOn(gradle.includedBuild("hideout-core").task(":run"))
|
||||
}
|
||||
withType<io.gitlab.arturbosch.detekt.Detekt> {
|
||||
exclude("**/generated/**")
|
||||
setSource("src/main/kotlin")
|
||||
exclude("build/")
|
||||
configureEach {
|
||||
exclude("**/org/koin/ksp/generated/**", "**/generated/**")
|
||||
}
|
||||
}
|
||||
withType<io.gitlab.arturbosch.detekt.DetektCreateBaselineTask>() {
|
||||
configureEach {
|
||||
exclude("**/org/koin/ksp/generated/**", "**/generated/**")
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(21)
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
@ -56,3 +89,21 @@ springBoot {
|
|||
|
||||
mainClass = "dev.usbharu.hideout.SpringApplicationKt"
|
||||
}
|
||||
|
||||
configurations {
|
||||
matching { it.name == "detekt" }.all {
|
||||
resolutionStrategy.eachDependency {
|
||||
if (requested.group == "org.jetbrains.kotlin") {
|
||||
useVersion(io.gitlab.arturbosch.detekt.getSupportedKotlinVersion())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
detekt {
|
||||
parallel = true
|
||||
config.setFrom(files("../detekt.yml"))
|
||||
buildUponDefaultConfig = true
|
||||
basePath = "${rootDir.absolutePath}/src/main/kotlin"
|
||||
autoCorrect = true
|
||||
}
|
|
@ -2,79 +2,23 @@ import kotlinx.kover.gradle.plugin.dsl.CoverageUnit
|
|||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.jvm)
|
||||
alias(libs.plugins.detekt)
|
||||
alias(libs.plugins.kover)
|
||||
}
|
||||
|
||||
group = "dev.usbharu"
|
||||
version = "1.0-SNAPSHOT"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation(kotlin("test"))
|
||||
detektPlugins(libs.detekt.formatting)
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
kotlin {
|
||||
jvmToolchain(21)
|
||||
}
|
||||
|
||||
|
||||
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<io.gitlab.arturbosch.detekt.Detekt> {
|
||||
exclude("**/generated/**")
|
||||
setSource("src/main/kotlin")
|
||||
exclude("build/")
|
||||
configureEach {
|
||||
exclude("**/org/koin/ksp/generated/**", "**/generated/**")
|
||||
}
|
||||
}
|
||||
withType<io.gitlab.arturbosch.detekt.DetektCreateBaselineTask>() {
|
||||
configureEach {
|
||||
exclude("**/org/koin/ksp/generated/**", "**/generated/**")
|
||||
}
|
||||
}
|
||||
withType<Test> {
|
||||
|
||||
withType<Test> {
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
detekt {
|
||||
parallel = true
|
||||
config.setFrom(files("../detekt.yml"))
|
||||
buildUponDefaultConfig = true
|
||||
basePath = "${rootDir.absolutePath}/src/main/kotlin"
|
||||
autoCorrect = true
|
||||
}
|
||||
|
||||
kover {
|
||||
currentProject {
|
||||
sources {
|
||||
|
|
|
@ -35,11 +35,8 @@ apply {
|
|||
plugin("io.spring.dependency-management")
|
||||
}
|
||||
|
||||
group = "dev.usbharu"
|
||||
version = "0.0.1"
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(21)
|
||||
compilerOptions {
|
||||
freeCompilerArgs.add("-Xjsr305=strict")
|
||||
jvmTarget = JvmTarget.JVM_21
|
||||
|
@ -119,41 +116,13 @@ dependencies {
|
|||
testImplementation("com.ninja-squad:DbSetup-kotlin:2.1.0")
|
||||
}
|
||||
|
||||
detekt {
|
||||
parallel = true
|
||||
config.setFrom(files("$rootDir/../detekt.yml"))
|
||||
buildUponDefaultConfig = true
|
||||
basePath = "${rootDir.absolutePath}/src/main/kotlin"
|
||||
autoCorrect = true
|
||||
}
|
||||
|
||||
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<io.gitlab.arturbosch.detekt.Detekt> {
|
||||
exclude("**/generated/**")
|
||||
setSource("src/main/kotlin")
|
||||
exclude("build/")
|
||||
configureEach {
|
||||
exclude("**/org/koin/ksp/generated/**", "**/generated/**")
|
||||
}
|
||||
}
|
||||
withType<io.gitlab.arturbosch.detekt.DetektCreateBaselineTask>() {
|
||||
configureEach {
|
||||
exclude("**/org/koin/ksp/generated/**", "**/generated/**")
|
||||
}
|
||||
}
|
||||
withType<Test> {
|
||||
useJUnitPlatform()
|
||||
doFirst {
|
||||
|
@ -172,13 +141,6 @@ tasks {
|
|||
}
|
||||
|
||||
|
||||
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 {
|
||||
|
@ -219,12 +181,6 @@ kover {
|
|||
}
|
||||
}
|
||||
|
||||
springBoot {
|
||||
buildInfo {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
licenseReport {
|
||||
excludeOwnGroup = true
|
||||
|
||||
|
|
|
@ -15,8 +15,6 @@ apply {
|
|||
plugin("io.spring.dependency-management")
|
||||
}
|
||||
|
||||
group = "dev.usbharu"
|
||||
version = "1.0-SNAPSHOT"
|
||||
|
||||
dependencies {
|
||||
detektPlugins(libs.detekt.formatting)
|
||||
|
@ -24,7 +22,7 @@ dependencies {
|
|||
implementation("org.springframework.boot:spring-boot-starter-security")
|
||||
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
|
||||
|
||||
implementation("dev.usbharu:hideout-core:0.0.1")
|
||||
implementation(project(":hideout-core"))
|
||||
|
||||
implementation(libs.jackson.databind)
|
||||
implementation(libs.jackson.module.kotlin)
|
||||
|
@ -81,9 +79,6 @@ tasks {
|
|||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(21)
|
||||
}
|
||||
|
||||
sourceSets.main {
|
||||
kotlin.srcDirs(
|
||||
|
@ -91,30 +86,6 @@ sourceSets.main {
|
|||
)
|
||||
}
|
||||
|
||||
detekt {
|
||||
parallel = true
|
||||
config.setFrom(files("$rootDir/../detekt.yml"))
|
||||
buildUponDefaultConfig = true
|
||||
basePath = "${rootDir.absolutePath}/src/main/kotlin"
|
||||
autoCorrect = true
|
||||
}
|
||||
|
||||
configurations.matching { it.name == "detekt" }.all {
|
||||
resolutionStrategy.eachDependency {
|
||||
if (requested.group == "org.jetbrains.kotlin") {
|
||||
useVersion(io.gitlab.arturbosch.detekt.getSupportedKotlinVersion())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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 {
|
||||
|
@ -153,20 +124,3 @@ kover {
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<io.gitlab.arturbosch.detekt.Detekt> {
|
||||
exclude("**/generated/**")
|
||||
doFirst {
|
||||
|
||||
}
|
||||
setSource("src/main/kotlin")
|
||||
exclude("build/")
|
||||
}
|
||||
|
||||
tasks.withType<io.gitlab.arturbosch.detekt.Detekt>().configureEach {
|
||||
exclude("**/org/koin/ksp/generated/**", "**/generated/**")
|
||||
}
|
||||
|
||||
tasks.withType<io.gitlab.arturbosch.detekt.DetektCreateBaselineTask>().configureEach {
|
||||
exclude("**/org/koin/ksp/generated/**", "**/generated/**")
|
||||
}
|
Loading…
Reference in New Issue