| import androidx.build.LibraryGroups |
| import androidx.build.LibraryVersions |
| import androidx.build.Publish |
| |
| plugins { |
| id("AndroidXPlugin") |
| id("java") |
| } |
| |
| jar { |
| from sourceSets.main.output |
| // Strip out typedef classes. For Android libraries, this is done |
| // automatically by the Gradle plugin, but the Annotation library is a |
| // plain jar, built by the regular Gradle java plugin. The typedefs |
| // themselves have been manually extracted into the |
| // external-annotations directory, and those are packaged separately |
| // below by the annotationsZip task. |
| exclude('androidx/annotation/ProductionVisibility.class') |
| exclude('androidx/annotation/DimensionUnit.class') |
| } |
| |
| task annotationsZip(type: Zip) { |
| archiveClassifier.set("annotations") |
| from("external-annotations") |
| } |
| |
| // add annotations jar task as artifacts |
| artifacts { |
| archives jar |
| archives annotationsZip |
| } |
| |
| androidx { |
| name = "Android Support Library Annotations" |
| publish = Publish.SNAPSHOT_AND_RELEASE |
| mavenVersion = LibraryVersions.ANNOTATION |
| mavenGroup = LibraryGroups.ANNOTATION |
| inceptionYear = "2013" |
| description = "The Support Library is a static library that you can add to your Android application in order to use APIs that are either not available for older platform versions or utility APIs that aren't a part of the framework APIs." |
| } |