Add lifecycle-viewmodel-compose module

Created module for Lifecycle ViewModel Compose.

RelNote: N/A
Test: ./gradlew bOS
Change-Id: Id3994e74a745e066d40e67e480299c66feae4bc2
diff --git a/buildSrc/src/main/kotlin/androidx/build/LibraryVersions.kt b/buildSrc/src/main/kotlin/androidx/build/LibraryVersions.kt
index d28a31a..7601bb1 100644
--- a/buildSrc/src/main/kotlin/androidx/build/LibraryVersions.kt
+++ b/buildSrc/src/main/kotlin/androidx/build/LibraryVersions.kt
@@ -77,6 +77,7 @@
     val LEGACY = Version("1.1.0-alpha01")
     val LOCALBROADCASTMANAGER = Version("1.1.0-alpha02")
     val LIFECYCLE = Version("2.4.0-alpha01")
+    val LIFECYCLE_COMPOSE = Version("1.0.0-alpha01")
     val LIFECYCLE_EXTENSIONS = Version("2.2.0")
     val LOADER = Version("1.2.0-alpha01")
     val MEDIA = Version("1.3.0-beta01")
diff --git a/docs-tip-of-tree/build.gradle b/docs-tip-of-tree/build.gradle
index 9f96bb1..2062f2b 100644
--- a/docs-tip-of-tree/build.gradle
+++ b/docs-tip-of-tree/build.gradle
@@ -140,6 +140,7 @@
     docs(project(":lifecycle:lifecycle-runtime-testing"))
     docs(project(":lifecycle:lifecycle-service"))
     docs(project(":lifecycle:lifecycle-viewmodel"))
+    docs(project(":lifecycle:lifecycle-viewmodel-compose"))
     docs(project(":lifecycle:lifecycle-viewmodel-ktx"))
     docs(project(":lifecycle:lifecycle-viewmodel-savedstate"))
     docs(project(":loader:loader"))
