You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

110 lines
2.6 KiB

plugins {
id "org.asciidoctor.jvm.convert" version "3.3.2"
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
asciidoctorExt
}
dependencies {
implementation "$boot:spring-boot-starter-web"
// security
implementation "$boot:spring-boot-starter-security"
// implementation "com.auth0:java-jwt:4.4.0"
// db
runtimeOnly "com.mysql:mysql-connector-j"
implementation "org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4:1.16"
// jpa
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0'
implementation "$boot:spring-boot-starter-data-jpa"
// querydsl
implementation "com.querydsl:querydsl-jpa:5.0.0:jakarta"
//cache
implementation 'org.springframework.boot:spring-boot-starter-cache'
implementation 'org.ehcache:ehcache:3.10.8'
implementation 'org.hibernate:hibernate-jcache:6.0.2.Final'
implementation 'javax.cache:cache-api:1.1.1'
//redis
implementation 'org.springframework.boot:spring-boot-starter-data-redis:3.2.2'
// rest doc
asciidoctorExt 'org.springframework.restdocs:spring-restdocs-asciidoctor'
// test
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation project(":common-core")
implementation project(":common-util")
implementation project(":web-security")
implementation project(":web-api-common")
}
ext {
snippetsDir = file('build/generated-snippets')
}
tasks {
def isTest = gradle.startParameter.excludedTaskNames.contains('test')
if (!isTest) {
asciidoctor {
dependsOn test
inputs.dir snippetsDir
doFirst {
delete file('src/main/resources/static/docs')
}
}
}
test {
outputs.dir snippetsDir
}
bootJar {
if (!isTest) {
dependsOn asciidoctor
from("${asciidoctor.outputDir}/html5") {
into 'static/docs'
}
}
}
task copyDocument(type: Copy) {
if (!isTest) {
dependsOn asciidoctor
from file("build/docs/asciidoc")
into file("src/main/resources/static/docs")
}
}
build {
if (!isTest) {
dependsOn copyDocument
}
}
// querydsl
def querydslDir = layout.buildDirectory.dir("generated/querydsl").get().asFile
sourceSets {
main.java.srcDir(querydslDir)
}
compileJava {
options.getGeneratedSourceOutputDirectory().set(file(querydslDir))
}
clean {
delete file(querydslDir)
}
}