gradle publish相关配置

1. gradle.build文件:
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'maven-publish'
version = '1.0.30-SNAPSHOT'
group = 'com.wxbc.cou.manager'

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
maven {
url "${repo_path}"
}
}


publishing{
publications{
mavenJava(MavenPublication){
artifact("build/libs/couManagerApi-$version"+".jar"){
extension 'jar'
}
}
}

repositories {
maven {
url "${repo_api_path}"
credentials {
username "${repo_user}"
password "${repo_password}"
}
}
}
}

publish.dependsOn(build)

dependencies {
compile 'com.alibaba:fastjson:1.2.58'
compile 'io.springfox:springfox-swagger2:2.9.2'
compile 'io.springfox:springfox-swagger-ui:2.9.2'
compile "io.springfox:springfox-bean-validators:2.9.2"

compile 'org.apache.commons:commons-lang3:3.6'
annotationProcessor 'org.projectlombok:lombok:1.18.2'
compileOnly 'org.projectlombok:lombok:1.18.2'

compile 'org.hibernate:hibernate-validator:6.0.12.Final'
compile 'com.github.pagehelper:pagehelper-spring-boot-starter:1.3.0'
compile 'org.springframework.cloud:spring-cloud-context:2.2.6.RELEASE'
implementation('com.wxbc:auto.api.plugin:0.0.3-SNAPSHOT')

}

2.gradle.properties

repo_path=http://nexus.i.wxblockchain.com:8081/nexus/content/groups/public/

repo_api_path=http://nexus.i.wxblockchain.com:8081/nexus/content/repositories/snapshots/
repo_user=zhengjiao

repo_password=zhengjiao123$
posted @ 2021-09-26 11:44  西凤楼  阅读(896)  评论(0编辑  收藏  举报
如果,您认为阅读这篇博客让您有些收获, 如果,您希望更容易地发现我的新博客,不妨关注一下。因为,我的写作热情也离不开您的肯定支持。 感谢您的阅读,如果您对我的博客所讲述的内容有兴趣,请继续关注我的后续博客。 因为有小孩,兼职卖书,路过的朋友有需要低价购买图书、点读笔、纸尿裤等资源的,可扫最上方二维码,质量有保证,价格很美丽,欢迎咨询!