diff --git a/lifecycle/lifecycle-viewmodel-compose/api/current.txt b/lifecycle/lifecycle-viewmodel-compose/api/current.txt
new file mode 100644
index 0000000..e6f50d0
--- /dev/null
+++ b/lifecycle/lifecycle-viewmodel-compose/api/current.txt
@@ -0,0 +1 @@
+// Signature format: 4.0
diff --git a/lifecycle/lifecycle-viewmodel-compose/api/public_plus_experimental_current.txt b/lifecycle/lifecycle-viewmodel-compose/api/public_plus_experimental_current.txt
new file mode 100644
index 0000000..e6f50d0
--- /dev/null
+++ b/lifecycle/lifecycle-viewmodel-compose/api/public_plus_experimental_current.txt
@@ -0,0 +1 @@
+// Signature format: 4.0
diff --git a/lifecycle/lifecycle-viewmodel-compose/api/res-current.txt b/lifecycle/lifecycle-viewmodel-compose/api/res-current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lifecycle/lifecycle-viewmodel-compose/api/res-current.txt
diff --git a/lifecycle/lifecycle-viewmodel-compose/api/restricted_current.txt b/lifecycle/lifecycle-viewmodel-compose/api/restricted_current.txt
new file mode 100644
index 0000000..e6f50d0
--- /dev/null
+++ b/lifecycle/lifecycle-viewmodel-compose/api/restricted_current.txt
@@ -0,0 +1 @@
+// Signature format: 4.0
diff --git a/lifecycle/lifecycle-viewmodel-compose/build.gradle b/lifecycle/lifecycle-viewmodel-compose/build.gradle
new file mode 100644
index 0000000..a23a7ff
--- /dev/null
+++ b/lifecycle/lifecycle-viewmodel-compose/build.gradle
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2020 The Android Open Source Project
+ *
+ * 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.
+ */
+
+import androidx.build.LibraryGroups
+import androidx.build.LibraryVersions
+import androidx.build.Publish
+import androidx.build.RunApiTasks
+import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
+
+import static androidx.build.dependencies.DependenciesKt.*
+
+plugins {
+    id("AndroidXPlugin")
+    id("com.android.library")
+    id("AndroidXUiPlugin")
+    id("org.jetbrains.kotlin.android")
+}
+
+dependencies {
+    kotlinPlugin projectOrArtifact(":compose:compiler:compiler")
+
+    api "androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.0"
+
+    implementation(KOTLIN_STDLIB)
+}
+
+androidx {
+    name = "Lifecycle ViewModel Compose"
+    publish = Publish.SNAPSHOT_AND_RELEASE
+    mavenVersion = LibraryVersions.LIFECYCLE_COMPOSE
+    mavenGroup = LibraryGroups.LIFECYCLE
+    inceptionYear = "2021"
+    description = "Compose integration with Lifecycle ViewModel"
+    runApiTasks = new RunApiTasks.Yes()
+}
diff --git a/lifecycle/lifecycle-viewmodel-compose/integration-tests/lifecycle-viewmodel-demos/build.gradle b/lifecycle/lifecycle-viewmodel-compose/integration-tests/lifecycle-viewmodel-demos/build.gradle
new file mode 100644
index 0000000..8979c3c
--- /dev/null
+++ b/lifecycle/lifecycle-viewmodel-compose/integration-tests/lifecycle-viewmodel-demos/build.gradle
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2020 The Android Open Source Project
+ *
+ * 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.
+ */
+
+
+import androidx.build.Publish
+import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
+
+import static androidx.build.dependencies.DependenciesKt.getKOTLIN_STDLIB
+
+plugins {
+    id("AndroidXPlugin")
+    id("com.android.library")
+    id("AndroidXUiPlugin")
+    id("org.jetbrains.kotlin.android")
+}
+
+dependencies {
+    kotlinPlugin projectOrArtifact(":compose:compiler:compiler")
+    implementation(KOTLIN_STDLIB)
+    implementation projectOrArtifact(":lifecycle:lifecycle-viewmodel-compose")
+    implementation projectOrArtifact(
+            ":lifecycle:lifecycle-viewmodel-compose:lifecycle-viewmodel-compose-samples"
+    )
+}
+
+androidx {
+    name = "Compose Lifecycle ViewModel Demos"
+    publish = Publish.NONE
+    inceptionYear = "2021"
+    description = "This is a project for Lifecycle ViewModel demos."
+}
diff --git a/lifecycle/lifecycle-viewmodel-compose/integration-tests/lifecycle-viewmodel-demos/src/main/AndroidManifest.xml b/lifecycle/lifecycle-viewmodel-compose/integration-tests/lifecycle-viewmodel-demos/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..d9d8620
--- /dev/null
+++ b/lifecycle/lifecycle-viewmodel-compose/integration-tests/lifecycle-viewmodel-demos/src/main/AndroidManifest.xml
@@ -0,0 +1,17 @@
+<!--
+  Copyright 2021 The Android Open Source Project
+
+  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.
+  -->
+
+<manifest package="androidx.lifecycle.viewmodel.compose.demos" />
diff --git a/lifecycle/lifecycle-viewmodel-compose/samples/build.gradle b/lifecycle/lifecycle-viewmodel-compose/samples/build.gradle
new file mode 100644
index 0000000..3f1d512
--- /dev/null
+++ b/lifecycle/lifecycle-viewmodel-compose/samples/build.gradle
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2020 The Android Open Source Project
+ *
+ * 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.
+ */
+
+
+import androidx.build.LibraryGroups
+import androidx.build.LibraryVersions
+import androidx.build.LibraryType
+import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
+
+import static androidx.build.dependencies.DependenciesKt.*
+
+plugins {
+    id("AndroidXPlugin")
+    id("com.android.library")
+    id("AndroidXUiPlugin")
+    id("org.jetbrains.kotlin.android")
+}
+
+dependencies {
+    kotlinPlugin projectOrArtifact(":compose:compiler:compiler")
+    implementation(KOTLIN_STDLIB)
+    implementation projectOrArtifact(":lifecycle:lifecycle-viewmodel-compose")
+}
+
+androidx {
+    name = "AndroidX Lifecycle ViewModel Compose Integration Samples"
+    type = LibraryType.SAMPLES
+    mavenVersion = LibraryVersions.LIFECYCLE
+    mavenGroup = LibraryGroups.LIFECYCLE
+    inceptionYear = "2021"
+    description = "Samples for Compose integration with Lifecycle ViewModel"
+}
diff --git a/lifecycle/lifecycle-viewmodel-compose/samples/src/main/AndroidManifest.xml b/lifecycle/lifecycle-viewmodel-compose/samples/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..26af120
--- /dev/null
+++ b/lifecycle/lifecycle-viewmodel-compose/samples/src/main/AndroidManifest.xml
@@ -0,0 +1,17 @@
+<!--
+  Copyright 2021 The Android Open Source Project
+
+  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.
+  -->
+
+<manifest package="androidx.lifecycle.viewmodel.compose.samples" />
diff --git a/lifecycle/lifecycle-viewmodel-compose/src/androidTest/AndroidManifest.xml b/lifecycle/lifecycle-viewmodel-compose/src/androidTest/AndroidManifest.xml
new file mode 100644
index 0000000..33022bf
--- /dev/null
+++ b/lifecycle/lifecycle-viewmodel-compose/src/androidTest/AndroidManifest.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2021 The Android Open Source Project
+
+  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.
+  -->
+<manifest package="androidx.lifecycle.viewmodel.compose" />
diff --git a/lifecycle/lifecycle-viewmodel-compose/src/main/AndroidManifest.xml b/lifecycle/lifecycle-viewmodel-compose/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..33022bf
--- /dev/null
+++ b/lifecycle/lifecycle-viewmodel-compose/src/main/AndroidManifest.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2021 The Android Open Source Project
+
+  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.
+  -->
+<manifest package="androidx.lifecycle.viewmodel.compose" />
diff --git a/settings.gradle b/settings.gradle
index d5acbe5..09af826 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -370,6 +370,9 @@
 includeProject(":lifecycle:lifecycle-runtime-testing", "lifecycle/lifecycle-runtime-testing", [BuildType.MAIN, BuildType.FLAN])
 includeProject(":lifecycle:lifecycle-service", "lifecycle/lifecycle-service", [BuildType.MAIN, BuildType.FLAN])
 includeProject(":lifecycle:lifecycle-viewmodel", "lifecycle/lifecycle-viewmodel", [BuildType.MAIN, BuildType.FLAN])
+includeProject(":lifecycle:lifecycle-viewmodel-compose", "lifecycle/lifecycle-viewmodel-compose", [BuildType.COMPOSE])
+includeProject(":lifecycle:lifecycle-viewmodel-compose:lifecycle-viewmodel-compose-samples", "lifecycle/lifecycle-viewmodel-compose/samples", [BuildType.COMPOSE])
+includeProject(":lifecycle:lifecycle-viewmodel-compose:integration-tests:lifecycle-viewmodel-demos", "lifecycle/lifecycle-viewmodel-compose/integration-tests/lifecycle-viewmodel-demos", [BuildType.COMPOSE])
 includeProject(":lifecycle:lifecycle-viewmodel-ktx", "lifecycle/lifecycle-viewmodel-ktx", [BuildType.MAIN, BuildType.FLAN])
 includeProject(":lifecycle:lifecycle-viewmodel-savedstate", "lifecycle/lifecycle-viewmodel-savedstate", [BuildType.MAIN, BuildType.FLAN])
 includeProject(":lint-checks", "lint-checks")