A Gradle plugin for Metalava, AOSP's tool for API metadata extraction and compatibility tracking.
This plugin currently supports the following plugins:
com.android.library
java-library
kotlin("multiplatform")
buildscript {
repositories {
maven("https://plugins.gradle.org/m2/")
}
dependencies {
classpath("me.tylerbwong.gradle:metalava-gradle:<current_version>")
}
}
apply(plugin = "me.tylerbwong.gradle.metalava")
or, using the new plugin API
plugins {
id("me.tylerbwong.gradle.metalava") version "<current_version>"
}
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "me.tylerbwong.gradle:metalava-gradle:<current_version>"
}
}
apply plugin: "me.tylerbwong.gradle.metalava"
Also ensure that Google's Maven Repository is added to your project.
This plugin registers the following tasks:
metalavaGenerateSignature
- Generates a Metalava signature descriptor file at a specified location.
metalavaCheckCompatibility
- Checks API compatibility between the code base and the current API.
The plugin can also be configured using the metalava
extension block
plugins {
id("me.tylerbwong.gradle.metalava") version "<current_version>"
}
...
metalava {
documentation = Documentation.PUBLIC
outputKotlinNulls = false
includeSignatureVersion = false
...
}
Check out the samples for more example usages and see MetalavaExtension
for all configurable options.
Copyright 2022 Tyler Wong
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.