当前仓库属于暂停状态,部分功能使用受限,详情请查阅 仓库状态说明
1 Star 0 Fork 42

wuwutai/duic
暂停

forked from ZY/duic
暂停
 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build.gradle 7.08 KB
一键复制 编辑 原始数据 按行查看 历史
treetreenewb 提交于 2020-08-17 17:17 . !4 升级spring-boot版本至2.3.3
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"
label(['maintainer': 'Kevin Zou <[email protected]>'])
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"
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Kotlin
1
https://gitee.com/ajing/duic.git
[email protected]:ajing/duic.git
ajing
duic
duic
master

搜索帮助