加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.gradle 4.67 KB
一键复制 编辑 原始数据 按行查看 历史
ZY 提交于 2022-09-26 15:53 . UUUU
buildscript {
repositories {
maven { url "https://repo.huaweicloud.com/repository/maven/" }
}
}
plugins {
id "net.saliman.properties" version "1.5.1"
id "io.spring.dependency-management" version "1.0.11.RELEASE"
id "com.github.hierynomus.license" version "0.16.1"
id "org.flywaydb.flyway" version "8.2.0"
id "org.hidetake.ssh" version "2.10.1"
id "com.github.johnrengelman.shadow" version "7.1.2"
id "com.bmuschko.docker-remote-api" version "7.2.0"
id "org.sonarqube" version "3.3"
id "com.google.protobuf" version "0.8.18"
}
allprojects {
apply plugin: "java"
apply plugin: "java-library"
apply plugin: "jacoco"
apply plugin: "net.saliman.properties"
apply plugin: "io.spring.dependency-management"
apply plugin: "com.github.johnrengelman.shadow"
apply plugin: "com.github.hierynomus.license"
version = "1.0.0-SNAPSHOT"
sourceCompatibility = "11"
targetCompatibility = "11"
ext {
protobufVersion = "3.19.3"
grpcVersion = "1.43.2"
reactorGrpcVersion = "1.2.3"
}
[compileJava, compileTestJava, javadoc]*.options*.encoding = "UTF-8"
test {
useJUnitPlatform()
testLogging {
exceptionFormat "full"
events "passed", "skipped", "failed"
}
workingDir rootProject.rootDir
ignoreFailures = true
}
jacoco {
toolVersion = "0.8.3"
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
}
license {
ignoreFailures = true
header = rootProject.file("LICENSE")
headerURI = com.hierynomus.gradle.license.LicenseBasePlugin.classLoader.getResource("headers/Apache-2.0").toURI()
skipExistingHeaders = true
mapping {
java = "SLASHSTAR_STYLE"
conf = "SCRIPT_STYLE"
proto = "DOUBLESLASH_STYLE"
}
ext {
year = "2019-${Calendar.instance.get(Calendar.YEAR)}"
author = "the original author or authors"
}
}
dependencyManagement {
imports {
mavenBom("io.netty:netty-bom:4.1.82.Final")
mavenBom("org.apache.logging.log4j:log4j-bom:2.17.1")
mavenBom("com.google.inject:guice-bom:5.0.1")
mavenBom("io.r2dbc:r2dbc-bom:Borca-SR2")
mavenBom("io.grpc:grpc-bom:1.49.1")
mavenBom("io.micrometer:micrometer-bom:1.9.4")
mavenBom("io.projectreactor:reactor-bom:2020.0.23")
// 单元测试工具
mavenBom("org.testcontainers:testcontainers-bom:1.16.2")
mavenBom("org.junit:junit-bom:5.8.2")
}
dependencies {
dependency("org.projectlombok:lombok:1.18.20")
dependency("com.typesafe:config:1.4.1")
dependency("com.github.ben-manes.caffeine:caffeine:3.1.1")
dependency("org.roaringbitmap:RoaringBitmap:0.9.32")
dependencySet(group: "io.avaje", version: "8.9") {
entry "avaje-inject-generator"
entry "avaje-inject"
}
dependencySet(group: "io.avaje", version: "1.0-RC2") {
entry "avaje-jsonb-generator"
entry "avaje-jsonb"
}
// 单元测试工具
dependency("com.github.javafaker:javafaker:1.0.2")
dependency("org.assertj:assertj-core:3.20.2")
dependency("org.mockito:mockito-junit-jupiter:4.2.0")
dependency("org.junit-pioneer:junit-pioneer:1.5.0")
// 性能测试工具
dependency("org.openjdk.jmh:jmh-core:1.33")
dependency("org.openjdk.jmh:jmh-generator-annprocess:1.33")
}
}
dependencies {
annotationProcessor("org.projectlombok:lombok")
compileOnly("org.projectlombok:lombok")
compileOnly("com.google.code.findbugs:jsr305")
implementation("org.apache.logging.log4j:log4j-core")
implementation("org.apache.logging.log4j:log4j-slf4j-impl")
// Test
testImplementation("org.junit.platform:junit-platform-launcher")
testImplementation("org.junit.jupiter:junit-jupiter-engine")
testImplementation("org.junit.jupiter:junit-jupiter-params")
testImplementation("org.junit-pioneer:junit-pioneer")
testImplementation("io.projectreactor:reactor-test")
testImplementation("io.projectreactor:reactor-tools")
testImplementation("org.assertj:assertj-core")
testImplementation("org.mockito:mockito-junit-jupiter")
testImplementation("com.github.javafaker:javafaker") {
exclude module: "snakeyaml"
}
testImplementation("org.yaml:snakeyaml:1.30")
}
repositories {
maven { url "https://repo.huaweicloud.com/repository/maven/" }
}
jar {
manifest {
attributes(
"Created-By": "${System.getProperty("java.version")} (${System.getProperty("java.specification.vendor")})",
"Implementation-Title": project.name,
"Implementation-Version": project.version,
"Built-Date": java.time.OffsetDateTime.now().truncatedTo(java.time.temporal.ChronoUnit.SECONDS)
)
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化