Skip to content

[All] Update to Compose 1.0.0-beta07 #517

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
May 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ object Libs {
}

object Accompanist {
const val version = "0.9.0"
const val version = "0.10.0"
const val coil = "com.google.accompanist:accompanist-coil:$version"
const val insets = "com.google.accompanist:accompanist-insets:$version"
}
Expand All @@ -50,14 +50,14 @@ object Libs {

object AndroidX {
object Activity {
const val activityCompose = "androidx.activity:activity-compose:1.3.0-alpha07"
const val activityCompose = "androidx.activity:activity-compose:1.3.0-alpha08"
}

const val appcompat = "androidx.appcompat:appcompat:1.3.0-rc01"
const val appcompat = "androidx.appcompat:appcompat:1.3.0"

object Compose {
const val snapshot = ""
const val version = "1.0.0-beta06"
const val version = "1.0.0-beta07"

const val runtime = "androidx.compose.runtime:runtime:$version"
const val runtimeLivedata = "androidx.compose.runtime:runtime-livedata:$version"
Expand All @@ -71,7 +71,7 @@ object Libs {

object Lifecycle {
private const val version = "2.3.1"
const val viewModelCompose = "androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha04"
const val viewModelCompose = "androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha05"
const val viewModelKtx = "androidx.lifecycle:lifecycle-viewmodel-ktx:$version"
}

Expand Down
2 changes: 1 addition & 1 deletion Crane/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
14 changes: 7 additions & 7 deletions JetNews/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,20 @@ dependencies {
implementation "androidx.compose.ui:ui-tooling:$compose_version"
implementation "androidx.compose.runtime:runtime-livedata:$compose_version"

implementation "com.google.accompanist:accompanist-swiperefresh:0.8.1"
implementation "com.google.accompanist:accompanist-insets:0.8.1"
implementation "com.google.accompanist:accompanist-systemuicontroller:0.8.1"
implementation "com.google.accompanist:accompanist-swiperefresh:$accompanist_version"
implementation "com.google.accompanist:accompanist-insets:$accompanist_version"
implementation "com.google.accompanist:accompanist-systemuicontroller:$accompanist_version"

implementation 'androidx.appcompat:appcompat:1.3.0-rc01'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.activity:activity-ktx:1.2.2'
implementation 'androidx.core:core-ktx:1.6.0-alpha02'
implementation "androidx.activity:activity-compose:1.3.0-alpha07"
implementation "androidx.activity:activity-compose:1.3.0-alpha08"

implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.3.1"
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha04"
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha05"

implementation "androidx.navigation:navigation-compose:1.0.0-alpha10"
implementation "androidx.navigation:navigation-compose:2.4.0-alpha01"

androidTestImplementation 'androidx.test:rules:1.3.0'
androidTestImplementation 'androidx.test:runner:1.3.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ import androidx.compose.runtime.SideEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.graphics.Color
import androidx.navigation.compose.KEY_ROUTE
import androidx.navigation.compose.currentBackStackEntryAsState
import androidx.navigation.compose.navigate
import androidx.navigation.compose.rememberNavController
import com.example.jetnews.data.AppContainer
import com.example.jetnews.ui.theme.JetnewsTheme
Expand All @@ -52,8 +50,7 @@ fun JetnewsApp(
val scaffoldState = rememberScaffoldState()

val navBackStackEntry by navController.currentBackStackEntryAsState()
val currentRoute = navBackStackEntry?.arguments?.getString(KEY_ROUTE)
?: MainDestinations.HOME_ROUTE
val currentRoute = navBackStackEntry?.destination?.route ?: MainDestinations.HOME_ROUTE
Scaffold(
scaffoldState = scaffoldState,
drawerContent = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import androidx.compose.runtime.rememberCoroutineScope
import androidx.navigation.NavHostController
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.navigate
import androidx.navigation.compose.rememberNavController
import com.example.jetnews.data.AppContainer
import com.example.jetnews.ui.MainDestinations.ARTICLE_ID_KEY
Expand Down
7 changes: 5 additions & 2 deletions JetNews/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@

buildscript {
ext.kotlin_version = '1.4.32'
ext.compose_version = '1.0.0-beta06'
ext.compose_version = '1.0.0-beta07'
ext.coroutines_version = '1.4.2'
ext.accompanist_version = '0.10.0'

repositories {
google()
mavenCentral()
jcenter()
}

Expand All @@ -37,6 +39,7 @@ plugins {
subprojects {
repositories {
google()
mavenCentral()
jcenter()
}

Expand All @@ -47,7 +50,7 @@ subprojects {
targetExclude("$buildDir/**/*.kt")
targetExclude('bin/**/*.kt')

ktlint("0.40.0")
ktlint("0.41.0")
licenseHeaderFile rootProject.file('spotless/copyright.kt')
}
}
Expand Down
2 changes: 1 addition & 1 deletion JetNews/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
1 change: 1 addition & 0 deletions Jetcaster/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import com.example.jetcaster.buildsrc.Versions
buildscript {
repositories {
google()
mavenCentral()
jcenter()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ object Libs {
const val jdkDesugar = "com.android.tools:desugar_jdk_libs:1.0.9"

object Accompanist {
const val version = "0.9.0"
const val version = "0.10.0"
const val coil = "com.google.accompanist:accompanist-coil:$version"
const val insets = "com.google.accompanist:accompanist-insets:$version"
const val pager = "com.google.accompanist:accompanist-pager:$version"
Expand Down Expand Up @@ -60,19 +60,19 @@ object Libs {
const val appcompat = "androidx.appcompat:appcompat:1.2.0"
const val palette = "androidx.palette:palette:1.0.0"

const val coreKtx = "androidx.core:core-ktx:1.6.0-alpha01"
const val coreKtx = "androidx.core:core-ktx:1.6.0-alpha03"

object Activity {
const val activityCompose = "androidx.activity:activity-compose:1.3.0-alpha07"
const val activityCompose = "androidx.activity:activity-compose:1.3.0-alpha08"
}

object Constraint {
const val constraintLayoutCompose = "androidx.constraintlayout:constraintlayout-compose:1.0.0-alpha05"
const val constraintLayoutCompose = "androidx.constraintlayout:constraintlayout-compose:1.0.0-alpha07"
}

object Compose {
const val snapshot = ""
const val version = "1.0.0-beta06"
const val version = "1.0.0-beta07"

@get:JvmStatic
val snapshotUrl: String
Expand All @@ -91,7 +91,7 @@ object Libs {

object Lifecycle {
private const val version = "2.3.1"
const val viewModelCompose = "androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha04"
const val viewModelCompose = "androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha05"
const val viewmodel = "androidx.lifecycle:lifecycle-viewmodel-ktx:$version"
}

Expand Down
2 changes: 1 addition & 1 deletion Jetcaster/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ import com.example.compose.jetchat.conversation.ConversationUiState
import com.example.compose.jetchat.conversation.LocalBackPressedDispatcher
import com.example.compose.jetchat.data.exampleUiState
import com.example.compose.jetchat.theme.JetchatTheme
import com.google.accompanist.insets.LocalWindowInsets
import com.google.accompanist.insets.WindowInsets
import kotlinx.coroutines.flow.MutableStateFlow
import org.junit.Before
import org.junit.Rule
Expand All @@ -54,15 +52,11 @@ class ConversationTest {

@Before
fun setUp() {
// Provide empty insets. We can modify this value as necessary
val windowInsets = WindowInsets()

// Launch the conversation screen
composeTestRule.setContent {
val onBackPressedDispatcher = composeTestRule.activity.onBackPressedDispatcher
CompositionLocalProvider(
LocalBackPressedDispatcher provides onBackPressedDispatcher,
LocalWindowInsets provides windowInsets
) {
JetchatTheme(isDarkTheme = themeIsDark.collectAsState(false).value) {
ConversationContent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ import com.example.compose.jetchat.conversation.KeyboardShownKey
import com.example.compose.jetchat.conversation.LocalBackPressedDispatcher
import com.example.compose.jetchat.data.exampleUiState
import com.example.compose.jetchat.theme.JetchatTheme
import com.google.accompanist.insets.LocalWindowInsets
import com.google.accompanist.insets.WindowInsets
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
Expand All @@ -58,15 +56,11 @@ class UserInputTest {
@Before
fun setUp() {

// Provide empty insets. We can modify this value as necessary
val windowInsets = WindowInsets()

// Launch the conversation screen
val onBackPressedDispatcher = composeTestRule.activity.onBackPressedDispatcher
composeTestRule.setContent {
CompositionLocalProvider(
LocalBackPressedDispatcher provides onBackPressedDispatcher,
LocalWindowInsets provides windowInsets,
LocalBackPressedDispatcher provides onBackPressedDispatcher
) {
JetchatTheme {
ConversationContent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ private fun SelectorExpanded(
@OptIn(ExperimentalAnimationApi::class)
@Composable
fun FunctionalityNotAvailablePanel() {
AnimatedVisibility(visible = true, initiallyVisible = false, enter = fadeIn()) {
AnimatedVisibility(visible = true, enter = fadeIn()) {
Column(
modifier = Modifier
.height(320.dp)
Expand Down
5 changes: 4 additions & 1 deletion Jetchat/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import com.example.compose.jetchat.buildsrc.Versions
buildscript {
repositories {
google()
mavenCentral()
jcenter()
}

Expand All @@ -43,7 +44,9 @@ subprojects {

if (!Libs.AndroidX.Compose.snapshot.isEmpty()) {
maven { url Urls.composeSnapshotRepo }
maven { url Urls.accompanistSnapshotRepo }
}
if (Libs.Accompanist.version.endsWith('SNAPSHOT')) {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ object Libs {
const val material = "com.google.android.material:material:1.3.0"

object Accompanist {
const val version = "0.9.0"
const val version = "0.10.0"
const val insets = "com.google.accompanist:accompanist-insets:$version"
}

Expand All @@ -48,16 +48,16 @@ object Libs {
}

object AndroidX {
const val appcompat = "androidx.appcompat:appcompat:1.3.0-rc01"
const val coreKtx = "androidx.core:core-ktx:1.6.0-alpha01"
const val appcompat = "androidx.appcompat:appcompat:1.3.0"
const val coreKtx = "androidx.core:core-ktx:1.6.0-alpha03"

object Activity {
const val activityCompose = "androidx.activity:activity-compose:1.3.0-alpha07"
const val activityCompose = "androidx.activity:activity-compose:1.3.0-alpha08"
}

object Compose {
const val snapshot = ""
const val version = "1.0.0-beta06"
const val version = "1.0.0-beta07"

const val foundation = "androidx.compose.foundation:foundation:$version"
const val layout = "androidx.compose.foundation:foundation-layout:$version"
Expand Down Expand Up @@ -96,7 +96,7 @@ object Libs {
const val extensions = "androidx.lifecycle:lifecycle-extensions:$version"
const val livedata = "androidx.lifecycle:lifecycle-livedata-ktx:$version"
const val viewmodel = "androidx.lifecycle:lifecycle-viewmodel-ktx:$version"
const val viewModelCompose = "androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha04"
const val viewModelCompose = "androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha05"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Jetchat/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
1 change: 1 addition & 0 deletions Jetsnack/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import com.example.jetsnack.buildsrc.Versions
buildscript {
repositories {
google()
mavenCentral()
jcenter()
}
dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ object Libs {
const val androidGradlePlugin = "com.android.tools.build:gradle:7.0.0-alpha15"

object Accompanist {
const val version = "0.9.0"
const val version = "0.10.0"
const val coil = "com.google.accompanist:accompanist-coil:$version"
const val insets = "com.google.accompanist:accompanist-insets:$version"
}
Expand All @@ -44,11 +44,11 @@ object Libs {
}

object AndroidX {
const val coreKtx = "androidx.core:core-ktx:1.6.0-alpha01"
const val coreKtx = "androidx.core:core-ktx:1.6.0-alpha03"

object Compose {
const val snapshot = ""
const val version = "1.0.0-beta06"
const val version = "1.0.0-beta07"

const val foundation = "androidx.compose.foundation:foundation:${version}"
const val layout = "androidx.compose.foundation:foundation-layout:${version}"
Expand All @@ -63,17 +63,17 @@ object Libs {
}

object Activity {
const val activityCompose = "androidx.activity:activity-compose:1.3.0-alpha07"
const val activityCompose = "androidx.activity:activity-compose:1.3.0-alpha08"
}

object Lifecycle {
const val viewModelCompose =
"androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha04"
"androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha05"
}

object ConstraintLayout {
const val constraintLayoutCompose =
"androidx.constraintlayout:constraintlayout-compose:1.0.0-alpha05"
"androidx.constraintlayout:constraintlayout-compose:1.0.0-alpha07"
}

object Test {
Expand Down
2 changes: 1 addition & 1 deletion Jetsnack/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
1 change: 1 addition & 0 deletions Jetsurvey/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import com.example.compose.jetsurvey.buildsrc.Versions
buildscript {
repositories {
google()
mavenCentral()
jcenter()
}
dependencies {
Expand Down
Loading