halo/api/build.gradle

136 lines
4.0 KiB
Groovy

plugins {
id 'java-library'
id 'halo.publish'
id 'jacoco'
alias(libs.plugins.lombok)
alias(libs.plugins.versions)
}
group = 'run.halo.app'
description = 'API of halo project, connecting by other projects.'
tasks.withType(JavaCompile).configureEach {
options.release = 21
options.encoding = 'UTF-8'
}
tasks.withType(Javadoc).configureEach {
options.encoding = 'UTF-8'
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
withJavadocJar()
withSourcesJar()
}
jar {
manifest {
attributes(
'Implementation-Title': project.name,
'Implementation-Version': project.version,
'Implementation-Vendor': 'Halo Project',
)
}
}
repositories {
mavenCentral()
maven { url = 'https://repo.spring.io/milestone' }
maven { url = 'https://s01.oss.sonatype.org/content/repositories/snapshots' }
}
dependencies {
api platform(project(':platform:application'))
annotationProcessor platform(project(':platform:application'))
api 'org.springframework.boot:spring-boot-starter-actuator'
api 'org.springframework.boot:spring-boot-starter-mail'
api 'org.springframework.boot:spring-boot-starter-thymeleaf'
api 'org.springframework.boot:spring-boot-starter-webflux'
api 'org.springframework.boot:spring-boot-starter-validation'
api 'org.springframework.boot:spring-boot-starter-data-r2dbc'
api 'org.springframework.session:spring-session-core'
// Spring Security
api 'org.springframework.boot:spring-boot-starter-security'
api 'org.springframework.security:spring-security-oauth2-jose'
api 'org.springframework.security:spring-security-oauth2-client'
api 'org.springframework.security:spring-security-oauth2-resource-server'
api 'io.micrometer:context-propagation'
// Cache
api "org.springframework.boot:spring-boot-starter-cache"
api "com.github.ben-manes.caffeine:caffeine"
api "org.springdoc:springdoc-openapi-starter-webflux-ui"
api 'org.openapi4j:openapi-schema-validator'
api "net.bytebuddy:byte-buddy"
api "org.bouncycastle:bcpkix-jdk18on"
// Apache Lucene
api "org.apache.lucene:lucene-core"
api "org.apache.lucene:lucene-queryparser"
api "org.apache.lucene:lucene-highlighter"
api "org.apache.lucene:lucene-backward-codecs"
api 'org.apache.lucene:lucene-analysis-common'
api "org.apache.commons:commons-lang3"
api "io.seruco.encoding:base62"
api "org.pf4j:pf4j"
api "com.google.guava:guava"
api "org.jsoup:jsoup"
api "io.github.java-diff-utils:java-diff-utils"
api "org.springframework.integration:spring-integration-core"
api "com.github.java-json-tools:json-patch"
api "org.thymeleaf.extras:thymeleaf-extras-springsecurity6"
api 'org.apache.tika:tika-core'
api "org.imgscalr:imgscalr-lib"
api 'com.drewnoakes:metadata-extractor'
api "io.github.resilience4j:resilience4j-spring-boot3"
api "io.github.resilience4j:resilience4j-reactor"
api "com.j256.two-factor-auth:two-factor-auth"
runtimeOnly 'io.r2dbc:r2dbc-h2'
runtimeOnly 'org.postgresql:postgresql'
runtimeOnly 'org.postgresql:r2dbc-postgresql'
runtimeOnly 'org.mariadb:r2dbc-mariadb'
runtimeOnly 'io.asyncer:r2dbc-mysql'
runtimeOnly 'com.github.therapi:therapi-runtime-javadoc'
annotationProcessor "com.github.therapi:therapi-runtime-javadoc-scribe"
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'io.projectreactor:reactor-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
publishing {
publications.named('mavenJava', MavenPublication) {
from components.java
pom {
name = 'API library'
description = "$project.description"
}
}
}
tasks.named('test') {
useJUnitPlatform()
finalizedBy jacocoTestReport
}
tasks.named('jacocoTestReport') {
reports {
xml.required = true
html.required = false
}
}