加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.gradle 2.26 KB
一键复制 编辑 原始数据 按行查看 历史
plugins {
id 'com.jfrog.artifactory' version '4.11.0' apply false
id 'com.jfrog.bintray' version '1.8.4' apply false
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
}
subprojects {
apply plugin: 'java-library'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.artifactory'
apply plugin: 'com.jfrog.bintray'
sourceCompatibility = '1.8'
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/milestone' }
if (version.endsWith('SNAPSHOT')) {
maven { url 'https://repo.spring.io/libs-snapshot' }
maven {
url 'https://oss.jfrog.org/artifactory/oss-snapshot-local'
}
}
mavenLocal()
}
dependencyManagement {
imports {
mavenBom "io.projectreactor:reactor-bom:${reactorBomVersion}"
mavenBom "org.junit:junit-bom:${junitJupiterVersion}"
mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}"
mavenBom "io.rsocket:rsocket-bom:${rsocketVersion}"
}
dependencies {
dependency "io.rsocket.routing:rsocket-routing-common:${rsocketRoutingClientVersion}"
dependency "io.rsocket.routing:rsocket-routing-frames:${rsocketRoutingClientVersion}"
dependency "org.agrona:agrona:${agronaVersion}"
dependency "org.assertj:assertj-core:${assertjVersion}"
dependency "org.roaringbitmap:RoaringBitmap:${roaringbitmapVersion}"
}
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
}
}
}
// from https://reflectoring.io/publish-snapshots-with-gradle/
artifactory {
contextUrl = 'https://oss.jfrog.org'
publish {
repository {
repoKey = 'oss-snapshot-local'
username = System.getenv('BINTRAY_USER')
password = System.getenv('BINTRAY_KEY')
}
defaults {
publications(publishing.publications.mavenJava)
publishArtifacts = true
publishPom = true
}
}
resolve {
repoKey = 'jcenter'
}
clientConfig.info.setBuildNumber(System.getProperty('build.number'))
}
test {
useJUnitPlatform()
}
}
wrapper {
distributionType = Wrapper.DistributionType.ALL
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化