8
8
VERSION_FILE = '../src/com/caverock/androidsvg/SVG.java'
9
9
10
10
# Version regex
11
- VERSION_RE = '\sVERSION\s*=\s*"([\d. ]+)"'
11
+ VERSION_RE = '\sVERSION\s*=\s*"([\d\w.- ]+)"'
12
12
13
13
# Source pom file
14
14
ORIG_POM_FILE = 'src-pom.xml'
17
17
POM_VERSION_RE = '{{VERSION}}'
18
18
19
19
# The jar file to be deployed
20
- JAR_FILE = '../bin/androidsvg.jar'
20
+ JAR_FILE = '../bin/androidsvg_1.2.jar'
21
+
22
+ # The aar file to be deployed
23
+ AAR_FILE = '../bin/androidsvg_1.2.aar'
21
24
22
25
# The dummy sources and javadoc jars
23
26
SOURCES_JAR_FILE = 'androidsvg-sources.jar'
@@ -46,12 +49,13 @@ def main():
46
49
47
50
# Write out a new pom file with the version number set to the latest version
48
51
srcPomFile = read (ORIG_POM_FILE )
49
- tempPomFile .write (re .sub (POM_VERSION_RE , libraryVersion , srcPomFile ))
52
+ srcPomFile = re .sub (POM_VERSION_RE , libraryVersion , srcPomFile );
53
+ tempPomFile .write (srcPomFile )
50
54
tempPomFile .close ()
51
55
52
56
53
- # Sign and deploy the artifact
54
- print '\n Signing and deploying artifact...'
57
+ # Sign and deploy the JAR artifact
58
+ print '\n Signing and deploying JAR artifact...'
55
59
basecmd = 'mvn gpg:sign-and-deploy-file'
56
60
basecmd += ' -DpomFile=' + tempPomFile .name
57
61
basecmd += ' -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/'
@@ -65,8 +69,20 @@ def main():
65
69
os .system (cmd )
66
70
67
71
72
+ # Sign and deploy the AAR artifact
73
+ print '\n \n \n Signing and deploying AAR artifact...'
74
+
75
+ cmd = basecmd
76
+ cmd += ' -Dfile=' + os .path .realpath (AAR_FILE )
77
+ cmd += ' -Dtype=aar'
78
+ cmd += ' -Dpackaging=aar'
79
+
80
+ print cmd
81
+ os .system (cmd )
82
+
83
+
68
84
# Sign and deploy the dummy sources
69
- print '\n Signing and deploying sources jar...'
85
+ print '\n \n \ n Signing and deploying sources jar...'
70
86
71
87
cmd = basecmd
72
88
cmd += ' -Dfile=' + os .path .realpath (SOURCES_JAR_FILE )
@@ -77,7 +93,7 @@ def main():
77
93
78
94
79
95
# Sign and deploy the dummy javadoc
80
- print '\n Signing and deploying javadoc jar...'
96
+ print '\n \n \ n Signing and deploying javadoc jar...'
81
97
82
98
cmd = basecmd
83
99
cmd += ' -Dfile=' + os .path .realpath (JAVADOC_JAR_FILE )
0 commit comments