blob: 40bab391c8566ba11feb929fbc40244e44896ada [file] [log] [blame]
group = 'com.android.tools'
archivesBaseName = 'sdklib'
dependencies {
compile project(':layoutlib-api')
compile project(':dvlib')
compile 'org.bouncycastle:bcpkix-jdk15on:1.48'
compile 'org.apache.commons:commons-compress:1.0'
compile 'org.apache.httpcomponents:httpclient:4.1.1'
compile 'org.apache.httpcomponents:httpmime:4.1'
testCompile project(':dvlib').sourceSets.test.output
testCompile 'junit:junit:3.8.1'
}
sourceSets {
main.resources.srcDir 'src/main/java'
test.resources.srcDir 'src/test/java'
}
jar {
from 'NOTICE'
}
task copyXsd(type: Copy) {
from sourceSets.main.resources.srcDirs
include '**/*.xsd'
into file(rootProject.distribution.destinationPath + "/repository")
eachFile { details ->
details.path = details.name
}
}
// delete the destination folder first
copyXsd.doFirst {
File destFolder = file(rootProject.distribution.destinationPath + "/repository")
destFolder.deleteDir()
destFolder.mkdirs()
}
// clean up after the copy task which creates empty folders.
copyXsd.doLast {
File destFolder = file(rootProject.distribution.destinationPath + "/repository/com")
destFolder.deleteDir()
}
buildDistributionJar.dependsOn copyXsd
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: project.ext.sonatypeUsername, password: project.ext.sonatypePassword)
}
pom.project {
name 'Android Tools sdklib'
description 'A library to parse and download the Android SDK.'
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/tools/base"
connection "git://android.googlesource.com/platform/toos/base.git"
}
developers {
developer {
name 'The Android Open Source Project'
}
}
}
}
}
}