Merge "Only generate versioned resource API file when asked to" into androidx-master-dev
diff --git a/activity/activity-ktx/api/res-current.txt b/activity/activity-ktx/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/activity/activity-ktx/api/res-current.txt
diff --git a/activity/activity/api/res-current.txt b/activity/activity/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/activity/activity/api/res-current.txt
diff --git a/ads/ads-identifier-common/api/res-current.txt b/ads/ads-identifier-common/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/ads/ads-identifier-common/api/res-current.txt
diff --git a/ads/ads-identifier-provider/api/res-current.txt b/ads/ads-identifier-provider/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/ads/ads-identifier-provider/api/res-current.txt
diff --git a/ads/ads-identifier/api/res-current.txt b/ads/ads-identifier/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/ads/ads-identifier/api/res-current.txt
diff --git a/annotation/annotation-experimental/api/res-current.txt b/annotation/annotation-experimental/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/annotation/annotation-experimental/api/res-current.txt
diff --git a/appcompat/appcompat-resources/api/res-current.txt b/appcompat/appcompat-resources/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/appcompat/appcompat-resources/api/res-current.txt
diff --git a/appcompat/appcompat/api/res-current.txt b/appcompat/appcompat/api/res-current.txt
new file mode 100644
index 0000000..cb8c1e3
--- /dev/null
+++ b/appcompat/appcompat/api/res-current.txt
@@ -0,0 +1,366 @@
+attr actionBarDivider
+attr actionBarItemBackground
+attr actionBarPopupTheme
+attr actionBarSize
+attr actionBarSplitStyle
+attr actionBarStyle
+attr actionBarTabBarStyle
+attr actionBarTabStyle
+attr actionBarTabTextStyle
+attr actionBarTheme
+attr actionBarWidgetTheme
+attr actionButtonStyle
+attr actionDropDownStyle
+attr actionLayout
+attr actionMenuTextAppearance
+attr actionMenuTextColor
+attr actionModeBackground
+attr actionModeCloseButtonStyle
+attr actionModeCloseDrawable
+attr actionModeCopyDrawable
+attr actionModeCutDrawable
+attr actionModeFindDrawable
+attr actionModePasteDrawable
+attr actionModeSelectAllDrawable
+attr actionModeShareDrawable
+attr actionModeSplitBackground
+attr actionModeStyle
+attr actionModeWebSearchDrawable
+attr actionOverflowButtonStyle
+attr actionOverflowMenuStyle
+attr actionProviderClass
+attr actionViewClass
+attr alertDialogStyle
+attr alertDialogTheme
+attr arrowHeadLength
+attr arrowShaftLength
+attr autoCompleteTextViewStyle
+attr autoSizeMaxTextSize
+attr autoSizeMinTextSize
+attr autoSizePresetSizes
+attr autoSizeStepGranularity
+attr autoSizeTextType
+attr background
+attr backgroundSplit
+attr backgroundStacked
+attr backgroundTint
+attr backgroundTintMode
+attr barLength
+attr borderlessButtonStyle
+attr buttonBarButtonStyle
+attr buttonBarNegativeButtonStyle
+attr buttonBarNeutralButtonStyle
+attr buttonBarPositiveButtonStyle
+attr buttonBarStyle
+attr buttonGravity
+attr buttonStyle
+attr buttonStyleSmall
+attr buttonTint
+attr buttonTintMode
+attr checkboxStyle
+attr checkedTextViewStyle
+attr closeIcon
+attr closeItemLayout
+attr collapseContentDescription
+attr collapseIcon
+attr color
+attr colorAccent
+attr colorBackgroundFloating
+attr colorButtonNormal
+attr colorControlActivated
+attr colorControlHighlight
+attr colorControlNormal
+attr colorError
+attr colorPrimary
+attr colorPrimaryDark
+attr commitIcon
+attr contentInsetEnd
+attr contentInsetEndWithActions
+attr contentInsetLeft
+attr contentInsetRight
+attr contentInsetStart
+attr contentInsetStartWithNavigation
+attr customNavigationLayout
+attr dialogCornerRadius
+attr dialogPreferredPadding
+attr dialogTheme
+attr displayOptions
+attr divider
+attr dividerHorizontal
+attr dividerPadding
+attr dividerVertical
+attr drawableSize
+attr drawerArrowStyle
+attr dropDownListViewStyle
+attr editTextBackground
+attr editTextColor
+attr editTextStyle
+attr elevation
+attr firstBaselineToTopHeight
+attr fontFamily
+attr fontVariationSettings
+attr gapBetweenBars
+attr goIcon
+attr height
+attr hideOnContentScroll
+attr homeAsUpIndicator
+attr homeLayout
+attr icon
+attr iconTint
+attr iconTintMode
+attr iconifiedByDefault
+attr imageButtonStyle
+attr indeterminateProgressStyle
+attr isLightTheme
+attr itemPadding
+attr lastBaselineToBottomHeight
+attr layout
+attr lineHeight
+attr listChoiceBackgroundIndicator
+attr listChoiceIndicatorMultipleAnimated
+attr listChoiceIndicatorSingleAnimated
+attr listDividerAlertDialog
+attr listPopupWindowStyle
+attr listPreferredItemHeight
+attr listPreferredItemHeightLarge
+attr listPreferredItemHeightSmall
+attr listPreferredItemPaddingEnd
+attr listPreferredItemPaddingLeft
+attr listPreferredItemPaddingRight
+attr listPreferredItemPaddingStart
+attr logo
+attr logoDescription
+attr maxButtonHeight
+attr measureWithLargestChild
+attr navigationContentDescription
+attr navigationIcon
+attr navigationMode
+attr overlapAnchor
+attr paddingEnd
+attr paddingStart
+attr panelBackground
+attr popupMenuStyle
+attr popupTheme
+attr popupWindowStyle
+attr preserveIconSpacing
+attr progressBarPadding
+attr progressBarStyle
+attr queryBackground
+attr queryHint
+attr radioButtonStyle
+attr ratingBarStyle
+attr ratingBarStyleIndicator
+attr ratingBarStyleSmall
+attr searchHintIcon
+attr searchIcon
+attr searchViewStyle
+attr seekBarStyle
+attr selectableItemBackground
+attr selectableItemBackgroundBorderless
+attr showAsAction
+attr showDividers
+attr showText
+attr spinBars
+attr spinnerDropDownItemStyle
+attr spinnerStyle
+attr splitTrack
+attr srcCompat
+attr state_above_anchor
+attr submitBackground
+attr subtitle
+attr subtitleTextAppearance
+attr subtitleTextColor
+attr subtitleTextStyle
+attr suggestionRowLayout
+attr switchMinWidth
+attr switchPadding
+attr switchStyle
+attr switchTextAppearance
+attr textAllCaps
+attr textAppearanceLargePopupMenu
+attr textAppearanceListItem
+attr textAppearanceListItemSecondary
+attr textAppearanceListItemSmall
+attr textAppearancePopupMenuHeader
+attr textAppearanceSearchResultSubtitle
+attr textAppearanceSearchResultTitle
+attr textAppearanceSmallPopupMenu
+attr textColorAlertDialogListItem
+attr textLocale
+attr theme
+attr thickness
+attr thumbTextPadding
+attr thumbTint
+attr thumbTintMode
+attr tickMark
+attr tickMarkTint
+attr tickMarkTintMode
+attr tint
+attr tintMode
+attr title
+attr titleMargin
+attr titleMarginBottom
+attr titleMarginEnd
+attr titleMarginStart
+attr titleMarginTop
+attr titleMargins
+attr titleTextAppearance
+attr titleTextColor
+attr titleTextStyle
+attr toolbarNavigationButtonStyle
+attr toolbarStyle
+attr track
+attr trackTint
+attr trackTintMode
+attr voiceIcon
+attr windowActionBar
+attr windowActionBarOverlay
+attr windowActionModeOverlay
+attr windowNoTitle
+layout support_simple_spinner_dropdown_item
+style TextAppearance_AppCompat
+style TextAppearance_AppCompat_Body1
+style TextAppearance_AppCompat_Body2
+style TextAppearance_AppCompat_Button
+style TextAppearance_AppCompat_Caption
+style TextAppearance_AppCompat_Display1
+style TextAppearance_AppCompat_Display2
+style TextAppearance_AppCompat_Display3
+style TextAppearance_AppCompat_Display4
+style TextAppearance_AppCompat_Headline
+style TextAppearance_AppCompat_Inverse
+style TextAppearance_AppCompat_Large
+style TextAppearance_AppCompat_Large_Inverse
+style TextAppearance_AppCompat_Light_SearchResult_Subtitle
+style TextAppearance_AppCompat_Light_SearchResult_Title
+style TextAppearance_AppCompat_Light_Widget_PopupMenu_Large
+style TextAppearance_AppCompat_Light_Widget_PopupMenu_Small
+style TextAppearance_AppCompat_Medium
+style TextAppearance_AppCompat_Medium_Inverse
+style TextAppearance_AppCompat_Menu
+style TextAppearance_AppCompat_SearchResult_Subtitle
+style TextAppearance_AppCompat_SearchResult_Title
+style TextAppearance_AppCompat_Small
+style TextAppearance_AppCompat_Small_Inverse
+style TextAppearance_AppCompat_Subhead
+style TextAppearance_AppCompat_Subhead_Inverse
+style TextAppearance_AppCompat_Title
+style TextAppearance_AppCompat_Title_Inverse
+style TextAppearance_AppCompat_Widget_ActionBar_Menu
+style TextAppearance_AppCompat_Widget_ActionBar_Subtitle
+style TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse
+style TextAppearance_AppCompat_Widget_ActionBar_Title
+style TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse
+style TextAppearance_AppCompat_Widget_ActionMode_Subtitle
+style TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse
+style TextAppearance_AppCompat_Widget_ActionMode_Title
+style TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse
+style TextAppearance_AppCompat_Widget_Button
+style TextAppearance_AppCompat_Widget_Button_Borderless_Colored
+style TextAppearance_AppCompat_Widget_Button_Colored
+style TextAppearance_AppCompat_Widget_Button_Inverse
+style TextAppearance_AppCompat_Widget_DropDownItem
+style TextAppearance_AppCompat_Widget_PopupMenu_Header
+style TextAppearance_AppCompat_Widget_PopupMenu_Large
+style TextAppearance_AppCompat_Widget_PopupMenu_Small
+style TextAppearance_AppCompat_Widget_Switch
+style TextAppearance_AppCompat_Widget_TextView_SpinnerItem
+style ThemeOverlay_AppCompat
+style ThemeOverlay_AppCompat_ActionBar
+style ThemeOverlay_AppCompat_Dark
+style ThemeOverlay_AppCompat_Dark_ActionBar
+style ThemeOverlay_AppCompat_DayNight
+style ThemeOverlay_AppCompat_DayNight_ActionBar
+style ThemeOverlay_AppCompat_Dialog
+style ThemeOverlay_AppCompat_Dialog_Alert
+style ThemeOverlay_AppCompat_Light
+style Theme_AppCompat
+style Theme_AppCompat_DayNight
+style Theme_AppCompat_DayNight_DarkActionBar
+style Theme_AppCompat_DayNight_Dialog
+style Theme_AppCompat_DayNight_DialogWhenLarge
+style Theme_AppCompat_DayNight_Dialog_Alert
+style Theme_AppCompat_DayNight_Dialog_MinWidth
+style Theme_AppCompat_DayNight_NoActionBar
+style Theme_AppCompat_Dialog
+style Theme_AppCompat_DialogWhenLarge
+style Theme_AppCompat_Dialog_Alert
+style Theme_AppCompat_Dialog_MinWidth
+style Theme_AppCompat_Light
+style Theme_AppCompat_Light_DarkActionBar
+style Theme_AppCompat_Light_Dialog
+style Theme_AppCompat_Light_DialogWhenLarge
+style Theme_AppCompat_Light_Dialog_Alert
+style Theme_AppCompat_Light_Dialog_MinWidth
+style Theme_AppCompat_Light_NoActionBar
+style Theme_AppCompat_NoActionBar
+style Widget_AppCompat_ActionBar
+style Widget_AppCompat_ActionBar_Solid
+style Widget_AppCompat_ActionBar_TabBar
+style Widget_AppCompat_ActionBar_TabText
+style Widget_AppCompat_ActionBar_TabView
+style Widget_AppCompat_ActionButton
+style Widget_AppCompat_ActionButton_CloseMode
+style Widget_AppCompat_ActionButton_Overflow
+style Widget_AppCompat_ActionMode
+style Widget_AppCompat_AutoCompleteTextView
+style Widget_AppCompat_Button
+style Widget_AppCompat_ButtonBar
+style Widget_AppCompat_ButtonBar_AlertDialog
+style Widget_AppCompat_Button_Borderless
+style Widget_AppCompat_Button_Borderless_Colored
+style Widget_AppCompat_Button_ButtonBar_AlertDialog
+style Widget_AppCompat_Button_Colored
+style Widget_AppCompat_Button_Small
+style Widget_AppCompat_CompoundButton_CheckBox
+style Widget_AppCompat_CompoundButton_RadioButton
+style Widget_AppCompat_CompoundButton_Switch
+style Widget_AppCompat_DrawerArrowToggle
+style Widget_AppCompat_DropDownItem_Spinner
+style Widget_AppCompat_EditText
+style Widget_AppCompat_ImageButton
+style Widget_AppCompat_Light_ActionBar
+style Widget_AppCompat_Light_ActionBar_Solid
+style Widget_AppCompat_Light_ActionBar_Solid_Inverse
+style Widget_AppCompat_Light_ActionBar_TabBar
+style Widget_AppCompat_Light_ActionBar_TabBar_Inverse
+style Widget_AppCompat_Light_ActionBar_TabText
+style Widget_AppCompat_Light_ActionBar_TabText_Inverse
+style Widget_AppCompat_Light_ActionBar_TabView
+style Widget_AppCompat_Light_ActionBar_TabView_Inverse
+style Widget_AppCompat_Light_ActionButton
+style Widget_AppCompat_Light_ActionButton_CloseMode
+style Widget_AppCompat_Light_ActionButton_Overflow
+style Widget_AppCompat_Light_ActionMode_Inverse
+style Widget_AppCompat_Light_AutoCompleteTextView
+style Widget_AppCompat_Light_DropDownItem_Spinner
+style Widget_AppCompat_Light_ListPopupWindow
+style Widget_AppCompat_Light_ListView_DropDown
+style Widget_AppCompat_Light_PopupMenu
+style Widget_AppCompat_Light_PopupMenu_Overflow
+style Widget_AppCompat_Light_SearchView
+style Widget_AppCompat_Light_Spinner_DropDown_ActionBar
+style Widget_AppCompat_ListPopupWindow
+style Widget_AppCompat_ListView
+style Widget_AppCompat_ListView_DropDown
+style Widget_AppCompat_ListView_Menu
+style Widget_AppCompat_PopupMenu
+style Widget_AppCompat_PopupMenu_Overflow
+style Widget_AppCompat_PopupWindow
+style Widget_AppCompat_ProgressBar
+style Widget_AppCompat_ProgressBar_Horizontal
+style Widget_AppCompat_RatingBar
+style Widget_AppCompat_RatingBar_Indicator
+style Widget_AppCompat_RatingBar_Small
+style Widget_AppCompat_SearchView
+style Widget_AppCompat_SearchView_ActionBar
+style Widget_AppCompat_SeekBar
+style Widget_AppCompat_SeekBar_Discrete
+style Widget_AppCompat_Spinner
+style Widget_AppCompat_Spinner_DropDown
+style Widget_AppCompat_Spinner_DropDown_ActionBar
+style Widget_AppCompat_Spinner_Underlined
+style Widget_AppCompat_TextView
+style Widget_AppCompat_TextView_SpinnerItem
+style Widget_AppCompat_Toolbar
+style Widget_AppCompat_Toolbar_Button_Navigation
diff --git a/appsearch/appsearch/api/res-current.txt b/appsearch/appsearch/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/appsearch/appsearch/api/res-current.txt
diff --git a/arch/core-runtime/api/res-current.txt b/arch/core-runtime/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/arch/core-runtime/api/res-current.txt
diff --git a/arch/core-testing/api/res-current.txt b/arch/core-testing/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/arch/core-testing/api/res-current.txt
diff --git a/asynclayoutinflater/asynclayoutinflater/api/res-current.txt b/asynclayoutinflater/asynclayoutinflater/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asynclayoutinflater/asynclayoutinflater/api/res-current.txt
diff --git a/autofill/autofill/api/res-current.txt b/autofill/autofill/api/res-current.txt
new file mode 100644
index 0000000..57e2aea
--- /dev/null
+++ b/autofill/autofill/api/res-current.txt
@@ -0,0 +1,6 @@
+attr autofillInlineSuggestionChip
+attr autofillInlineSuggestionEndIconStyle
+attr autofillInlineSuggestionStartIconStyle
+attr autofillInlineSuggestionSubtitle
+attr autofillInlineSuggestionTitle
+style Theme_AutofillInlineSuggestion
diff --git a/benchmark/common/api/res-current.txt b/benchmark/common/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/benchmark/common/api/res-current.txt
diff --git a/benchmark/junit4/api/res-current.txt b/benchmark/junit4/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/benchmark/junit4/api/res-current.txt
diff --git a/biometric/biometric/api/res-current.txt b/biometric/biometric/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/biometric/biometric/api/res-current.txt
diff --git a/browser/browser/api/res-current.txt b/browser/browser/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/browser/browser/api/res-current.txt
diff --git a/buildSrc/src/main/kotlin/androidx/build/AndroidXPlugin.kt b/buildSrc/src/main/kotlin/androidx/build/AndroidXPlugin.kt
index b1f1c45..53c143c 100644
--- a/buildSrc/src/main/kotlin/androidx/build/AndroidXPlugin.kt
+++ b/buildSrc/src/main/kotlin/androidx/build/AndroidXPlugin.kt
@@ -28,6 +28,7 @@
import androidx.build.SupportConfig.TARGET_SDK_VERSION
import androidx.build.checkapi.ApiType
import androidx.build.checkapi.getApiFileDirectory
+import androidx.build.checkapi.getCurrentApiLocation
import androidx.build.checkapi.getRequiredCompatibilityApiFileFromDir
import androidx.build.checkapi.getVersionedApiLocation
import androidx.build.checkapi.hasApiFileDirectory
@@ -646,7 +647,7 @@
*/
private fun Project.createCheckResourceApiTask(): TaskProvider<CheckResourceApiTask> {
return tasks.register(CHECK_RESOURCE_API_TASK, CheckResourceApiTask::class.java) { task ->
- task.newApiFile = getGenerateResourceApiFile()
+ task.newApiFile = getGeneratedResourceApiFile()
task.oldApiFile = getVersionedApiLocation().resourceFile
task.cacheEvenIfNoOutputs()
}
@@ -665,16 +666,30 @@
}
private fun Project.createUpdateResourceApiTask(): TaskProvider<UpdateResourceApiTask> {
+ val versionedApiLocation = project.getVersionedApiLocation()
+ val currentApiLocation = project.getCurrentApiLocation()
+
+ val outputApiLocations = if (project.isVersionedApiFileWritingEnabled()) {
+ listOf(
+ versionedApiLocation,
+ currentApiLocation
+ )
+ } else {
+ listOf(
+ currentApiLocation
+ )
+ }
+
return tasks.register(UPDATE_RESOURCE_API_TASK, UpdateResourceApiTask::class.java) { task ->
- task.newApiFile = getGenerateResourceApiFile()
- task.oldApiFile = getRequiredCompatibilityApiFileFromDir(project.getApiFileDirectory(),
- version(), ApiType.RESOURCEAPI)
- task.destApiFile = getVersionedApiLocation().resourceFile
+ task.inputApiFile.set(getGeneratedResourceApiFile())
+ task.referenceResourceApiFile.set(getRequiredCompatibilityApiFileFromDir(
+ getApiFileDirectory(), version(), ApiType.RESOURCEAPI))
+ task.outputApiLocations.set(outputApiLocations)
}
}
-private fun Project.getGenerateResourceApiFile(): File {
- // TODO(alanv): Find a stable API contract to use when referencing this file.
+private fun Project.getGeneratedResourceApiFile(): File {
+ // TODO(alanv): Follow up when b/154626581 gets resolved and AGP provides a stable API contract
return File(buildDir, "intermediates/public_res/release/public.txt")
}
diff --git a/buildSrc/src/main/kotlin/androidx/build/UpdateResourceApiTask.kt b/buildSrc/src/main/kotlin/androidx/build/UpdateResourceApiTask.kt
index 1272d87..36e9f41 100644
--- a/buildSrc/src/main/kotlin/androidx/build/UpdateResourceApiTask.kt
+++ b/buildSrc/src/main/kotlin/androidx/build/UpdateResourceApiTask.kt
@@ -1,10 +1,14 @@
package androidx.build
+import androidx.build.checkapi.ApiLocation
import org.gradle.api.DefaultTask
import org.gradle.api.GradleException
-import org.gradle.api.tasks.InputFiles
+import org.gradle.api.provider.ListProperty
+import org.gradle.api.provider.Property
+import org.gradle.api.tasks.InputFile
+import org.gradle.api.tasks.Internal
import org.gradle.api.tasks.Optional
-import org.gradle.api.tasks.OutputFile
+import org.gradle.api.tasks.OutputFiles
import org.gradle.api.tasks.TaskAction
import java.io.File
import java.util.SortedSet
@@ -12,71 +16,115 @@
/**
* Task for updating the public resource surface
*/
-open class UpdateResourceApiTask : DefaultTask() {
+abstract class UpdateResourceApiTask : DefaultTask() {
+ /** Optional text file from which the previously-released resource signatures will be read. */
+ @get:InputFile
+ @get:Optional
+ abstract val referenceResourceApiFile: Property<File>
- @InputFiles
+ /**
+ * Text file from which resource signatures will be read. A file path must be specified at
+ * configuration time even if the file may not exist at build time.
+ */
+ @get:Internal
+ abstract val inputApiFile: Property<File>
+
+ @InputFile
@Optional
- var oldApiFile: File? = null
+ fun getInputApiFileIfExists(): File? {
+ val file = inputApiFile.get()
+ return if (file.exists()) {
+ file
+ } else {
+ null
+ }
+ }
- @InputFiles
- @Optional
- var newApiFile: File? = null
+ /** Text files to which resource signatures will be written. */
+ @get:Internal
+ abstract val outputApiLocations: ListProperty<ApiLocation>
- @OutputFile
- var destApiFile: File? = null
+ @OutputFiles
+ fun getTaskOutputs(): List<File> {
+ return outputApiLocations.get().flatMap { outputApiLocation ->
+ listOf(
+ outputApiLocation.resourceFile
+ )
+ }
+ }
@TaskAction
- fun UpdateResourceApi() {
- val destApiFile = checkNotNull(destApiFile) { "destApiFile not set" }
- if (oldApiFile == null || !oldApiFile!!.exists()) {
- if (newApiFile != null && newApiFile!!.exists()) {
- newApiFile?.copyTo(destApiFile, true, 8)
- return
- } else {
- destApiFile.createNewFile()
- return
+ fun verifyAndUpdateResourceApi() {
+ val newApiFile = inputApiFile.get()
+ val referenceApiFile = referenceResourceApiFile.orNull
+
+ // Read the current API surface, if any, into memory.
+ val newApiSet = if (newApiFile.exists()) {
+ HashSet(newApiFile.readLines())
+ } else {
+ emptySet<String>()
+ }
+
+ // If a reference API file was specified, verify the current API surface.
+ if (referenceApiFile != null && referenceApiFile.exists()) {
+ // Read the reference API surface into memory.
+ val oldVersion = Version(
+ referenceApiFile.name.removePrefix("res-").removeSuffix(".txt")
+ )
+ val oldApiSet: HashSet<String> = HashSet(referenceApiFile.readLines())
+ checkApiCompatibility(oldVersion, oldApiSet, project.version(), newApiSet)
+ }
+
+ // Sort the resources for the sake of source control diffs.
+ val newApiSortedSet: SortedSet<String> = newApiSet.toSortedSet()
+
+ // Write current API surface to output locations.
+ for (outputApiLocation in outputApiLocations.get()) {
+ val outputApiFile = outputApiLocation.resourceFile
+ outputApiFile.bufferedWriter().use { out ->
+ newApiSortedSet.forEach {
+ out.write(it)
+ out.newLine()
+ }
}
}
- val oldResourceApi: HashSet<String> = HashSet(oldApiFile?.readLines())
- var newResourceApi: HashSet<String> = HashSet()
- if (newApiFile != null && newApiFile!!.exists()) {
- newResourceApi = HashSet(newApiFile?.readLines())
- }
- val removedResourceApi = HashSet<String>()
- val addedResourceApi = HashSet<String>(newResourceApi)
- for (e in oldResourceApi) {
- if (newResourceApi.contains(e)) {
- addedResourceApi.remove(e)
+ }
+
+ private fun checkApiCompatibility(
+ referenceVersion: Version,
+ referenceApiSet: Set<String>,
+ newVersion: Version,
+ newApiSet: Set<String>
+ ) {
+ // Compute the diff.
+ val removedApi = HashSet<String>()
+ val addedApi = HashSet<String>(newApiSet)
+ for (e in referenceApiSet) {
+ if (newApiSet.contains(e)) {
+ addedApi.remove(e)
} else {
- removedResourceApi.add(e)
+ removedApi.add(e)
}
}
- val oldVersion = Version(oldApiFile!!.name.removePrefix("res-").removeSuffix(".txt"))
- if (oldVersion.major == project.version().major && removedResourceApi.isNotEmpty()) {
+
+ // POLICY: Ensure that no resources are removed within the span of a major version.
+ if (referenceVersion.major == newVersion.major && removedApi.isNotEmpty()) {
var errorMessage = "Cannot remove public resources within the same major version, " +
- "the following were removed since version $oldVersion:\n"
- for (e in removedResourceApi) {
+ "the following were removed since version $referenceVersion:\n"
+ for (e in removedApi) {
errorMessage += "$e\n"
}
throw GradleException(errorMessage)
}
- if (oldVersion.major == project.version().major &&
- oldVersion.minor == project.version().minor && addedResourceApi.isNotEmpty() &&
- project.version().isFinalApi()) {
+
+ // POLICY: Ensure that no resources are added to a finalized version.
+ if (newVersion.isFinalApi() && addedApi.isNotEmpty()) {
var errorMessage = "Cannot add public resources when api becomes final, " +
- "the following resources were added since version $oldVersion:\n"
- for (e in addedResourceApi) {
+ "the following resources were added since version $referenceVersion:\n"
+ for (e in addedApi) {
errorMessage += "$e\n"
}
throw GradleException(errorMessage)
}
- newResourceApi.addAll(newResourceApi)
- val sortedNewResourceApi: SortedSet<String> = newResourceApi.toSortedSet()
- destApiFile.bufferedWriter().use { out ->
- sortedNewResourceApi.forEach {
- out.write(it)
- out.newLine()
- }
- }
}
}
diff --git a/camera/camera-camera2/api/res-current.txt b/camera/camera-camera2/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/camera/camera-camera2/api/res-current.txt
diff --git a/camera/camera-core/api/res-current.txt b/camera/camera-core/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/camera/camera-core/api/res-current.txt
diff --git a/camera/camera-lifecycle/api/res-current.txt b/camera/camera-lifecycle/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/camera/camera-lifecycle/api/res-current.txt
diff --git a/cardview/cardview/api/res-current.txt b/cardview/cardview/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/cardview/cardview/api/res-current.txt
diff --git a/contentpager/contentpager/api/res-current.txt b/contentpager/contentpager/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/contentpager/contentpager/api/res-current.txt
diff --git a/coordinatorlayout/coordinatorlayout/api/res-current.txt b/coordinatorlayout/coordinatorlayout/api/res-current.txt
new file mode 100644
index 0000000..6af58e16
--- /dev/null
+++ b/coordinatorlayout/coordinatorlayout/api/res-current.txt
@@ -0,0 +1,9 @@
+attr keylines
+attr layout_anchor
+attr layout_anchorGravity
+attr layout_behavior
+attr layout_dodgeInsetEdges
+attr layout_insetEdge
+attr layout_keyline
+attr statusBarBackground
+style Widget_Support_CoordinatorLayout
diff --git a/core/core-animation-testing/api/res-current.txt b/core/core-animation-testing/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/core/core-animation-testing/api/res-current.txt
diff --git a/core/core-animation/api/res-current.txt b/core/core-animation/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/core/core-animation/api/res-current.txt
diff --git a/core/core-ktx/api/res-current.txt b/core/core-ktx/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/core/core-ktx/api/res-current.txt
diff --git a/core/core-role/api/res-current.txt b/core/core-role/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/core/core-role/api/res-current.txt
diff --git a/core/core/api/res-current.txt b/core/core/api/res-current.txt
new file mode 100644
index 0000000..a609e0a
--- /dev/null
+++ b/core/core/api/res-current.txt
@@ -0,0 +1,17 @@
+attr alpha
+attr font
+attr fontProviderAuthority
+attr fontProviderCerts
+attr fontProviderFetchStrategy
+attr fontProviderFetchTimeout
+attr fontProviderPackage
+attr fontProviderQuery
+attr fontStyle
+attr fontVariationSettings
+attr fontWeight
+attr ttcIndex
+style TextAppearance_Compat_Notification
+style TextAppearance_Compat_Notification_Info
+style TextAppearance_Compat_Notification_Line2
+style TextAppearance_Compat_Notification_Time
+style TextAppearance_Compat_Notification_Title
diff --git a/cursoradapter/cursoradapter/api/res-current.txt b/cursoradapter/cursoradapter/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/cursoradapter/cursoradapter/api/res-current.txt
diff --git a/customview/customview/api/res-current.txt b/customview/customview/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/customview/customview/api/res-current.txt
diff --git a/datastore/datastore-preferences/api/res-current.txt b/datastore/datastore-preferences/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/datastore/datastore-preferences/api/res-current.txt
diff --git a/datastore/datastore-proto/api/res-current.txt b/datastore/datastore-proto/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/datastore/datastore-proto/api/res-current.txt
diff --git a/documentfile/documentfile/api/res-current.txt b/documentfile/documentfile/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/documentfile/documentfile/api/res-current.txt
diff --git a/drawerlayout/drawerlayout/api/res-current.txt b/drawerlayout/drawerlayout/api/res-current.txt
new file mode 100644
index 0000000..3756729
--- /dev/null
+++ b/drawerlayout/drawerlayout/api/res-current.txt
@@ -0,0 +1,2 @@
+attr drawerLayoutStyle
+attr elevation
diff --git a/dynamic-animation/dynamic-animation-ktx/api/res-current.txt b/dynamic-animation/dynamic-animation-ktx/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/dynamic-animation/dynamic-animation-ktx/api/res-current.txt
diff --git a/dynamic-animation/dynamic-animation/api/res-current.txt b/dynamic-animation/dynamic-animation/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/dynamic-animation/dynamic-animation/api/res-current.txt
diff --git a/emoji/appcompat/api/res-current.txt b/emoji/appcompat/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/emoji/appcompat/api/res-current.txt
diff --git a/emoji/bundled/api/res-current.txt b/emoji/bundled/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/emoji/bundled/api/res-current.txt
diff --git a/emoji/core/api/res-current.txt b/emoji/core/api/res-current.txt
new file mode 100644
index 0000000..8bc8423
--- /dev/null
+++ b/emoji/core/api/res-current.txt
@@ -0,0 +1,2 @@
+attr emojiReplaceStrategy
+attr maxEmojiCount
diff --git a/enterprise/feedback/api/res-current.txt b/enterprise/feedback/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/enterprise/feedback/api/res-current.txt
diff --git a/enterprise/feedback/testing/api/res-current.txt b/enterprise/feedback/testing/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/enterprise/feedback/testing/api/res-current.txt
diff --git a/exifinterface/exifinterface/api/res-current.txt b/exifinterface/exifinterface/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/exifinterface/exifinterface/api/res-current.txt
diff --git a/fragment/fragment-ktx/api/res-current.txt b/fragment/fragment-ktx/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/fragment/fragment-ktx/api/res-current.txt
diff --git a/fragment/fragment-testing/api/res-current.txt b/fragment/fragment-testing/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/fragment/fragment-testing/api/res-current.txt
diff --git a/fragment/fragment/api/res-current.txt b/fragment/fragment/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/fragment/fragment/api/res-current.txt
diff --git a/gridlayout/gridlayout/api/res-current.txt b/gridlayout/gridlayout/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/gridlayout/gridlayout/api/res-current.txt
diff --git a/heifwriter/heifwriter/api/res-current.txt b/heifwriter/heifwriter/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/heifwriter/heifwriter/api/res-current.txt
diff --git a/interpolator/interpolator/api/res-current.txt b/interpolator/interpolator/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/interpolator/interpolator/api/res-current.txt
diff --git a/leanback/leanback-preference/api/res-current.txt b/leanback/leanback-preference/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/leanback/leanback-preference/api/res-current.txt
diff --git a/leanback/leanback/api/res-current.txt b/leanback/leanback/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/leanback/leanback/api/res-current.txt
diff --git a/legacy/core-utils/api/res-current.txt b/legacy/core-utils/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/legacy/core-utils/api/res-current.txt
diff --git a/lifecycle/lifecycle-extensions/api/res-current.txt b/lifecycle/lifecycle-extensions/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lifecycle/lifecycle-extensions/api/res-current.txt
diff --git a/lifecycle/lifecycle-livedata-core-ktx/api/res-current.txt b/lifecycle/lifecycle-livedata-core-ktx/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lifecycle/lifecycle-livedata-core-ktx/api/res-current.txt
diff --git a/lifecycle/lifecycle-livedata-core/api/res-current.txt b/lifecycle/lifecycle-livedata-core/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lifecycle/lifecycle-livedata-core/api/res-current.txt
diff --git a/lifecycle/lifecycle-livedata-ktx/api/res-current.txt b/lifecycle/lifecycle-livedata-ktx/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lifecycle/lifecycle-livedata-ktx/api/res-current.txt
diff --git a/lifecycle/lifecycle-livedata/api/res-current.txt b/lifecycle/lifecycle-livedata/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lifecycle/lifecycle-livedata/api/res-current.txt
diff --git a/lifecycle/lifecycle-process/api/res-current.txt b/lifecycle/lifecycle-process/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lifecycle/lifecycle-process/api/res-current.txt
diff --git a/lifecycle/lifecycle-reactivestreams-ktx/api/res-current.txt b/lifecycle/lifecycle-reactivestreams-ktx/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lifecycle/lifecycle-reactivestreams-ktx/api/res-current.txt
diff --git a/lifecycle/lifecycle-reactivestreams/api/res-current.txt b/lifecycle/lifecycle-reactivestreams/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lifecycle/lifecycle-reactivestreams/api/res-current.txt
diff --git a/lifecycle/lifecycle-runtime-ktx/api/res-current.txt b/lifecycle/lifecycle-runtime-ktx/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lifecycle/lifecycle-runtime-ktx/api/res-current.txt
diff --git a/lifecycle/lifecycle-runtime-testing/api/res-current.txt b/lifecycle/lifecycle-runtime-testing/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lifecycle/lifecycle-runtime-testing/api/res-current.txt
diff --git a/lifecycle/lifecycle-runtime/api/res-current.txt b/lifecycle/lifecycle-runtime/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lifecycle/lifecycle-runtime/api/res-current.txt
diff --git a/lifecycle/lifecycle-service/api/res-current.txt b/lifecycle/lifecycle-service/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lifecycle/lifecycle-service/api/res-current.txt
diff --git a/lifecycle/lifecycle-viewmodel-ktx/api/res-current.txt b/lifecycle/lifecycle-viewmodel-ktx/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lifecycle/lifecycle-viewmodel-ktx/api/res-current.txt
diff --git a/lifecycle/lifecycle-viewmodel-savedstate/api/res-current.txt b/lifecycle/lifecycle-viewmodel-savedstate/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lifecycle/lifecycle-viewmodel-savedstate/api/res-current.txt
diff --git a/lifecycle/lifecycle-viewmodel/api/res-current.txt b/lifecycle/lifecycle-viewmodel/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lifecycle/lifecycle-viewmodel/api/res-current.txt
diff --git a/loader/loader-ktx/api/res-current.txt b/loader/loader-ktx/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/loader/loader-ktx/api/res-current.txt
diff --git a/loader/loader/api/res-current.txt b/loader/loader/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/loader/loader/api/res-current.txt
diff --git a/localbroadcastmanager/localbroadcastmanager/api/res-current.txt b/localbroadcastmanager/localbroadcastmanager/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/localbroadcastmanager/localbroadcastmanager/api/res-current.txt
diff --git a/media/media/api/res-current.txt b/media/media/api/res-current.txt
new file mode 100644
index 0000000..7a1e44d
--- /dev/null
+++ b/media/media/api/res-current.txt
@@ -0,0 +1,5 @@
+style TextAppearance_Compat_Notification_Info_Media
+style TextAppearance_Compat_Notification_Line2_Media
+style TextAppearance_Compat_Notification_Media
+style TextAppearance_Compat_Notification_Time_Media
+style TextAppearance_Compat_Notification_Title_Media
diff --git a/media2/common/api/res-current.txt b/media2/common/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/media2/common/api/res-current.txt
diff --git a/media2/media2-exoplayer/api/res-current.txt b/media2/media2-exoplayer/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/media2/media2-exoplayer/api/res-current.txt
diff --git a/media2/player/api/res-current.txt b/media2/player/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/media2/player/api/res-current.txt
diff --git a/media2/session/api/res-current.txt b/media2/session/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/media2/session/api/res-current.txt
diff --git a/media2/widget/api/res-current.txt b/media2/widget/api/res-current.txt
new file mode 100644
index 0000000..9015818
--- /dev/null
+++ b/media2/widget/api/res-current.txt
@@ -0,0 +1,2 @@
+attr enableControlView
+attr viewType
diff --git a/mediarouter/mediarouter/api/res-current.txt b/mediarouter/mediarouter/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/mediarouter/mediarouter/api/res-current.txt
diff --git a/navigation/navigation-common-ktx/api/res-current.txt b/navigation/navigation-common-ktx/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/navigation/navigation-common-ktx/api/res-current.txt
diff --git a/navigation/navigation-common/api/res-current.txt b/navigation/navigation-common/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/navigation/navigation-common/api/res-current.txt
diff --git a/navigation/navigation-dynamic-features-fragment/api/res-current.txt b/navigation/navigation-dynamic-features-fragment/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/navigation/navigation-dynamic-features-fragment/api/res-current.txt
diff --git a/navigation/navigation-dynamic-features-runtime/api/res-current.txt b/navigation/navigation-dynamic-features-runtime/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/navigation/navigation-dynamic-features-runtime/api/res-current.txt
diff --git a/navigation/navigation-fragment-ktx/api/res-current.txt b/navigation/navigation-fragment-ktx/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/navigation/navigation-fragment-ktx/api/res-current.txt
diff --git a/navigation/navigation-fragment/api/res-current.txt b/navigation/navigation-fragment/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/navigation/navigation-fragment/api/res-current.txt
diff --git a/navigation/navigation-runtime-ktx/api/res-current.txt b/navigation/navigation-runtime-ktx/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/navigation/navigation-runtime-ktx/api/res-current.txt
diff --git a/navigation/navigation-runtime/api/res-current.txt b/navigation/navigation-runtime/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/navigation/navigation-runtime/api/res-current.txt
diff --git a/navigation/navigation-testing/api/res-current.txt b/navigation/navigation-testing/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/navigation/navigation-testing/api/res-current.txt
diff --git a/navigation/navigation-ui-ktx/api/res-current.txt b/navigation/navigation-ui-ktx/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/navigation/navigation-ui-ktx/api/res-current.txt
diff --git a/navigation/navigation-ui/api/res-current.txt b/navigation/navigation-ui/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/navigation/navigation-ui/api/res-current.txt
diff --git a/paging/guava/api/res-current.txt b/paging/guava/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/paging/guava/api/res-current.txt
diff --git a/paging/runtime/api/res-current.txt b/paging/runtime/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/paging/runtime/api/res-current.txt
diff --git a/paging/runtime/ktx/api/res-current.txt b/paging/runtime/ktx/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/paging/runtime/ktx/api/res-current.txt
diff --git a/paging/rxjava2/api/res-current.txt b/paging/rxjava2/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/paging/rxjava2/api/res-current.txt
diff --git a/paging/rxjava2/ktx/api/res-current.txt b/paging/rxjava2/ktx/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/paging/rxjava2/ktx/api/res-current.txt
diff --git a/palette/palette-ktx/api/res-current.txt b/palette/palette-ktx/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/palette/palette-ktx/api/res-current.txt
diff --git a/palette/palette/api/res-current.txt b/palette/palette/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/palette/palette/api/res-current.txt
diff --git a/percentlayout/percentlayout/api/res-current.txt b/percentlayout/percentlayout/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/percentlayout/percentlayout/api/res-current.txt
diff --git a/preference/preference-ktx/api/res-current.txt b/preference/preference-ktx/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/preference/preference-ktx/api/res-current.txt
diff --git a/preference/preference/api/res-current.txt b/preference/preference/api/res-current.txt
new file mode 100644
index 0000000..48012d5
--- /dev/null
+++ b/preference/preference/api/res-current.txt
@@ -0,0 +1,70 @@
+attr adjustable
+attr allowDividerAbove
+attr allowDividerAfterLastItem
+attr allowDividerBelow
+attr checkBoxPreferenceStyle
+attr defaultValue
+attr dependency
+attr dialogIcon
+attr dialogLayout
+attr dialogMessage
+attr dialogPreferenceStyle
+attr dialogTitle
+attr disableDependentsState
+attr dropdownPreferenceStyle
+attr editTextPreferenceStyle
+attr enabled
+attr entries
+attr entryValues
+attr fragment
+attr icon
+attr iconSpaceReserved
+attr key
+attr layout
+attr maxHeight
+attr maxWidth
+attr min
+attr negativeButtonText
+attr order
+attr orderingFromXml
+attr persistent
+attr positiveButtonText
+attr preferenceCategoryStyle
+attr preferenceCategoryTitleTextAppearance
+attr preferenceCategoryTitleTextColor
+attr preferenceFragmentCompatStyle
+attr preferenceFragmentListStyle
+attr preferenceFragmentStyle
+attr preferenceInformationStyle
+attr preferenceScreenStyle
+attr preferenceStyle
+attr preferenceTheme
+attr seekBarIncrement
+attr seekBarPreferenceStyle
+attr selectable
+attr selectableItemBackground
+attr shouldDisableView
+attr showSeekBarValue
+attr singleLineTitle
+attr summary
+attr summaryOff
+attr summaryOn
+attr switchPreferenceCompatStyle
+attr switchPreferenceStyle
+attr switchTextOff
+attr switchTextOn
+attr title
+attr widgetLayout
+style Preference
+style PreferenceFragment
+style PreferenceFragmentList
+style PreferenceThemeOverlay
+style Preference_Category
+style Preference_CheckBoxPreference
+style Preference_DialogPreference
+style Preference_DialogPreference_EditTextPreference
+style Preference_DropDown
+style Preference_Information
+style Preference_PreferenceScreen
+style Preference_SeekBarPreference
+style Preference_SwitchPreferenceCompat
diff --git a/print/print/api/res-current.txt b/print/print/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/print/print/api/res-current.txt
diff --git a/recommendation/recommendation/api/res-current.txt b/recommendation/recommendation/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/recommendation/recommendation/api/res-current.txt
diff --git a/recyclerview/recyclerview-selection/api/res-current.txt b/recyclerview/recyclerview-selection/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/recyclerview/recyclerview-selection/api/res-current.txt
diff --git a/recyclerview/recyclerview/api/res-current.txt b/recyclerview/recyclerview/api/res-current.txt
new file mode 100644
index 0000000..475bfc43
--- /dev/null
+++ b/recyclerview/recyclerview/api/res-current.txt
@@ -0,0 +1,9 @@
+attr fastScrollEnabled
+attr fastScrollHorizontalThumbDrawable
+attr fastScrollHorizontalTrackDrawable
+attr fastScrollVerticalThumbDrawable
+attr fastScrollVerticalTrackDrawable
+attr layoutManager
+attr reverseLayout
+attr spanCount
+attr stackFromEnd
diff --git a/remotecallback/remotecallback/api/res-current.txt b/remotecallback/remotecallback/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/remotecallback/remotecallback/api/res-current.txt
diff --git a/room/guava/api/res-current.txt b/room/guava/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/room/guava/api/res-current.txt
diff --git a/room/ktx/api/res-current.txt b/room/ktx/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/room/ktx/api/res-current.txt
diff --git a/room/runtime/api/res-current.txt b/room/runtime/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/room/runtime/api/res-current.txt
diff --git a/room/rxjava2/api/res-current.txt b/room/rxjava2/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/room/rxjava2/api/res-current.txt
diff --git a/room/testing/api/res-current.txt b/room/testing/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/room/testing/api/res-current.txt
diff --git a/savedstate/savedstate/api/res-current.txt b/savedstate/savedstate/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/savedstate/savedstate/api/res-current.txt
diff --git a/security/crypto/api/res-current.txt b/security/crypto/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/security/crypto/api/res-current.txt
diff --git a/security/identity-credential/api/res-current.txt b/security/identity-credential/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/security/identity-credential/api/res-current.txt
diff --git a/security/security-biometric/api/res-current.txt b/security/security-biometric/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/security/security-biometric/api/res-current.txt
diff --git a/serialization/serialization-runtime-parcel/api/res-current.txt b/serialization/serialization-runtime-parcel/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/serialization/serialization-runtime-parcel/api/res-current.txt
diff --git a/serialization/serialization/api/res-current.txt b/serialization/serialization/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/serialization/serialization/api/res-current.txt
diff --git a/sharetarget/sharetarget/api/res-current.txt b/sharetarget/sharetarget/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/sharetarget/sharetarget/api/res-current.txt
diff --git a/slices/builders/api/res-current.txt b/slices/builders/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/slices/builders/api/res-current.txt
diff --git a/slices/builders/ktx/api/res-current.txt b/slices/builders/ktx/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/slices/builders/ktx/api/res-current.txt
diff --git a/slices/core/api/res-current.txt b/slices/core/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/slices/core/api/res-current.txt
diff --git a/slices/remotecallback/api/res-current.txt b/slices/remotecallback/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/slices/remotecallback/api/res-current.txt
diff --git a/slices/view/api/res-current.txt b/slices/view/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/slices/view/api/res-current.txt
diff --git a/slidingpanelayout/slidingpanelayout/api/res-current.txt b/slidingpanelayout/slidingpanelayout/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/slidingpanelayout/slidingpanelayout/api/res-current.txt
diff --git a/sqlite/sqlite-framework/api/res-current.txt b/sqlite/sqlite-framework/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/sqlite/sqlite-framework/api/res-current.txt
diff --git a/sqlite/sqlite-ktx/api/res-current.txt b/sqlite/sqlite-ktx/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/sqlite/sqlite-ktx/api/res-current.txt
diff --git a/sqlite/sqlite/api/res-current.txt b/sqlite/sqlite/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/sqlite/sqlite/api/res-current.txt
diff --git a/startup/startup-runtime/api/res-current.txt b/startup/startup-runtime/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/startup/startup-runtime/api/res-current.txt
diff --git a/swiperefreshlayout/swiperefreshlayout/api/res-current.txt b/swiperefreshlayout/swiperefreshlayout/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/swiperefreshlayout/swiperefreshlayout/api/res-current.txt
diff --git a/textclassifier/textclassifier/api/res-current.txt b/textclassifier/textclassifier/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/textclassifier/textclassifier/api/res-current.txt
diff --git a/tracing/tracing-ktx/api/res-current.txt b/tracing/tracing-ktx/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tracing/tracing-ktx/api/res-current.txt
diff --git a/tracing/tracing/api/res-current.txt b/tracing/tracing/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tracing/tracing/api/res-current.txt
diff --git a/transition/transition-ktx/api/res-current.txt b/transition/transition-ktx/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/transition/transition-ktx/api/res-current.txt
diff --git a/transition/transition/api/res-current.txt b/transition/transition/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/transition/transition/api/res-current.txt
diff --git a/tv-provider/tv-provider/api/res-current.txt b/tv-provider/tv-provider/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tv-provider/tv-provider/api/res-current.txt
diff --git a/vectordrawable/vectordrawable-animated/api/res-current.txt b/vectordrawable/vectordrawable-animated/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/vectordrawable/vectordrawable-animated/api/res-current.txt
diff --git a/vectordrawable/vectordrawable-seekable/api/res-current.txt b/vectordrawable/vectordrawable-seekable/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/vectordrawable/vectordrawable-seekable/api/res-current.txt
diff --git a/vectordrawable/vectordrawable/api/res-current.txt b/vectordrawable/vectordrawable/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/vectordrawable/vectordrawable/api/res-current.txt
diff --git a/versionedparcelable/versionedparcelable/api/res-current.txt b/versionedparcelable/versionedparcelable/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/versionedparcelable/versionedparcelable/api/res-current.txt
diff --git a/viewpager/viewpager/api/res-current.txt b/viewpager/viewpager/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/viewpager/viewpager/api/res-current.txt
diff --git a/viewpager2/viewpager2/api/res-current.txt b/viewpager2/viewpager2/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/viewpager2/viewpager2/api/res-current.txt
diff --git a/wear/wear/api/res-current.txt b/wear/wear/api/res-current.txt
new file mode 100644
index 0000000..44b0b55
--- /dev/null
+++ b/wear/wear/api/res-current.txt
@@ -0,0 +1 @@
+style Widget_Wear_RoundSwitch
diff --git a/webkit/webkit/api/res-current.txt b/webkit/webkit/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/webkit/webkit/api/res-current.txt
diff --git a/window/window-extensions/api/res-current.txt b/window/window-extensions/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/window/window-extensions/api/res-current.txt
diff --git a/window/window-sidecar/api/res-current.txt b/window/window-sidecar/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/window/window-sidecar/api/res-current.txt
diff --git a/window/window/api/res-current.txt b/window/window/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/window/window/api/res-current.txt
diff --git a/work/workmanager-gcm/api/res-current.txt b/work/workmanager-gcm/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/work/workmanager-gcm/api/res-current.txt
diff --git a/work/workmanager-ktx/api/res-current.txt b/work/workmanager-ktx/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/work/workmanager-ktx/api/res-current.txt
diff --git a/work/workmanager-rxjava2/api/res-current.txt b/work/workmanager-rxjava2/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/work/workmanager-rxjava2/api/res-current.txt
diff --git a/work/workmanager-rxjava3/api/res-current.txt b/work/workmanager-rxjava3/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/work/workmanager-rxjava3/api/res-current.txt
diff --git a/work/workmanager-testing/api/res-current.txt b/work/workmanager-testing/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/work/workmanager-testing/api/res-current.txt
diff --git a/work/workmanager/api/res-current.txt b/work/workmanager/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/work/workmanager/api/res-current.txt