代码拉取完成,页面将自动刷新
同步操作将从 ZY/duic 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
buildscript {
ext {
kotlinVersion = "1.3.31"
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion"
}
}
plugins {
id "io.spring.dependency-management" version "1.0.8.RELEASE"
id "org.springframework.boot" version "2.3.3.RELEASE"
id "net.researchgate.release" version "2.8.0"
id "com.moowork.node" version "1.3.1"
id "com.github.hierynomus.license" version "0.15.0"
id "com.bmuschko.docker-remote-api" version "4.10.0"
}
apply plugin: "java"
apply plugin: "maven"
apply plugin: "idea"
apply plugin: "jacoco"
apply plugin: "kotlin"
apply plugin: "kotlin-spring"
apply plugin: "project-report"
group "io.zhudy.duic"
repositories {
mavenLocal()
mavenCentral()
}
ext {
resilience4jVersion = "0.16.0"
}
configurations {
all {
exclude group: "org.springframework.boot", module: "spring-boot-starter-logging"
exclude group: "ch.qos.logback"
exclude module: "hibernate-validator"
exclude module: "nio-multipart-parser"
}
}
dependencyManagement {
imports {
mavenBom "io.projectreactor:reactor-bom:Californium-SR9"
mavenBom "org.springframework.boot:spring-boot-dependencies:2.1.5.RELEASE"
mavenBom "org.springframework:spring-framework-bom:5.1.8.RELEASE"
mavenBom "com.fasterxml.jackson:jackson-bom:2.9.9"
mavenBom "org.junit:junit-bom:5.4.2"
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib"
implementation "org.jetbrains.kotlin:kotlin-reflect"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.2.1"
implementation "io.github.resilience4j:resilience4j-ratelimiter:$resilience4jVersion"
implementation "io.github.resilience4j:resilience4j-reactor:$resilience4jVersion"
implementation "org.springframework.boot:spring-boot-starter-webflux"
implementation "org.springframework.boot:spring-boot-starter-log4j2"
implementation "org.springframework:spring-jdbc"
implementation "com.fasterxml.jackson.module:jackson-module-kotlin"
implementation "org.mongodb:mongodb-driver-reactivestreams:1.11.0"
implementation "com.github.ben-manes.caffeine:caffeine:2.7.0"
implementation "com.auth0:java-jwt:3.3.0"
implementation "org.simplejavamail:simple-java-mail:5.1.6"
implementation "io.github.java-diff-utils:java-diff-utils:4.0"
implementation "org.springframework.security:spring-security-crypto:5.0.4.RELEASE"
implementation "org.liquibase:liquibase-core:3.6.3"
implementation "com.zaxxer:HikariCP:3.3.0"
implementation("mysql:mysql-connector-java:8.0.14") {
exclude module: "protobuf-java"
}
implementation "org.postgresql:postgresql:42.2.2"
implementation "org.apache.logging.log4j:log4j-slf4j-impl:2.11.2"
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "org.junit.jupiter:junit-jupiter-engine"
testImplementation "org.junit.jupiter:junit-jupiter-params"
testImplementation "org.mockito:mockito-core:2.+"
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0"
testImplementation "org.springframework.boot:spring-boot-starter-test"
testImplementation "io.projectreactor:reactor-test"
testImplementation "com.squareup.okhttp3:mockwebserver:3.14.2"
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
}
[compileJava, compileTestJava, javadoc]*.options*.encoding = "UTF-8"
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileJava.dependsOn(processResources)
bootJar {
manifest {
attributes "Implementation-Title": "duic", "Implementation-Version": project.version
}
}
license {
headerURI = com.hierynomus.gradle.license.LicenseBasePlugin.class.getClassLoader().getResource("headers/Apache-2.0").toURI()
mapping([
"vue": "XML_STYLE"
])
excludes([
"db/migration/**"
])
ext {
year = "2017-${Calendar.getInstance().get(Calendar.YEAR)}"
author = "the original author or authors"
}
}
task licenseFormatWeb(type: com.hierynomus.gradle.license.tasks.LicenseFormat) {
group = "license"
source = fileTree(project.projectDir).include(
"buildSrc/*.js",
"src/main/web/**/*.vue",
"src/main/web/**/*.html",
"src/main/web/**/*.js"
)
}
licenseFormat.dependsOn licenseFormatWeb
tasks.withType(com.hierynomus.gradle.license.tasks.LicenseCheck) {
it.enabled = false
}
test {
useJUnitPlatform()
testLogging {
showStandardStreams = true
exceptionFormat = "full"
}
}
jacoco {
toolVersion = "0.8.4"
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
html.destination file("${buildDir}/jacocoHtml")
}
}
jacocoTestReport.dependsOn test
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
node {
version = "8.9.4"
yarnVersion = "1.7.0"
download = true
}
task buildAdmin(type: YarnTask, dependsOn: yarn) {
group = "node"
args = ["run", "build"]
}
task copyAdminFiles(type: Copy, dependsOn: buildAdmin) {
group = "node"
from "dist"
include "**/**"
into "${project.buildDir}/resources/main/public-web-resources"
}
bootJar.dependsOn copyAdminFiles
task copyDockerJar(type: Copy, dependsOn: build) {
group = "docker"
from jar.archivePath.path
into "${project.buildDir}/docker"
rename { String fileName ->
fileName.replace("-${project.version}", "")
}
}
task createDockerfile(type: com.bmuschko.gradle.docker.tasks.image.Dockerfile, dependsOn: copyDockerJar) {
group = "docker"
def jarName = "${project.name}.jar".toString()
destFile = project.file("${project.buildDir}/docker/Dockerfile")
from "openjdk:8u171-jre-slim-stretch"
copyFile(jarName, "/app/$jarName".toString())
workingDir("/app")
volume("/app/logs")
environmentVariable("TZ", "Asia/Shanghai") // 默认时区设置为东8区
environmentVariable([
JVM_OPTS : "-Xms1g -Xmx1g -XX:MetaspaceSize=128m",
JAVA_OPTS: "-server -XX:+UseG1GC \$JVM_OPTS -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=logs/ -XX:+PrintGCDateStamps -verbose:gc -XX:+PrintGCDetails -Xloggc:logs/gc.log"
])
environmentVariable("DUIC_OPTS", "-Dspring.profiles.active=mongodb")
exposePort(7777)
defaultCommand("sh", "-c", "java \$JAVA_OPTS \$DUIC_OPTS -jar $jarName")
}
task buildImage(type: com.bmuschko.gradle.docker.tasks.image.DockerBuildImage, dependsOn: createDockerfile) {
group = "docker"
inputDir = project.file("${project.buildDir}/docker")
tags = ["zhudyos/${project.name}:${project.version}".toString(), "zhudyos/${project.name}:latest".toString()]
}
task copyRelease(type: Copy) {
from jar.archivePath.path
into "${project.buildDir}/releases"
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。