如何编写Gradle脚本以便将shadowjar发布到Artifactory中
我在我的java项目中使用shadowJar。我想把结果推到伪像中。
我的 gradle 脚本看起来像这样,我不知道如何连接这些点:
shadowJar {
baseName = 'com.mycompany.myapp'
manifest {
attributes 'Main-Class': 'myapp.starter'
}
}
]
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'com.github.johnrengelman.shadow'
// rep for the project
repositories {
mavenCentral()
maven {
url 'http://repo.company:8081/artifactory/libs-release'
credentials {
username = "${repo_user}"
password = "${repo_password}"
}
}
maven {
url 'http://repo.company:8081/artifactory/libs-snapshot'
credentials {
username = "${repo_user}"
password = "${repo_password}"
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourceJar {
classifier "sources"
}
}
}
}
如何编写 gradle 代码来获取 shadowjar 文件?
谢谢,雷。