@@ -32,14 +32,14 @@ apply plugin: "maven-publish"
3232apply plugin : ' signing'
3333apply plugin : ' net.researchgate.release'
3434
35- def deploySiteUrl= " https://github.com/highmobility/auto-api-java"
36- def deployGitUrl= " https://github.com/highmobility/auto-api-java"
37- def deployGroupId= " com.high-mobility"
38- def deployLicenseName= " MIT"
39- def deployLicenseUrl= " https://opensource.org/licenses/MIT"
40- def deployId= name
4135
42- def isAndroid = project. plugins. findPlugin(" com.android.library" )
36+ def deploySiteUrl = " https://github.com/highmobility/auto-api-java"
37+ def deployGitUrl = " https://github.com/highmobility/auto-api-java"
38+ def deployLicenseName = " MIT"
39+ def deployLicenseUrl = " https://opensource.org/licenses/MIT"
40+
41+ def deployGroupId = " com.high-mobility"
42+ def deployId = " hmkit-auto-api"
4343
4444// plugin net.researchgate.release(https://github.com/researchgate/gradle-release)
4545// It updates the version and creates automatic commits
@@ -60,25 +60,13 @@ release {
6060publishing {
6161 publications {
6262 release(MavenPublication ) {
63-
64- // get aar or jar for android/java libs
65- if (isAndroid) {
66- task sourceJar(type : Jar ) {
67- from android. sourceSets. main. java. srcDirs
68- classifier " sources"
69- }
70-
71- artifact(sourceJar)
72- artifact(" $buildDir /outputs/aar/${ deployId} -release.aar" )
73- } else {
74- java {
75- withJavadocJar()
76- withSourcesJar()
77- }
78-
79- from components. java
63+ java {
64+ withJavadocJar()
65+ withSourcesJar()
8066 }
8167
68+ from components. java
69+
8270 groupId = deployGroupId
8371 artifactId = deployId
8472
@@ -110,26 +98,6 @@ publishing {
11098 developerConnection = deployGitUrl
11199 url = deploySiteUrl
112100 }
113-
114- if (isAndroid) {
115- // needed for .aar transitive dependencies
116- withXml {
117- def dependenciesNode = asNode()[' dependencies' ][0 ] ?: asNode(). appendNode(' dependencies' )
118- configurations. implementation. allDependencies. each {
119- if (it. name != ' unspecified' ) {
120- def dependencyNode = dependenciesNode. appendNode(' dependency' )
121- dependencyNode. appendNode(' groupId' , it. group)
122- dependencyNode. appendNode(' artifactId' , it. name)
123-
124- if (it. version == " unspecified" ) {
125- throw new GradleException (" dependency version is unspecified " + " for $deployId submodule $it . name , node $it " )
126- } else {
127- dependencyNode. appendNode(' version' , it. version)
128- }
129- }
130- }
131- }
132- }
133101 }
134102 }
135103 }
0 commit comments