From 132975b0d543f5bf0504192150b4a7d3d1f43be2 Mon Sep 17 00:00:00 2001 From: Jeremy Fleischman Date: Thu, 20 Feb 2014 01:48:03 -0800 Subject: [PATCH] Added tnoodle-android release to maven to "./tmt release" script. --- tmt | 4 ++++ tnoodle-android/tmtproject.py | 14 ++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/tmt b/tmt index e8a75ac45..2dcc6295e 100755 --- a/tmt +++ b/tmt @@ -384,6 +384,10 @@ class tmt: # After committing that file, there should not be anything left uncommitted. tmt.exitIfWorkspaceNotClean() + if not tmt.args.dry_run: + tnoodleAndroidProject = tmt.TmtProject.projects['tnoodle-android'] + tnoodleAndroidProject.publishToMavenCentral() + print("Releasing TNoodle") tagMessage = "version %s" % tmt.VERSION diff --git a/tnoodle-android/tmtproject.py b/tnoodle-android/tmtproject.py index 8fe55559a..1bc056903 100644 --- a/tnoodle-android/tmtproject.py +++ b/tnoodle-android/tmtproject.py @@ -9,17 +9,23 @@ def configure(self): def getDependencies(self): return [ tmt.TmtProject.projects['scrambles'] ] + def runGradleTask(self, task): + retVal = os.system(self.gradlew % task) + assert retVal == 0 + def compile(self): # Note that we skip signing here in order to prevent # travis ci issue. - retVal = os.system(self.gradlew % "assemble -x signArchives") - assert retVal == 0 + self.runGradleTask("assemble -x signArchives") def clean(self): - retVal = os.system(self.gradlew % "clean") - assert retVal == 0 + self.runGradleTask("clean") def check(self): pass + def publishToMavenCentral(self): + self.runGradleTask("uploadArchives") + self.runGradleTask("nexusStagingRelease") + Project(tmt.projectName(), description="Android scrambling library")