12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- ext {
- artifactoryBaseUrl = 'http://maven.ubtob.net/artifactory'
- artifactorySnapshotRepoUrl = "$artifactoryBaseUrl/libs-snapshot-local"
- artifactoryReleaseRepoUrl = "$artifactoryBaseUrl/libs-release-local"
- }
- apply plugin: 'maven-publish'
- task sourcesJar(type: Jar) {
- baseName "${project.name}"
- classifier 'sources'
- from sourceSets.main.allSource
- }
- publishing {
- publications {
- plugin(MavenPublication) {
- groupId "${project.group}"
- artifactId "${project.name}"
- version "${project.version}"
- from components.java
- artifact sourcesJar
- }
- }
- repositories {
- maven {
- name 'myLocal'
- url "file://$projectDir/repo"
- }
- maven {
- name 'remoteArtifactory'
- url project.version.endsWith('-SNAPSHOT') ? artifactorySnapshotRepoUrl : artifactoryReleaseRepoUrl
- credentials {
- username = 'admin'
- password = 'Admin2020yourkj2021'
- }
- }
- }
- }
|