@@ -25,22 +25,18 @@ artifacts {
2525 archives sourcesJar, javadocJar
2626}
2727
28-
29- final releaseRepositoryUrl = " https://oss.sonatype.org/service/local/staging/deploy/maven2/"
30- final snapshotRepositoryUrl = " https://oss.sonatype.org/content/repositories/snapshots/"
31-
3228publishing {
3329 publications {
3430 mavenJava(MavenPublication ) {
31+ from components. java
3532
36- groupId = GROUP
37- artifactId = POM_ARTIFACT_ID
38- version = getVersionName()
39-
40- artifact(" $buildDir /libs/${ project.name} -${ version} .jar" )
4133 artifact sourcesJar
4234 artifact javadocJar
4335
36+ groupId = GROUP
37+ artifactId = POM_ARTIFACT_ID
38+ version = project. version
39+
4440 pom {
4541 name = POM_NAME
4642 packaging = POM_PACKAGING
@@ -68,27 +64,6 @@ publishing {
6864 connection = POM_SCM_CONNECTION
6965 developerConnection = POM_SCM_DEV_CONNECTION
7066 }
71-
72- pom. withXml {
73- def dependenciesNode = asNode(). appendNode(' dependencies' )
74-
75- project. configurations. implementation. allDependencies. each {
76- def dependencyNode = dependenciesNode. appendNode(' dependency' )
77- dependencyNode. appendNode(' groupId' , it. group)
78- dependencyNode. appendNode(' artifactId' , it. name)
79- dependencyNode. appendNode(' version' , it. version)
80- }
81- }
82- }
83- }
84- }
85- repositories {
86- maven {
87- name = " sonatype"
88- url = version. endsWith(' SNAPSHOT' ) ? snapshotRepositoryUrl : releaseRepositoryUrl
89- credentials {
90- username = System . getenv(" MAVEN_USERNAME" )
91- password = System . getenv(" MAVEN_PASSWORD" )
9267 }
9368 }
9469 }
0 commit comments