123456789101112131415161718192021222324252627282930313233343536373839404142 |
- ext {
- artifactoryBaseUrl = 'http://maven.ubtob.net/artifactory'
- artifactorySnapshotRepoUrl = "$artifactoryBaseUrl/libs-snapshot-local"
- artifactoryReleaseRepoUrl = "$artifactoryBaseUrl/libs-release-local"
- }
- apply plugin: 'maven-publish'
- tasks.withType(JavaCompile) {
- options.encoding = 'UTF-8'
- }
- task sourcesJar(type: Jar) {
- baseName "${project.name}"
- classifier 'sources'
- from sourceSets.main.allSource
- }
- publishing {
- publications {
- manage(MavenPublication) {
- groupId "${project.group}"
- artifactId "${project.name}"
- version "${project.version}"
- artifact jar
- artifact sourcesJar
- }
- }
- repositories {
- maven {
- name 'remoteArtifactory'
- url project.version.endsWith('-SNAPSHOT') ? artifactorySnapshotRepoUrl : artifactoryReleaseRepoUrl
- credentials {
- username = 'admin'
- password = 'Admin2020yourkj2021'
- }
- }
- }
- }
|