44
55 publishedGroupId = ' com.g00fy2'
66 libraryName = ' versioncompare'
7- artifact = ' versioncompare'
87
98 libraryDescription = ' Lightweight library to compare version strings.'
109
1110 siteUrl = ' https://github.com/G00fY2/version-compare'
1211 issueUrl = ' https://github.com/G00fY2/version-compare/issues'
1312 gitUrl = ' https://github.com/G00fY2/version-compare.git'
1413
15- libraryVersion = ' 1.3.1 '
14+ libraryVersion = ' 1.3.2 '
1615
1716 developerId = ' g00fy2'
1817 developerName = ' Thomas Wirth'
1918 developerEmail
= ' [email protected] ' 2019
2120 licenseName = ' The Apache Software License, Version 2.0'
22- licenseUrl = ' http ://www.apache.org/licenses/LICENSE-2.0.txt'
21+ licenseUrl = ' https ://www.apache.org/licenses/LICENSE-2.0.txt'
2322 allLicenses = [" Apache-2.0" ]
2423}
2524
2625// Maven
27- apply plugin : ' com.github.dcendents.android-maven'
28-
29- android. libraryVariants. all { variant ->
30- def name = variant. buildType. name. capitalize()
31- def task = project. tasks. create " jar${ name} " , Jar
32- task. dependsOn variant. javaCompiler
33- task. from variant. javaCompiler. destinationDir
34- task. exclude ' **/BuildConfig.class'
35- task. exclude ' **/R.class'
36- task. exclude ' **/R$*.class'
37- artifacts. add(' archives' , task)
38- }
26+ apply plugin : ' maven-publish'
3927
4028task sourcesJar (type : Jar ) {
41- from android. sourceSets. main. java. srcDirs
42- classifier = ' sources'
43- }
44-
45- task javadoc (type : Javadoc ) {
46- source = android. sourceSets. main. java. srcDirs
47- classpath + = project. files(android. getBootClasspath(). join(File . pathSeparator))
29+ archiveClassifier = ' sources'
30+ from sourceSets. main. allJava
4831}
4932
50- task javadocJar (type : Jar , dependsOn : javadoc ) {
51- classifier = ' javadoc'
33+ task javadocJar (type : Jar ) {
34+ archiveClassifier = ' javadoc'
5235 from javadoc. destinationDir
5336}
5437
55- artifacts {
56- archives javadocJar
57- archives sourcesJar
58- }
59-
60- install {
61- repositories. mavenInstaller {
38+ publishing {
39+ publications {
40+ mavenJava(MavenPublication ) {
41+ artifactId = libraryName
42+ groupId = publishedGroupId
43+ version = libraryVersion
6244
63- pom {
64- project {
65- packaging ' aar'
66- groupId publishedGroupId
67- artifactId artifact
45+ from components. java
46+ artifact sourcesJar
47+ artifact javadocJar
6848
69- name libraryName
70- description libraryDescription
71- url siteUrl
49+ pom {
50+ name = libraryName
51+ description = libraryDescription
52+ url = siteUrl
7253
7354 licenses {
7455 license {
75- name licenseName
76- url licenseUrl
56+ name = licenseName
57+ url = licenseUrl
7758 }
7859 }
7960 developers {
8061 developer {
81- id developerId
82- name developerName
83- email developerEmail
62+ id = developerId
63+ name = developerName
64+ email = developerEmail
8465 }
8566 }
8667 scm {
87- connection gitUrl
88- developerConnection gitUrl
89- url siteUrl
68+ connection = gitUrl
69+ developerConnection = gitUrl
70+ url = siteUrl
9071 }
9172 }
9273 }
@@ -113,7 +94,7 @@ bintray {
11394 name = bintrayName
11495 desc = libraryDescription
11596 websiteUrl = siteUrl
116- issueTrackerUrl= issueUrl
97+ issueTrackerUrl = issueUrl
11798 vcsUrl = gitUrl
11899 licenses = allLicenses
119100 publicDownloadNumbers = true
0 commit comments