2024-02-18 03:06:44 +00:00
|
|
|
import com.github.jk1.license.filter.DependencyFilter
|
|
|
|
import com.github.jk1.license.filter.LicenseBundleNormalizer
|
|
|
|
import com.github.jk1.license.importer.DependencyDataImporter
|
|
|
|
import com.github.jk1.license.importer.XmlReportImporter
|
|
|
|
import com.github.jk1.license.render.*
|
2023-08-18 03:01:32 +00:00
|
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
2023-08-18 06:25:42 +00:00
|
|
|
import org.openapitools.generator.gradle.plugin.tasks.GenerateTask
|
2023-04-30 21:38:30 +00:00
|
|
|
|
2023-03-24 03:58:12 +00:00
|
|
|
val ktor_version: String by project
|
|
|
|
val kotlin_version: String by project
|
|
|
|
val exposed_version: String by project
|
|
|
|
val h2_version: String by project
|
|
|
|
val koin_version: String by project
|
2024-02-04 07:00:58 +00:00
|
|
|
val coroutines_version: String by project
|
|
|
|
val serialization_version: String by project
|
2023-03-24 03:58:12 +00:00
|
|
|
|
|
|
|
plugins {
|
2024-04-03 05:48:06 +00:00
|
|
|
kotlin("jvm") version "1.9.23"
|
|
|
|
id("io.gitlab.arturbosch.detekt") version "1.23.6"
|
|
|
|
id("org.springframework.boot") version "3.2.3"
|
|
|
|
kotlin("plugin.spring") version "1.9.23"
|
|
|
|
id("org.openapi.generator") version "7.4.0"
|
|
|
|
id("org.jetbrains.kotlinx.kover") version "0.7.6"
|
2024-02-18 03:06:44 +00:00
|
|
|
id("com.github.jk1.dependency-license-report") version "2.5"
|
|
|
|
|
2023-03-24 03:58:12 +00:00
|
|
|
}
|
|
|
|
|
2023-08-18 03:01:32 +00:00
|
|
|
apply {
|
|
|
|
plugin("io.spring.dependency-management")
|
|
|
|
}
|
|
|
|
|
2023-03-24 03:58:12 +00:00
|
|
|
group = "dev.usbharu"
|
|
|
|
version = "0.0.1"
|
|
|
|
|
2023-11-09 08:48:48 +00:00
|
|
|
sourceSets {
|
|
|
|
create("intTest") {
|
2024-05-04 04:11:49 +00:00
|
|
|
test {
|
|
|
|
compileClasspath += sourceSets.main.get().output
|
|
|
|
runtimeClasspath += sourceSets.main.get().output
|
|
|
|
kotlin.srcDirs("src/intTest/kotlin")
|
|
|
|
java.srcDirs("src/intTest/java")
|
|
|
|
resources.srcDirs("src/intTest/resources")
|
|
|
|
}
|
2023-11-09 08:48:48 +00:00
|
|
|
}
|
2023-11-30 14:01:18 +00:00
|
|
|
create("e2eTest") {
|
2024-05-04 04:11:49 +00:00
|
|
|
test {
|
|
|
|
compileClasspath += sourceSets.main.get().output
|
|
|
|
runtimeClasspath += sourceSets.main.get().output
|
|
|
|
kotlin.srcDirs("src/e2eTest/kotlin")
|
|
|
|
java.srcDirs("src/e2eTest/java")
|
|
|
|
resources.srcDirs("src/e2eTest/resources")
|
|
|
|
}
|
2023-11-30 14:01:18 +00:00
|
|
|
}
|
2023-11-09 08:48:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
val intTestImplementation by configurations.getting {
|
|
|
|
extendsFrom(configurations.implementation.get())
|
|
|
|
}
|
|
|
|
val intTestRuntimeOnly by configurations.getting {
|
|
|
|
extendsFrom(configurations.runtimeOnly.get())
|
|
|
|
}
|
|
|
|
|
2023-11-30 14:01:18 +00:00
|
|
|
val e2eTestImplementation by configurations.getting {
|
|
|
|
extendsFrom(configurations.implementation.get())
|
|
|
|
}
|
|
|
|
|
|
|
|
val e2eTestRuntimeOnly by configurations.getting {
|
|
|
|
extendsFrom(configurations.runtimeOnly.get())
|
|
|
|
}
|
|
|
|
|
2023-11-09 08:48:48 +00:00
|
|
|
val integrationTest = task<Test>("integrationTest") {
|
|
|
|
description = "Runs integration tests."
|
|
|
|
group = "verification"
|
|
|
|
|
|
|
|
testClassesDirs = sourceSets["intTest"].output.classesDirs
|
|
|
|
classpath = sourceSets["intTest"].runtimeClasspath
|
|
|
|
shouldRunAfter("test")
|
|
|
|
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
|
|
|
|
2023-11-30 14:01:18 +00:00
|
|
|
val e2eTest = task<Test>("e2eTest") {
|
|
|
|
description = "Runs e2e tests."
|
|
|
|
group = "verification"
|
|
|
|
|
|
|
|
testClassesDirs = sourceSets["e2eTest"].output.classesDirs
|
|
|
|
classpath = sourceSets["e2eTest"].runtimeClasspath
|
|
|
|
shouldRunAfter("test")
|
|
|
|
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.check {
|
|
|
|
dependsOn(integrationTest)
|
|
|
|
dependsOn(e2eTest)
|
|
|
|
}
|
2023-11-09 08:48:48 +00:00
|
|
|
|
2023-03-30 11:55:12 +00:00
|
|
|
tasks.withType<Test> {
|
|
|
|
useJUnitPlatform()
|
2023-11-08 07:48:28 +00:00
|
|
|
doFirst {
|
|
|
|
jvmArgs = arrayOf(
|
2023-12-14 05:37:36 +00:00
|
|
|
"--add-opens", "java.base/java.lang=ALL-UNNAMED",
|
|
|
|
"--add-opens", "java.base/java.util=ALL-UNNAMED",
|
|
|
|
"--add-opens", "java.naming/javax.naming=ALL-UNNAMED",
|
2023-11-08 07:48:28 +00:00
|
|
|
).toMutableList()
|
|
|
|
}
|
2023-03-30 11:55:12 +00:00
|
|
|
}
|
|
|
|
|
2023-04-29 13:40:22 +00:00
|
|
|
|
2023-08-18 03:01:32 +00:00
|
|
|
tasks.withType<KotlinCompile> {
|
|
|
|
kotlinOptions {
|
|
|
|
freeCompilerArgs += "-Xjsr305=strict"
|
|
|
|
}
|
2023-09-20 05:53:23 +00:00
|
|
|
dependsOn("openApiGenerateMastodonCompatibleApi")
|
|
|
|
mustRunAfter("openApiGenerateMastodonCompatibleApi")
|
2023-08-18 03:01:32 +00:00
|
|
|
}
|
|
|
|
|
2023-04-30 21:38:30 +00:00
|
|
|
|
2023-05-01 01:48:59 +00:00
|
|
|
tasks.clean {
|
|
|
|
delete += listOf("$rootDir/src/main/resources/static")
|
|
|
|
}
|
|
|
|
|
2023-09-20 04:55:25 +00:00
|
|
|
tasks.create<GenerateTask>("openApiGenerateMastodonCompatibleApi", GenerateTask::class) {
|
|
|
|
generatorName.set("kotlin-spring")
|
|
|
|
inputSpec.set("$rootDir/src/main/resources/openapi/mastodon.yaml")
|
|
|
|
outputDir.set("$buildDir/generated/sources/mastodon")
|
|
|
|
apiPackage.set("dev.usbharu.hideout.controller.mastodon.generated")
|
|
|
|
modelPackage.set("dev.usbharu.hideout.domain.mastodon.model.generated")
|
|
|
|
configOptions.put("interfaceOnly", "true")
|
|
|
|
configOptions.put("useSpringBoot3", "true")
|
2023-10-15 01:40:26 +00:00
|
|
|
configOptions.put("reactive", "true")
|
2023-09-20 04:55:25 +00:00
|
|
|
additionalProperties.put("useTags", "true")
|
2023-10-10 06:18:16 +00:00
|
|
|
|
2023-10-03 16:45:55 +00:00
|
|
|
importMappings.put("org.springframework.core.io.Resource", "org.springframework.web.multipart.MultipartFile")
|
|
|
|
typeMappings.put("org.springframework.core.io.Resource", "org.springframework.web.multipart.MultipartFile")
|
2023-10-10 06:18:16 +00:00
|
|
|
schemaMappings.put(
|
|
|
|
"StatusesRequest",
|
2023-11-01 04:34:24 +00:00
|
|
|
"dev.usbharu.hideout.mastodon.interfaces.api.status.StatusesRequest"
|
2023-10-10 06:18:16 +00:00
|
|
|
)
|
2023-10-10 02:32:35 +00:00
|
|
|
templateDir.set("$rootDir/templates")
|
2023-09-20 04:55:25 +00:00
|
|
|
}
|
|
|
|
|
2023-03-24 03:58:12 +00:00
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2023-10-19 02:30:07 +00:00
|
|
|
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")
|
|
|
|
}
|
|
|
|
}
|
2024-01-07 03:55:52 +00:00
|
|
|
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")
|
|
|
|
}
|
|
|
|
}
|
2023-03-24 03:58:12 +00:00
|
|
|
}
|
|
|
|
|
2023-04-05 07:59:16 +00:00
|
|
|
kotlin {
|
|
|
|
target {
|
|
|
|
compilations.all {
|
2024-02-04 07:00:58 +00:00
|
|
|
kotlinOptions.jvmTarget = JavaVersion.VERSION_21.toString()
|
2023-04-05 07:59:16 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 02:48:39 +00:00
|
|
|
sourceSets.main {
|
2023-09-20 04:55:25 +00:00
|
|
|
kotlin.srcDirs(
|
|
|
|
"$buildDir/generated/ksp/main",
|
|
|
|
"$buildDir/generated/sources/openapi/src/main/kotlin",
|
|
|
|
"$buildDir/generated/sources/mastodon/src/main/kotlin"
|
|
|
|
)
|
2023-05-04 02:48:39 +00:00
|
|
|
}
|
|
|
|
|
2024-02-04 06:07:32 +00:00
|
|
|
val os = org.gradle.nativeplatform.platform.internal
|
|
|
|
.DefaultNativePlatform.getCurrentOperatingSystem()
|
|
|
|
|
2023-03-24 03:58:12 +00:00
|
|
|
dependencies {
|
|
|
|
implementation("io.ktor:ktor-serialization-jackson:$ktor_version")
|
|
|
|
implementation("org.jetbrains.exposed:exposed-core:$exposed_version")
|
|
|
|
implementation("org.jetbrains.exposed:exposed-jdbc:$exposed_version")
|
2024-02-18 03:06:44 +00:00
|
|
|
developmentOnly("com.h2database:h2:$h2_version")
|
2024-02-04 07:00:58 +00:00
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:$serialization_version")
|
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$serialization_version")
|
2023-03-24 03:58:12 +00:00
|
|
|
|
2023-09-22 08:32:47 +00:00
|
|
|
implementation("org.springframework.boot:spring-boot-starter-actuator")
|
2023-05-04 02:48:39 +00:00
|
|
|
|
2023-08-18 03:01:32 +00:00
|
|
|
implementation("org.springframework.boot:spring-boot-starter-web")
|
2023-08-28 12:05:34 +00:00
|
|
|
implementation("org.springframework.boot:spring-boot-starter-security")
|
2023-09-26 03:36:56 +00:00
|
|
|
implementation("org.springframework.boot:spring-boot-starter-thymeleaf")
|
2023-08-28 12:05:34 +00:00
|
|
|
implementation("org.springframework.boot:spring-boot-starter-oauth2-authorization-server")
|
|
|
|
implementation("org.springframework.boot:spring-boot-starter-oauth2-resource-server")
|
2024-02-18 03:06:44 +00:00
|
|
|
implementation("org.springframework.boot:spring-boot-starter-log4j2")
|
2024-02-21 02:08:36 +00:00
|
|
|
implementation("org.springframework.boot:spring-boot-starter-validation")
|
|
|
|
implementation("jakarta.validation:jakarta.validation-api")
|
|
|
|
implementation("jakarta.annotation:jakarta.annotation-api:2.1.0")
|
|
|
|
implementation("io.swagger.core.v3:swagger-annotations:2.2.6")
|
2023-08-18 06:25:42 +00:00
|
|
|
implementation("io.swagger.core.v3:swagger-models:2.2.6")
|
2023-08-28 12:05:34 +00:00
|
|
|
implementation("org.jetbrains.exposed:exposed-java-time:$exposed_version")
|
2023-09-19 07:21:35 +00:00
|
|
|
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
2023-09-21 07:12:24 +00:00
|
|
|
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
|
|
|
|
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
|
2023-09-22 08:32:47 +00:00
|
|
|
implementation("org.springframework.security:spring-security-oauth2-jose")
|
2023-09-29 06:18:29 +00:00
|
|
|
implementation("org.springframework.boot:spring-boot-starter-data-mongodb")
|
2023-11-02 09:17:46 +00:00
|
|
|
implementation("org.springframework.boot:spring-boot-starter-data-mongodb-reactive")
|
2024-02-04 07:00:58 +00:00
|
|
|
implementation("org.jetbrains.exposed:exposed-spring-boot-starter:$exposed_version")
|
2023-10-04 14:07:55 +00:00
|
|
|
implementation("io.trbl:blurhash:1.0.0")
|
2024-04-03 05:48:06 +00:00
|
|
|
implementation("software.amazon.awssdk:s3:2.25.23")
|
2024-02-04 07:00:58 +00:00
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version")
|
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor:$coroutines_version")
|
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-slf4j:$coroutines_version")
|
2023-10-19 02:30:07 +00:00
|
|
|
implementation("dev.usbharu:http-signature:1.0.0")
|
2023-05-04 02:48:39 +00:00
|
|
|
|
2024-04-03 05:48:06 +00:00
|
|
|
implementation("org.postgresql:postgresql:42.7.3")
|
2024-02-04 07:00:58 +00:00
|
|
|
implementation("com.twelvemonkeys.imageio:imageio-webp:3.10.1")
|
2023-11-14 13:04:41 +00:00
|
|
|
implementation("org.apache.tika:tika-core:2.9.1")
|
2023-11-29 06:02:46 +00:00
|
|
|
implementation("org.apache.tika:tika-parsers:2.9.1")
|
2023-11-14 13:04:41 +00:00
|
|
|
implementation("net.coobird:thumbnailator:0.4.20")
|
2024-02-16 11:01:37 +00:00
|
|
|
implementation("org.bytedeco:javacv:1.5.10") {
|
2024-02-04 06:07:32 +00:00
|
|
|
exclude(module = "opencv")
|
|
|
|
exclude(module = "flycapture")
|
|
|
|
exclude(module = "artoolkitplus")
|
|
|
|
exclude(module = "libdc1394")
|
|
|
|
exclude(module = "librealsense")
|
|
|
|
exclude(module = "librealsense2")
|
|
|
|
exclude(module = "tesseract")
|
|
|
|
exclude(module = "libfreenect")
|
|
|
|
exclude(module = "libfreenect2")
|
|
|
|
}
|
|
|
|
if (os.isWindows) {
|
2024-02-16 11:01:37 +00:00
|
|
|
implementation("org.bytedeco", "ffmpeg", "6.1.1-1.5.10", classifier = "windows-x86_64")
|
|
|
|
} else {
|
|
|
|
implementation("org.bytedeco", "ffmpeg", "6.1.1-1.5.10", classifier = "linux-x86_64")
|
2024-02-04 06:07:32 +00:00
|
|
|
}
|
2023-11-19 04:25:47 +00:00
|
|
|
implementation("org.flywaydb:flyway-core")
|
2023-11-02 02:56:03 +00:00
|
|
|
|
2024-01-07 03:55:52 +00:00
|
|
|
implementation("dev.usbharu:emoji-kt:2.0.0")
|
2024-05-03 17:16:01 +00:00
|
|
|
implementation("dev.usbharu:owl-producer-default:0.0.1")
|
2024-01-24 06:27:38 +00:00
|
|
|
implementation("org.jsoup:jsoup:1.17.2")
|
2024-04-03 05:48:06 +00:00
|
|
|
implementation("com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:20240325.1")
|
2024-01-07 03:55:52 +00:00
|
|
|
|
2023-04-29 13:25:41 +00:00
|
|
|
implementation("io.ktor:ktor-client-logging-jvm:$ktor_version")
|
2023-03-24 03:58:12 +00:00
|
|
|
|
|
|
|
testImplementation("org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version")
|
2024-02-04 07:00:58 +00:00
|
|
|
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines_version")
|
2023-03-30 06:33:19 +00:00
|
|
|
|
|
|
|
implementation("io.ktor:ktor-client-core:$ktor_version")
|
|
|
|
implementation("io.ktor:ktor-client-cio:$ktor_version")
|
2023-03-30 11:01:04 +00:00
|
|
|
implementation("io.ktor:ktor-client-content-negotiation:$ktor_version")
|
2023-03-31 07:25:08 +00:00
|
|
|
testImplementation("io.ktor:ktor-client-mock:$ktor_version")
|
2024-02-18 03:28:07 +00:00
|
|
|
testImplementation("com.h2database:h2:$h2_version")
|
2023-03-31 03:23:58 +00:00
|
|
|
|
2024-02-04 07:00:58 +00:00
|
|
|
testImplementation("org.mockito.kotlin:mockito-kotlin:5.2.1")
|
2023-04-10 02:37:08 +00:00
|
|
|
testImplementation("org.mockito:mockito-inline:5.2.0")
|
2024-02-04 07:00:58 +00:00
|
|
|
testImplementation("nl.jqno.equalsverifier:equalsverifier:3.15.6")
|
2023-11-08 07:48:28 +00:00
|
|
|
testImplementation("com.jparams:to-string-verifier:1.4.8")
|
2023-04-05 07:59:16 +00:00
|
|
|
|
|
|
|
implementation("org.drewcarlson:kjob-core:0.6.0")
|
2023-09-27 05:40:14 +00:00
|
|
|
implementation("org.drewcarlson:kjob-mongo:0.6.0")
|
2023-04-07 04:00:29 +00:00
|
|
|
|
2024-04-03 05:48:06 +00:00
|
|
|
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.23.6")
|
2023-11-11 02:59:54 +00:00
|
|
|
|
|
|
|
intTestImplementation("org.springframework.boot:spring-boot-starter-test")
|
2023-11-11 05:20:26 +00:00
|
|
|
intTestImplementation("org.springframework.security:spring-security-test")
|
2023-11-29 03:49:18 +00:00
|
|
|
intTestImplementation("org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version")
|
2024-02-04 07:00:58 +00:00
|
|
|
intTestImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines_version")
|
|
|
|
intTestImplementation("org.mockito.kotlin:mockito-kotlin:5.2.1")
|
2024-02-18 03:28:07 +00:00
|
|
|
intTestImplementation("com.h2database:h2:$h2_version")
|
2023-11-11 05:20:26 +00:00
|
|
|
|
2023-11-30 14:01:18 +00:00
|
|
|
e2eTestImplementation("org.springframework.boot:spring-boot-starter-test")
|
|
|
|
e2eTestImplementation("org.springframework.security:spring-security-test")
|
|
|
|
e2eTestImplementation("org.springframework.boot:spring-boot-starter-webflux")
|
2024-04-03 05:48:06 +00:00
|
|
|
e2eTestImplementation("org.jsoup:jsoup:1.17.2")
|
2023-12-01 08:32:10 +00:00
|
|
|
e2eTestImplementation("com.intuit.karate:karate-junit5:1.4.1")
|
2024-02-18 03:28:07 +00:00
|
|
|
e2eTestImplementation("com.h2database:h2:$h2_version")
|
2023-11-30 14:01:18 +00:00
|
|
|
|
2023-03-24 03:58:12 +00:00
|
|
|
}
|
2023-03-24 04:09:43 +00:00
|
|
|
|
2023-04-29 14:57:25 +00:00
|
|
|
detekt {
|
|
|
|
parallel = true
|
|
|
|
config = files("detekt.yml")
|
|
|
|
buildUponDefaultConfig = true
|
2023-10-14 15:11:32 +00:00
|
|
|
basePath = "${rootDir.absolutePath}/src/main/kotlin"
|
2023-04-29 16:25:54 +00:00
|
|
|
autoCorrect = true
|
2023-04-29 14:57:25 +00:00
|
|
|
}
|
2023-05-05 03:41:04 +00:00
|
|
|
|
2024-02-16 11:01:37 +00:00
|
|
|
tasks.withType<io.gitlab.arturbosch.detekt.Detekt> {
|
2023-10-14 15:11:32 +00:00
|
|
|
exclude("**/generated/**")
|
|
|
|
doFirst {
|
|
|
|
|
|
|
|
}
|
|
|
|
setSource("src/main/kotlin")
|
|
|
|
exclude("build/")
|
|
|
|
}
|
|
|
|
|
2023-05-05 03:41:04 +00:00
|
|
|
tasks.withType<io.gitlab.arturbosch.detekt.Detekt>().configureEach {
|
2023-09-19 07:21:35 +00:00
|
|
|
exclude("**/org/koin/ksp/generated/**", "**/generated/**")
|
2023-05-05 03:41:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType<io.gitlab.arturbosch.detekt.DetektCreateBaselineTask>().configureEach {
|
2023-09-19 07:21:35 +00:00
|
|
|
exclude("**/org/koin/ksp/generated/**", "**/generated/**")
|
|
|
|
}
|
|
|
|
|
|
|
|
configurations.matching { it.name == "detekt" }.all {
|
|
|
|
resolutionStrategy.eachDependency {
|
|
|
|
if (requested.group == "org.jetbrains.kotlin") {
|
2024-02-04 07:00:58 +00:00
|
|
|
useVersion("1.9.22")
|
2023-09-19 07:21:35 +00:00
|
|
|
}
|
|
|
|
}
|
2023-05-05 03:41:04 +00:00
|
|
|
}
|
2023-11-06 08:49:34 +00:00
|
|
|
|
2024-02-18 03:06:44 +00:00
|
|
|
configurations {
|
|
|
|
all {
|
|
|
|
exclude("org.springframework.boot", "spring-boot-starter-logging")
|
2024-02-18 03:28:07 +00:00
|
|
|
exclude("ch.qos.logback", "logback-classic")
|
2024-02-18 03:06:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-11-06 14:59:17 +00:00
|
|
|
project.gradle.taskGraph.whenReady {
|
|
|
|
println(this.allTasks)
|
|
|
|
this.allTasks.map { println(it.name) }
|
|
|
|
if (this.hasTask(":koverGenerateArtifact")) {
|
|
|
|
println("has task")
|
|
|
|
val task = this.allTasks.find { it.name == "test" }
|
|
|
|
val verificationTask = task as VerificationTask
|
|
|
|
verificationTask.ignoreFailures = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-11-06 08:49:34 +00:00
|
|
|
kover {
|
2023-11-06 14:59:17 +00:00
|
|
|
|
2023-11-09 08:48:48 +00:00
|
|
|
excludeSourceSets {
|
2023-12-10 05:32:13 +00:00
|
|
|
names("aot", "e2eTest", "intTest")
|
2023-11-06 08:49:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
koverReport {
|
|
|
|
filters {
|
|
|
|
excludes {
|
2024-02-16 11:01:37 +00:00
|
|
|
packages(
|
|
|
|
"dev.usbharu.hideout.activitypub.domain.exception",
|
|
|
|
"dev.usbharu.hideout.core.domain.exception",
|
|
|
|
"dev.usbharu.hideout.core.domain.exception.media",
|
|
|
|
"dev.usbharu.hideout.core.domain.exception.resource",
|
|
|
|
"dev.usbharu.hideout.core.domain.exception.resource.local"
|
|
|
|
)
|
|
|
|
annotatedBy("org.springframework.context.annotation.Configuration")
|
|
|
|
annotatedBy("org.springframework.boot.context.properties.ConfigurationProperties")
|
2023-11-06 08:49:34 +00:00
|
|
|
packages(
|
|
|
|
"dev.usbharu.hideout.controller.mastodon.generated",
|
|
|
|
"dev.usbharu.hideout.domain.mastodon.model.generated"
|
|
|
|
)
|
|
|
|
packages("org.springframework")
|
|
|
|
packages("org.jetbrains")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-01-16 05:42:29 +00:00
|
|
|
|
|
|
|
springBoot {
|
|
|
|
buildInfo()
|
|
|
|
}
|
2024-02-18 03:06:44 +00:00
|
|
|
|
|
|
|
licenseReport {
|
|
|
|
|
|
|
|
excludeOwnGroup = true
|
|
|
|
|
|
|
|
importers = arrayOf<DependencyDataImporter>(XmlReportImporter("hideout", File("$projectDir/license-list.xml")))
|
|
|
|
renderers = arrayOf<ReportRenderer>(
|
|
|
|
InventoryHtmlReportRenderer(),
|
|
|
|
CsvReportRenderer(),
|
|
|
|
JsonReportRenderer(),
|
|
|
|
XmlReportRenderer()
|
|
|
|
)
|
|
|
|
filters = arrayOf<DependencyFilter>(LicenseBundleNormalizer("$projectDir/license-normalizer-bundle.json", true))
|
|
|
|
allowedLicensesFile = File("$projectDir/allowed-licenses.json")
|
|
|
|
configurations = arrayOf("productionRuntimeClasspath")
|
|
|
|
}
|