加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.gradle 3.92 KB
一键复制 编辑 原始数据 按行查看 历史
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:2.2.9.RELEASE")
}
}
plugins {
id 'io.franzbecker.gradle-lombok' version '4.0.0' apply false
id "com.google.protobuf" version "0.8.16" apply false
}
allprojects {
repositories {
jcenter()
mavenCentral()
maven { url "https://repo.spring.io/milestone" }
maven { url 'https://jitpack.io' }
}
task downloadDependencies {
doLast {
configurations.all {
try {
it.files
} catch (e) {
project.logger.info(e.message)
}
}
}
}
}
configure(subprojects.findAll { !it.name.startsWith("examples/") }) {
apply plugin: 'io.spring.dependency-management'
apply plugin: 'io.franzbecker.gradle-lombok'
apply plugin: 'maven-publish'
apply plugin: 'java'
apply from: "$rootDir/gradle/rerunTests.gradle"
sourceCompatibility = targetCompatibility = 11
tasks.withType(JavaCompile) {
options.compilerArgs = [
'-Xlint:deprecation',
'-Werror'
]
}
lombok {
version = '1.18.20'
}
test {
useJUnitPlatform()
testLogging {
displayGranularity 1
showStackTraces = true
exceptionFormat = 'full'
events "STARTED", "PASSED", "FAILED", "SKIPPED"
}
}
jar {
manifest {
attributes(
'Manifest-Version': '1.0',
'Implementation-Version': "${project.version}",
'Implementation-Title': "${project.name}"
)
}
}
publishing {
publications {
maven(MavenPublication) {
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
}
}
}
task install {
dependsOn tasks.publishToMavenLocal
dependsOn tasks.findByName("assemble")
}
dependencyManagement {
overriddenByDependencies = false
imports {
mavenBom 'org.junit:junit-bom:5.7.2'
mavenBom org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES
mavenBom 'org.testcontainers:testcontainers-bom:1.16.0'
// pinned to 1.23.1, see https://github.com/grpc/grpc-java/issues/6707
mavenBom 'io.grpc:grpc-bom:1.23.1'
mavenBom 'com.google.protobuf:protobuf-bom:3.10.0'
mavenBom 'io.rsocket:rsocket-bom:1.1.0'
}
dependencies {
dependency 'org.pf4j:pf4j:3.1.0'
dependencySet(group: 'io.rsocket.rpc', version: '0.3.0') {
entry 'rsocket-rpc-core'
entry 'rsocket-rpc-protobuf'
}
dependency 'org.springframework.fu:spring-fu-jafu:0.3.2'
dependency 'com.google.protobuf:protoc:3.10.1'
dependency 'com.google.auto.service:auto-service:1.0'
// Override kafka-clients' version, otherwise it comes from Spring Boot
dependency 'org.apache.kafka:kafka-clients:2.3.1'
dependency 'com.salesforce.servicelibs:reactor-grpc-stub:0.10.0'
dependency 'org.awaitility:awaitility:4.1.0'
}
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter'
}
configurations {
compileOnlyClasspath {
// https://discuss.gradle.org/t/what-is-a-configuration-which-cant-be-directly-resolved/30721
extendsFrom compileOnly
canBeConsumed false
canBeResolved true
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化