Merge "Migrates Compose libraries to use LibraryType instead of Publish" into androidx-main
diff --git a/buildSrc/src/main/kotlin/androidx/build/AndroidXUiPlugin.kt b/buildSrc/src/main/kotlin/androidx/build/AndroidXUiPlugin.kt
index 000d567..c68995a 100644
--- a/buildSrc/src/main/kotlin/androidx/build/AndroidXUiPlugin.kt
+++ b/buildSrc/src/main/kotlin/androidx/build/AndroidXUiPlugin.kt
@@ -136,52 +136,56 @@
         private fun Project.configureAndroidCommonOptions(testedExtension: TestedExtension) {
             testedExtension.defaultConfig.minSdkVersion(21)
 
-            testedExtension.lintOptions.apply {
-                // Too many Kotlin features require synthetic accessors - we want to rely on R8 to
-                // remove these accessors
-                disable("SyntheticAccessor")
-                // These lint checks are normally a warning (or lower), but we ignore (in AndroidX)
-                // warnings in Lint, so we make it an error here so it will fail the build.
-                // Note that this causes 'UnknownIssueId' lint warnings in the build log when
-                // Lint tries to apply this rule to modules that do not have this lint check, so
-                // we disable that check too
-                disable("UnknownIssueId")
-                error("ComposableNaming")
-                error("ComposableLambdaParameterNaming")
-                error("ComposableLambdaParameterPosition")
-                error("CompositionLocalNaming")
-                error("ComposableModifierFactory")
-                error("ModifierFactoryReturnType")
-                error("ModifierFactoryExtensionFunction")
-                error("ModifierParameter")
+            afterEvaluate { project ->
+                val isPublished = project.extensions.findByType(AndroidXExtension::class.java)
+                    ?.type == LibraryType.PUBLISHED_LIBRARY
 
-                // Paths we want to enable ListIterator checks for - for higher level levels it
-                // won't have a noticeable performance impact, and we don't want developers
-                // reading high level library code to worry about this.
-                val listIteratorPaths = listOf(
-                    "compose:foundation",
-                    "compose:runtime",
-                    "compose:ui",
-                    "text"
-                )
+                testedExtension.lintOptions.apply {
+                    // Too many Kotlin features require synthetic accessors - we want to rely on R8 to
+                    // remove these accessors
+                    disable("SyntheticAccessor")
+                    // These lint checks are normally a warning (or lower), but we ignore (in AndroidX)
+                    // warnings in Lint, so we make it an error here so it will fail the build.
+                    // Note that this causes 'UnknownIssueId' lint warnings in the build log when
+                    // Lint tries to apply this rule to modules that do not have this lint check, so
+                    // we disable that check too
+                    disable("UnknownIssueId")
+                    error("ComposableNaming")
+                    error("ComposableLambdaParameterNaming")
+                    error("ComposableLambdaParameterPosition")
+                    error("CompositionLocalNaming")
+                    error("ComposableModifierFactory")
+                    error("ModifierFactoryReturnType")
+                    error("ModifierFactoryExtensionFunction")
+                    error("ModifierParameter")
 
-                // Paths we want to disable ListIteratorChecks for - these are not runtime
-                // libraries and so Iterator allocation is not relevant.
-                val ignoreListIteratorFilter = listOf(
-                    "benchmark",
-                    "inspection",
-                    "samples",
-                    "test",
-                    "tooling"
-                )
+                    // Paths we want to enable ListIterator checks for - for higher level levels it
+                    // won't have a noticeable performance impact, and we don't want developers
+                    // reading high level library code to worry about this.
+                    val listIteratorPaths = listOf(
+                        "compose:foundation",
+                        "compose:runtime",
+                        "compose:ui",
+                        "text"
+                    )
 
-                // Disable ListIterator if we are not in a matching path, or we are in a
-                // non-runtime project
-                if (
-                    listIteratorPaths.none { path.contains(it) } ||
-                    ignoreListIteratorFilter.any { path.contains(it) }
-                ) {
-                    disable("ListIterator")
+                    // Paths we want to disable ListIteratorChecks for - these are not runtime
+                    // libraries and so Iterator allocation is not relevant.
+                    val ignoreListIteratorFilter = listOf(
+                        "compose:ui:ui-test",
+                        "compose:ui:ui-tooling",
+                        "compose:ui:ui-inspection",
+                    )
+
+                    // Disable ListIterator if we are not in a matching path, or we are in an
+                    // unpublished project
+                    if (
+                        listIteratorPaths.none { path.contains(it) } ||
+                        ignoreListIteratorFilter.any { path.contains(it) } ||
+                        !isPublished
+                    ) {
+                        disable("ListIterator")
+                    }
                 }
             }
 
diff --git a/compose/animation/animation-core/build.gradle b/compose/animation/animation-core/build.gradle
index cbd4178..ded35c3 100644
--- a/compose/animation/animation-core/build.gradle
+++ b/compose/animation/animation-core/build.gradle
@@ -17,7 +17,7 @@
 
 import androidx.build.AndroidXUiPlugin
 import androidx.build.LibraryGroups
-import androidx.build.Publish
+import androidx.build.LibraryType
 import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
 
 import static androidx.build.dependencies.DependenciesKt.*
@@ -109,7 +109,7 @@
 
 androidx {
     name = "Compose Animation Core"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.ANIMATION
     inceptionYear = "2019"
     description = "Animation engine and animation primitives that are the building blocks of the Compose animation library"
diff --git a/compose/animation/animation/build.gradle b/compose/animation/animation/build.gradle
index ceca2a7..e75682a 100644
--- a/compose/animation/animation/build.gradle
+++ b/compose/animation/animation/build.gradle
@@ -17,7 +17,7 @@
 
 import androidx.build.AndroidXUiPlugin
 import androidx.build.LibraryGroups
-import androidx.build.Publish
+import androidx.build.LibraryType
 
 import static androidx.build.dependencies.DependenciesKt.*
 
@@ -109,7 +109,7 @@
 
 androidx {
     name = "Compose Animation"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.ANIMATION
     inceptionYear = "2019"
     description = "Compose animation library"
diff --git a/compose/benchmark-utils/benchmark/build.gradle b/compose/benchmark-utils/benchmark/build.gradle
index 699caad..ab872da 100644
--- a/compose/benchmark-utils/benchmark/build.gradle
+++ b/compose/benchmark-utils/benchmark/build.gradle
@@ -15,7 +15,6 @@
  */
 
 import static androidx.build.dependencies.DependenciesKt.*
-import androidx.build.Publish
 
 plugins {
     id("AndroidXPlugin")
diff --git a/compose/desktop/desktop/build.gradle b/compose/desktop/desktop/build.gradle
index 14a1c9a..ce53db3 100644
--- a/compose/desktop/desktop/build.gradle
+++ b/compose/desktop/desktop/build.gradle
@@ -15,8 +15,8 @@
  */
 
 import androidx.build.LibraryGroups
+import androidx.build.LibraryType
 import androidx.build.LibraryVersions
-import androidx.build.Publish
 import androidx.build.RunApiTasks
 import androidx.build.SupportConfigKt
 
@@ -74,7 +74,7 @@
 
 androidx {
     name = "Jetpack Compose desktop implementation"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.DESKTOP
     inceptionYear = "2020"
     legacyDisableKotlinStrictApiMode = true
diff --git a/compose/foundation/foundation-layout/build.gradle b/compose/foundation/foundation-layout/build.gradle
index 891e8a2..30c0190a 100644
--- a/compose/foundation/foundation-layout/build.gradle
+++ b/compose/foundation/foundation-layout/build.gradle
@@ -16,7 +16,7 @@
 
 import androidx.build.AndroidXUiPlugin
 import androidx.build.LibraryGroups
-import androidx.build.Publish
+import androidx.build.LibraryType
 
 import static androidx.build.dependencies.DependenciesKt.*
 
@@ -106,7 +106,7 @@
 
 androidx {
     name = "Compose Layouts"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.FOUNDATION
     inceptionYear = "2019"
     description = "Compose layout implementations"
diff --git a/compose/foundation/foundation/build.gradle b/compose/foundation/foundation/build.gradle
index e991a27..80a5550 100644
--- a/compose/foundation/foundation/build.gradle
+++ b/compose/foundation/foundation/build.gradle
@@ -17,7 +17,7 @@
 
 import androidx.build.AndroidXUiPlugin
 import androidx.build.LibraryGroups
-import androidx.build.Publish
+import androidx.build.LibraryType
 import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
 
 import static androidx.build.dependencies.DependenciesKt.*
@@ -167,7 +167,7 @@
 
 androidx {
     name = "Compose Foundation"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.FOUNDATION
     inceptionYear = "2018"
     description = "Higher level abstractions of the Compose UI primitives. This library is design system agnostic, providing the high-level building blocks for both application and design-system developers"
diff --git a/compose/material/material-icons-core/build.gradle b/compose/material/material-icons-core/build.gradle
index ad390e0..4ef400b 100644
--- a/compose/material/material-icons-core/build.gradle
+++ b/compose/material/material-icons-core/build.gradle
@@ -17,10 +17,8 @@
 
 import androidx.build.AndroidXUiPlugin
 import androidx.build.LibraryGroups
-import androidx.build.LibraryVersions
-import androidx.build.Publish
+import androidx.build.LibraryType
 import androidx.compose.material.icons.generator.tasks.IconGenerationTask
-import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
 
 import static androidx.build.dependencies.DependenciesKt.*
 
@@ -75,7 +73,7 @@
 
 androidx {
     name = "Compose Material Icons Core"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.MATERIAL
     inceptionYear = "2020"
     description = "Compose Material Design core icons. This module contains the most commonly used set of Material icons."
diff --git a/compose/material/material-icons-extended/build.gradle b/compose/material/material-icons-extended/build.gradle
index 8808af5..eefd74d 100644
--- a/compose/material/material-icons-extended/build.gradle
+++ b/compose/material/material-icons-extended/build.gradle
@@ -16,7 +16,7 @@
 
 import androidx.build.AndroidXUiPlugin
 import androidx.build.LibraryGroups
-import androidx.build.Publish
+import androidx.build.LibraryType
 import androidx.build.RunApiTasks
 import androidx.compose.material.icons.generator.tasks.IconGenerationTask
 
@@ -115,7 +115,7 @@
 
 androidx {
     name = "Compose Material Icons Extended"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.MATERIAL
     // This module has a large number (5000+) of generated source files and so doc generation /
     // API tracking will simply take too long
diff --git a/compose/material/material-ripple/build.gradle b/compose/material/material-ripple/build.gradle
index e2cede2..4529ad0 100644
--- a/compose/material/material-ripple/build.gradle
+++ b/compose/material/material-ripple/build.gradle
@@ -16,8 +16,7 @@
 
 import androidx.build.AndroidXUiPlugin
 import androidx.build.LibraryGroups
-import androidx.build.Publish
-import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
+import androidx.build.LibraryType
 
 import static androidx.build.dependencies.DependenciesKt.*
 
@@ -86,7 +85,7 @@
 
 androidx {
     name = "Compose Material Ripple"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.MATERIAL
     inceptionYear = "2020"
     description = "Material ripple used to build interactive components"
diff --git a/compose/material/material/build.gradle b/compose/material/material/build.gradle
index d8093ae..f1d47ff 100644
--- a/compose/material/material/build.gradle
+++ b/compose/material/material/build.gradle
@@ -16,8 +16,7 @@
 
 import androidx.build.AndroidXUiPlugin
 import androidx.build.LibraryGroups
-import androidx.build.Publish
-import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
+import androidx.build.LibraryType
 
 import static androidx.build.dependencies.DependenciesKt.*
 
@@ -131,7 +130,7 @@
 
 androidx {
     name = "Compose Material Components"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.MATERIAL
     inceptionYear = "2018"
     description = "Compose Material Design Components library"
diff --git a/compose/runtime/runtime-livedata/build.gradle b/compose/runtime/runtime-livedata/build.gradle
index 3254423..88b093c 100644
--- a/compose/runtime/runtime-livedata/build.gradle
+++ b/compose/runtime/runtime-livedata/build.gradle
@@ -15,7 +15,7 @@
  */
 
 import androidx.build.LibraryGroups
-import androidx.build.Publish
+import androidx.build.LibraryType
 
 import static androidx.build.dependencies.DependenciesKt.*
 
@@ -43,7 +43,7 @@
 
 androidx {
     name = "Compose LiveData integration"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.RUNTIME
     inceptionYear = "2020"
     description = "Compose integration with LiveData"
diff --git a/compose/runtime/runtime-rxjava2/build.gradle b/compose/runtime/runtime-rxjava2/build.gradle
index 335c87f..3ec8592 100644
--- a/compose/runtime/runtime-rxjava2/build.gradle
+++ b/compose/runtime/runtime-rxjava2/build.gradle
@@ -15,7 +15,7 @@
  */
 
 import androidx.build.LibraryGroups
-import androidx.build.Publish
+import androidx.build.LibraryType
 
 import static androidx.build.dependencies.DependenciesKt.*
 
@@ -42,7 +42,7 @@
 
 androidx {
     name = "Compose RxJava 2 integration"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.RUNTIME
     inceptionYear = "2020"
     description = "Compose integration with RxJava 2"
diff --git a/compose/runtime/runtime-rxjava3/build.gradle b/compose/runtime/runtime-rxjava3/build.gradle
index 5c079d6..949a855 100644
--- a/compose/runtime/runtime-rxjava3/build.gradle
+++ b/compose/runtime/runtime-rxjava3/build.gradle
@@ -15,7 +15,7 @@
  */
 
 import androidx.build.LibraryGroups
-import androidx.build.Publish
+import androidx.build.LibraryType
 
 import static androidx.build.dependencies.DependenciesKt.*
 
@@ -42,7 +42,7 @@
 
 androidx {
     name = "Compose RxJava 3 integration"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.RUNTIME
     inceptionYear = "2020"
     description = "Compose integration with RxJava 3"
diff --git a/compose/runtime/runtime-saveable/build.gradle b/compose/runtime/runtime-saveable/build.gradle
index 692c9de..d062d34 100644
--- a/compose/runtime/runtime-saveable/build.gradle
+++ b/compose/runtime/runtime-saveable/build.gradle
@@ -17,7 +17,7 @@
 
 import androidx.build.AndroidXUiPlugin
 import androidx.build.LibraryGroups
-import androidx.build.Publish
+import androidx.build.LibraryType
 
 import static androidx.build.dependencies.DependenciesKt.*
 
@@ -112,7 +112,7 @@
 
 androidx {
     name = "Compose Saveable"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.RUNTIME
     inceptionYear = "2020"
     description = "Compose components that allow saving and restoring the local ui state"
diff --git a/compose/runtime/runtime/build.gradle b/compose/runtime/runtime/build.gradle
index 9d93bb9..1ae86cc 100644
--- a/compose/runtime/runtime/build.gradle
+++ b/compose/runtime/runtime/build.gradle
@@ -16,7 +16,7 @@
 
 import androidx.build.AndroidXUiPlugin
 import androidx.build.LibraryGroups
-import androidx.build.Publish
+import androidx.build.LibraryType
 import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
 
 import static androidx.build.dependencies.DependenciesKt.*
@@ -118,7 +118,7 @@
 
 androidx {
     name = "Compose Runtime"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.RUNTIME
     inceptionYear = "2019"
     description = "Tree composition support for code generated by the Compose compiler plugin and corresponding public API"
diff --git a/compose/ui/ui-android-stubs/build.gradle b/compose/ui/ui-android-stubs/build.gradle
index fee733e..f0fc4ca 100644
--- a/compose/ui/ui-android-stubs/build.gradle
+++ b/compose/ui/ui-android-stubs/build.gradle
@@ -15,10 +15,7 @@
  */
 
 import androidx.build.LibraryGroups
-import androidx.build.LibraryVersions
-import androidx.build.Publish
-
-import static androidx.build.dependencies.DependenciesKt.*
+import androidx.build.LibraryType
 
 plugins {
     id("AndroidXPlugin")
@@ -38,7 +35,7 @@
 
 androidx {
     name = "Compose Android Stubs"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.UI
     inceptionYear = "2020"
     description = "Stubs for classes in older Android APIs"
diff --git a/compose/ui/ui-geometry/build.gradle b/compose/ui/ui-geometry/build.gradle
index 94acbf8..ee955c2 100644
--- a/compose/ui/ui-geometry/build.gradle
+++ b/compose/ui/ui-geometry/build.gradle
@@ -17,7 +17,7 @@
 
 import androidx.build.AndroidXUiPlugin
 import androidx.build.LibraryGroups
-import androidx.build.Publish
+import androidx.build.LibraryType
 import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
 
 import static androidx.build.dependencies.DependenciesKt.*
@@ -81,7 +81,7 @@
 
 androidx {
     name = "Compose Geometry"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.UI
     inceptionYear = "2020"
     description = "Compose classes related to dimensions without units"
diff --git a/compose/ui/ui-graphics/build.gradle b/compose/ui/ui-graphics/build.gradle
index fe48e41..8a2b0b5 100644
--- a/compose/ui/ui-graphics/build.gradle
+++ b/compose/ui/ui-graphics/build.gradle
@@ -16,8 +16,7 @@
 
 import androidx.build.AndroidXUiPlugin
 import androidx.build.LibraryGroups
-import androidx.build.LibraryVersions
-import androidx.build.Publish
+import androidx.build.LibraryType
 import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
 
 import static androidx.build.dependencies.DependenciesKt.*
@@ -120,7 +119,7 @@
 
 androidx {
     name = "Compose Graphics"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.UI
     inceptionYear = "2020"
     description = "Compose graphics"
diff --git a/compose/ui/ui-test-junit4/build.gradle b/compose/ui/ui-test-junit4/build.gradle
index aa26329..1130408 100644
--- a/compose/ui/ui-test-junit4/build.gradle
+++ b/compose/ui/ui-test-junit4/build.gradle
@@ -17,7 +17,7 @@
 
 import androidx.build.AndroidXUiPlugin
 import androidx.build.LibraryGroups
-import androidx.build.Publish
+import androidx.build.LibraryType
 
 import static androidx.build.dependencies.DependenciesKt.*
 
@@ -129,7 +129,7 @@
 
 androidx {
     name = "Compose Testing for JUnit4"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.UI
     inceptionYear = "2020"
     description = "Compose testing integration with JUnit4"
diff --git a/compose/ui/ui-test-manifest/build.gradle b/compose/ui/ui-test-manifest/build.gradle
index 0c92e15..02fdfd7 100644
--- a/compose/ui/ui-test-manifest/build.gradle
+++ b/compose/ui/ui-test-manifest/build.gradle
@@ -14,10 +14,8 @@
  * limitations under the License.
  */
 
-
-import androidx.build.AndroidXUiPlugin
 import androidx.build.LibraryGroups
-import androidx.build.Publish
+import androidx.build.LibraryType
 
 plugins {
     id("AndroidXPlugin")
@@ -31,7 +29,7 @@
 
 androidx {
     name = "Compose Testing manifest dependency"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.UI
     inceptionYear = "2021"
     description = "Compose testing library that should be added as a debugImplementation dependency to add properties to the debug manifest necessary for testing an application"
diff --git a/compose/ui/ui-test/build.gradle b/compose/ui/ui-test/build.gradle
index 4fe73f6..4f251e1 100644
--- a/compose/ui/ui-test/build.gradle
+++ b/compose/ui/ui-test/build.gradle
@@ -17,7 +17,7 @@
 
 import androidx.build.AndroidXUiPlugin
 import androidx.build.LibraryGroups
-import androidx.build.Publish
+import androidx.build.LibraryType
 
 import static androidx.build.dependencies.DependenciesKt.*
 
@@ -118,7 +118,7 @@
 
 androidx {
     name = "Compose Testing"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.UI
     inceptionYear = "2019"
     description = "Compose testing library"
diff --git a/compose/ui/ui-text/build.gradle b/compose/ui/ui-text/build.gradle
index 41b0a4c..07f2cfb 100644
--- a/compose/ui/ui-text/build.gradle
+++ b/compose/ui/ui-text/build.gradle
@@ -17,7 +17,7 @@
 
 import androidx.build.AndroidXUiPlugin
 import androidx.build.LibraryGroups
-import androidx.build.Publish
+import androidx.build.LibraryType
 import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
 
 import static androidx.build.dependencies.DependenciesKt.*
@@ -162,7 +162,7 @@
 
 androidx {
     name = "Compose UI Text"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.UI
     inceptionYear = "2019"
     description = "Compose Text primitives and utilities"
diff --git a/compose/ui/ui-tooling-data/build.gradle b/compose/ui/ui-tooling-data/build.gradle
index 236133a..6b6fc64 100644
--- a/compose/ui/ui-tooling-data/build.gradle
+++ b/compose/ui/ui-tooling-data/build.gradle
@@ -15,7 +15,7 @@
  */
 
 import androidx.build.LibraryGroups
-import androidx.build.Publish
+import androidx.build.LibraryType
 
 import static androidx.build.dependencies.DependenciesKt.*
 
@@ -51,7 +51,7 @@
 
 androidx {
     name = "Compose Tooling Data"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.UI
     inceptionYear = "2021"
     description = "Compose tooling library data. This library provides data about compose" +
diff --git a/compose/ui/ui-tooling/build.gradle b/compose/ui/ui-tooling/build.gradle
index 1fdfb45..ed238dd 100644
--- a/compose/ui/ui-tooling/build.gradle
+++ b/compose/ui/ui-tooling/build.gradle
@@ -15,7 +15,7 @@
  */
 
 import androidx.build.LibraryGroups
-import androidx.build.Publish
+import androidx.build.LibraryType
 
 import static androidx.build.dependencies.DependenciesKt.*
 
@@ -57,7 +57,7 @@
 
 androidx {
     name = "Compose Tooling"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.UI
     inceptionYear = "2019"
     description = "Compose tooling library. This library exposes information to our tools for better IDE support."
diff --git a/compose/ui/ui-unit/build.gradle b/compose/ui/ui-unit/build.gradle
index 58994dd..f5341c6 100644
--- a/compose/ui/ui-unit/build.gradle
+++ b/compose/ui/ui-unit/build.gradle
@@ -17,7 +17,7 @@
 
 import androidx.build.AndroidXUiPlugin
 import androidx.build.LibraryGroups
-import androidx.build.Publish
+import androidx.build.LibraryType
 import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
 
 import static androidx.build.dependencies.DependenciesKt.*
@@ -99,7 +99,7 @@
 
 androidx {
     name = "Compose Unit"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.UI
     inceptionYear = "2020"
     description = "Compose classes for simple units"
diff --git a/compose/ui/ui-util/build.gradle b/compose/ui/ui-util/build.gradle
index c18f5c9..d7f27ba 100644
--- a/compose/ui/ui-util/build.gradle
+++ b/compose/ui/ui-util/build.gradle
@@ -17,7 +17,7 @@
 
 import androidx.build.AndroidXUiPlugin
 import androidx.build.LibraryGroups
-import androidx.build.Publish
+import androidx.build.LibraryType
 import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
 
 import static androidx.build.dependencies.DependenciesKt.*
@@ -82,7 +82,7 @@
 
 androidx {
     name = "Compose Util"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.UI
     inceptionYear = "2020"
     description = "Internal Compose utilities used by other modules"
diff --git a/compose/ui/ui-viewbinding/build.gradle b/compose/ui/ui-viewbinding/build.gradle
index 1351db4..9a0d080 100644
--- a/compose/ui/ui-viewbinding/build.gradle
+++ b/compose/ui/ui-viewbinding/build.gradle
@@ -15,7 +15,7 @@
  */
 
 import androidx.build.LibraryGroups
-import androidx.build.Publish
+import androidx.build.LibraryType
 
 import static androidx.build.dependencies.DependenciesKt.*
 
@@ -41,7 +41,7 @@
 
 androidx {
     name = "Compose ViewBinding"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.UI
     inceptionYear = "2020"
     description = "Compose integration with ViewBinding"
diff --git a/compose/ui/ui/build.gradle b/compose/ui/ui/build.gradle
index a4de7229..52ffcc4 100644
--- a/compose/ui/ui/build.gradle
+++ b/compose/ui/ui/build.gradle
@@ -17,7 +17,7 @@
 
 import androidx.build.AndroidXUiPlugin
 import androidx.build.LibraryGroups
-import androidx.build.Publish
+import androidx.build.LibraryType
 import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
 
 import static androidx.build.dependencies.DependenciesKt.*
@@ -226,7 +226,7 @@
 
 androidx {
     name = "Compose UI primitives"
-    publish = Publish.SNAPSHOT_AND_RELEASE
+    type = LibraryType.PUBLISHED_LIBRARY
     mavenGroup = LibraryGroups.Compose.UI
     inceptionYear = "2019"
     description = "Compose UI primitives. This library contains the primitives that form the Compose UI Toolkit, such as drawing, measurement and layout."