diff options
Diffstat (limited to 'layoutlib_api')
-rw-r--r-- | layoutlib_api/build.gradle | 55 |
1 files changed, 52 insertions, 3 deletions
diff --git a/layoutlib_api/build.gradle b/layoutlib_api/build.gradle index 5534fdb..24e1a65 100644 --- a/layoutlib_api/build.gradle +++ b/layoutlib_api/build.gradle @@ -1,5 +1,3 @@ -apply plugin: 'java' - dependencies { compile project(':common') compile 'kxml2:kxml2:2.3.0' @@ -7,7 +5,15 @@ dependencies { testCompile 'junit:junit:3.8.1' } -group = 'com.android.tools' +def getVersion() { + if (project.has("release")) { + return project.ext.baseVersion + } + + return project.ext.baseVersion + '-SNAPSHOT' +} + +version = getVersion() archivesBaseName = 'layoutlib_api' sourceSets { @@ -28,3 +34,46 @@ sourceSets { } } } + +uploadArchives { + repositories { + mavenDeployer { + beforeDeployment { MavenDeployment deployment -> + if (!project.has("release")) { + throw new StopExecutionException("uploadArchives must be called with the release.gradle init script") + } + + signing.signPom(deployment) + } + + repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { + authentication(userName: sonatypeUsername, password: sonatypePassword) + } + + pom.project { + name 'Android Tools layoutlib_api' + description 'Library to use the rendering library for Android layouts: layoutlib' + url 'http://tools.android.com' + inceptionYear '2007' + + licenses { + license { + name 'The Apache Software License, Version 2.0' + url 'http://www.apache.org/licenses/LICENSE-2.0.txt' + distribution 'repo' + } + } + + scm { + url "https://android.googlesource.com/platform/sdk" + connection "git://android.googlesource.com/platform/sdk.git" + } + developers { + developer { + name 'The Android Open Source Project' + } + } + } + } + } +} |