blob: 92d1f7b779acf833f2ad2c9bfdb41aa157aa09fc [file] [log] [blame] [edit]
apply plugin: 'com.android.tools.java-library'
apply plugin: 'com.android.tools.kotlin'
apply plugin: 'com.android.tools.publish'
apply plugin: 'com.android.tools.metalava'
configurations {
compileOnlyForJavadoc {
extendsFrom(configurations.compileOnly)
}
}
dependencies {
implementation project(':base:builder-test-api')
implementation libs.guava
implementation libs.kotlin_stdlib
api libs.asm
compileOnly libs.com.android.tools.annotations
compileOnly libs.kotlin_gradle_plugin
compileOnly gradleApi()
compileOnly project(':base:builder-model') // Only present for legacy reasons.
metalavaTestImplementation libs.com.android.tools.testutils
metalavaTestImplementation libs.guava
metalavaTestImplementation libs.junit
metalavaTestImplementation libs.kotlin_test
testImplementation libs.junit
testImplementation libs.kotlin_test
testImplementation libs.kotlin_gradle_plugin
testImplementation libs.com.android.tools.testutils
testImplementation gradleApi()
testImplementation project(':base:builder-model')
testImplementation libs.com.android.tools.annotations
testImplementation libs.com.android.tools.common
testImplementation libs.com.android.tools.sdkCommon
testImplementation libs.mockito_core
testImplementation libs.equalsverifier
}
javadoc {
classpath += configurations.compileOnlyForJavadoc
}
task javadocZip(type: Zip) {
dependsOn javadoc
from javadoc.destinationDir
archiveBaseName.set('javadoc')
}
group = 'com.android.tools.build'
version = rootProject.ext.buildVersion
base {
archivesName.set("gradle-api")
}
project.ext.pomName = 'Android Gradle API'
project.ext.pomDesc = 'APIs to customize Android Gradle Builds'
def updateDeprecatedApi = tasks.register('updateDeprecatedApi', JavaExec) {
classpath(sourceSets['test'].output.classesDirs, sourceSets['test'].runtimeClasspath)
mainClass = 'com.android.build.api.DeprecatedApiUpdater'
}
def updateIncubatingApi = tasks.register('updateIncubatingApi', JavaExec) {
classpath(sourceSets['test'].output.classesDirs, sourceSets['test'].runtimeClasspath)
mainClass = 'com.android.build.api.IncubatingApiUpdater'
}
def updateApi = tasks.register('updateApi') {
dependsOn('updateMetalavaApi')
dependsOn(updateDeprecatedApi)
dependsOn(updateIncubatingApi)
}
tasks.jar {
// Set the version of the plugin in the manifest. This is used by the kotlin-android-extensions
// plugin (and maybe other 3rd party plugins).
manifest.attributes("Plugin-Version": version)
}