Skip to content

Commit

Permalink
[All] Update to Compose 1.2.0-alpha08 (#782)
Browse files Browse the repository at this point in the history
* [All] Update to Compose 1.2.0-alpha08

* Replace deprecated -Xopt-in with -opt-in
  • Loading branch information
simona-anomis authored Apr 22, 2022
1 parent 2a28961 commit 7768a4f
Show file tree
Hide file tree
Showing 15 changed files with 59 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import androidx.compose.samples.crane.base.CraneUserInput
import androidx.compose.samples.crane.home.PeopleUserInputAnimationState.Invalid
import androidx.compose.samples.crane.home.PeopleUserInputAnimationState.Valid
import androidx.compose.samples.crane.ui.CraneTheme
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.pluralStringResource
import androidx.compose.ui.res.stringResource
Expand Down Expand Up @@ -63,6 +64,7 @@ class PeopleUserInputState {
}
}

@OptIn(ExperimentalComposeUiApi::class)
@Composable
fun PeopleUserInput(
titleSuffix: String = "",
Expand Down
4 changes: 2 additions & 2 deletions Crane/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ buildscript {
}

plugins {
id 'com.diffplug.spotless' version '6.3.0'
id 'com.diffplug.spotless' version '6.4.2'
}

subprojects {
Expand Down Expand Up @@ -62,7 +62,7 @@ subprojects {
jvmTarget = "1.8"

// Use experimental APIs
freeCompilerArgs += '-Xopt-in=kotlin.RequiresOptIn'
freeCompilerArgs += '-opt-in=kotlin.RequiresOptIn'
}
}
// androidx.test and hilt are forcing JUnit, 4.12. This forces them to use 4.13
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.example.crane.buildsrc

object Versions {
const val ktLint = "0.45.1"
const val ktLint = "0.45.2"
}

object Libs {
Expand All @@ -34,7 +34,7 @@ object Libs {
}

object Kotlin {
private const val version = "1.6.10"
private const val version = "1.6.20"
const val stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$version"
const val gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$version"
const val extensions = "org.jetbrains.kotlin:kotlin-android-extensions:$version"
Expand All @@ -55,7 +55,7 @@ object Libs {

object Compose {
const val snapshot = ""
const val version = "1.2.0-alpha07"
const val version = "1.2.0-alpha08"

const val runtime = "androidx.compose.runtime:runtime:$version"
const val runtimeLivedata = "androidx.compose.runtime:runtime-livedata:$version"
Expand Down
6 changes: 3 additions & 3 deletions JetNews/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ dependencies {
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.4.1"
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.4.1"

implementation 'androidx.navigation:navigation-compose:2.4.1'
implementation 'androidx.navigation:navigation-compose:2.4.2'

implementation "androidx.window:window:1.0.0"

Expand All @@ -139,9 +139,9 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
// Treat all Kotlin warnings as errors (disabled by default)
allWarningsAsErrors = project.hasProperty("warningsAsErrors") ? project.warningsAsErrors : false

freeCompilerArgs += '-Xopt-in=kotlin.RequiresOptIn'
freeCompilerArgs += '-opt-in=kotlin.RequiresOptIn'
// Enable experimental coroutines APIs, including Flow
freeCompilerArgs += '-Xopt-in=kotlin.Experimental'
freeCompilerArgs += '-opt-in=kotlin.Experimental'

// Set JVM target to 1.8
jvmTarget = "1.8"
Expand Down
10 changes: 5 additions & 5 deletions JetNews/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
*/

buildscript {
ext.kotlin_version = '1.6.10'
ext.compose_version = '1.2.0-alpha07'
ext.kotlin_version = '1.6.20'
ext.compose_version = '1.2.0-alpha08'
ext.compose_snapshot_version = ''
ext.coroutines_version = '1.6.0'
ext.accompanist_version = '0.24.6-alpha'
ext.accompanist_version = '0.24.7-alpha'

repositories {
google()
Expand All @@ -33,7 +33,7 @@ buildscript {
}

plugins {
id 'com.diffplug.spotless' version '6.3.0'
id 'com.diffplug.spotless' version '6.4.2'
}

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

ktlint("0.45.1")
ktlint("0.45.2")
licenseHeaderFile rootProject.file('spotless/copyright.kt')
}
}
Expand Down
10 changes: 5 additions & 5 deletions Jetcaster/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ buildscript {
}

plugins {
id 'com.diffplug.spotless' version '6.3.0'
id 'com.diffplug.spotless' version '6.4.2'
}

subprojects {
Expand Down Expand Up @@ -64,12 +64,12 @@ subprojects {
// Treat all Kotlin warnings as errors (disabled by default)
allWarningsAsErrors = project.hasProperty("warningsAsErrors") ? project.warningsAsErrors : false

freeCompilerArgs += '-Xopt-in=kotlin.RequiresOptIn'
freeCompilerArgs += '-opt-in=kotlin.RequiresOptIn'

// Enable experimental coroutines APIs, including Flow
freeCompilerArgs += '-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi'
freeCompilerArgs += '-Xopt-in=kotlinx.coroutines.FlowPreview'
freeCompilerArgs += '-Xopt-in=kotlin.Experimental'
freeCompilerArgs += '-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi'
freeCompilerArgs += '-opt-in=kotlinx.coroutines.FlowPreview'
freeCompilerArgs += '-opt-in=kotlin.Experimental'

// Set JVM target to 1.8
jvmTarget = "1.8"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@
package com.example.jetcaster.buildsrc

object Versions {
const val ktlint = "0.45.1"
const val ktlint = "0.45.2"
}

object Libs {
const val androidGradlePlugin = "com.android.tools.build:gradle:7.1.2"
const val jdkDesugar = "com.android.tools:desugar_jdk_libs:1.1.5"

object Accompanist {
const val version = "0.24.6-alpha"
const val version = "0.24.7-alpha"
const val pager = "com.google.accompanist:accompanist-pager:$version"
}

object Kotlin {
private const val version = "1.6.10"
private const val version = "1.6.20"
const val stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$version"
const val gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$version"
const val extensions = "org.jetbrains.kotlin:kotlin-android-extensions:$version"
Expand Down Expand Up @@ -70,7 +70,7 @@ object Libs {

object Compose {
const val snapshot = ""
const val version = "1.2.0-alpha07"
const val version = "1.2.0-alpha08"

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

object Navigation {
const val navigation = "androidx.navigation:navigation-compose:2.4.1"
const val navigation = "androidx.navigation:navigation-compose:2.4.2"
}

object Test {
Expand Down
10 changes: 5 additions & 5 deletions Jetchat/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ buildscript {
}

plugins {
id 'com.diffplug.spotless' version '6.3.0'
id 'com.diffplug.spotless' version '6.4.2'
}

subprojects {
Expand Down Expand Up @@ -64,12 +64,12 @@ subprojects {
// Treat all Kotlin warnings as errors (disabled by default)
allWarningsAsErrors = project.hasProperty("warningsAsErrors") ? project.warningsAsErrors : false

freeCompilerArgs += '-Xopt-in=kotlin.RequiresOptIn'
freeCompilerArgs += '-opt-in=kotlin.RequiresOptIn'

// Enable experimental coroutines APIs, including Flow
freeCompilerArgs += '-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi'
freeCompilerArgs += '-Xopt-in=kotlinx.coroutines.FlowPreview'
freeCompilerArgs += '-Xopt-in=kotlin.Experimental'
freeCompilerArgs += '-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi'
freeCompilerArgs += '-opt-in=kotlinx.coroutines.FlowPreview'
freeCompilerArgs += '-opt-in=kotlin.Experimental'

// Set JVM target to 1.8
jvmTarget = "1.8"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.example.compose.jetchat.buildsrc

object Versions {
const val ktlint = "0.45.1"
const val ktlint = "0.45.2"
}

object Libs {
Expand All @@ -29,7 +29,7 @@ object Libs {
const val material3 = "com.google.android.material:material:1.6.0-alpha03"

object Kotlin {
private const val version = "1.6.10"
private const val version = "1.6.20"
const val stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$version"
const val gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$version"
const val extensions = "org.jetbrains.kotlin:kotlin-android-extensions:$version"
Expand All @@ -52,7 +52,7 @@ object Libs {

object Compose {
const val snapshot = ""
const val version = "1.2.0-alpha07"
const val version = "1.2.0-alpha08"

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

object Navigation {
private const val version = "2.4.1"
private const val version = "2.4.2"
const val fragment = "androidx.navigation:navigation-fragment-ktx:$version"
const val uiKtx = "androidx.navigation:navigation-ui-ktx:$version"
}
Expand Down
8 changes: 4 additions & 4 deletions Jetsnack/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ buildscript {
}

plugins {
id 'com.diffplug.spotless' version '6.3.0'
id 'com.diffplug.spotless' version '6.4.2'
id 'com.android.test' version '7.3.0-alpha07' apply false
id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
id 'org.jetbrains.kotlin.android' version '1.6.20' apply false
}

subprojects {
Expand All @@ -52,9 +52,9 @@ subprojects {
// Treat all Kotlin warnings as errors (disabled by default)
allWarningsAsErrors = project.hasProperty("warningsAsErrors") ? project.warningsAsErrors : false

freeCompilerArgs += '-Xopt-in=kotlin.RequiresOptIn'
freeCompilerArgs += '-opt-in=kotlin.RequiresOptIn'
// Enable experimental coroutines APIs, including Flow
freeCompilerArgs += '-Xopt-in=kotlin.Experimental'
freeCompilerArgs += '-opt-in=kotlin.Experimental'

// Set JVM target to 1.8
jvmTarget = "1.8"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@
package com.example.jetsnack.buildsrc

object Versions {
const val ktlint = "0.45.1"
const val ktlint = "0.45.2"
}

object Libs {
const val androidGradlePlugin = "com.android.tools.build:gradle:7.3.0-alpha07"

object Accompanist {
const val version = "0.24.6-alpha"
const val version = "0.24.7-alpha"
const val systemuicontroller = "com.google.accompanist:accompanist-systemuicontroller:$version"
const val flowlayouts = "com.google.accompanist:accompanist-flowlayout:$version"
}

object Kotlin {
private const val version = "1.6.10"
private const val version = "1.6.20"
const val stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$version"
const val gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$version"
const val extensions = "org.jetbrains.kotlin:kotlin-android-extensions:$version"
Expand All @@ -49,7 +49,7 @@ object Libs {

object Compose {
const val snapshot = ""
const val version = "1.2.0-alpha07"
const val version = "1.2.0-alpha08"

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

object Navigation {
const val navigationCompose = "androidx.navigation:navigation-compose:2.4.1"
const val navigationCompose = "androidx.navigation:navigation-compose:2.4.2"
}

object ConstraintLayout {
Expand Down
10 changes: 5 additions & 5 deletions Jetsurvey/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ buildscript {
}

plugins {
id 'com.diffplug.spotless' version '6.3.0'
id 'com.diffplug.spotless' version '6.4.2'
}

subprojects {
Expand Down Expand Up @@ -62,12 +62,12 @@ subprojects {
// Treat all Kotlin warnings as errors (disabled by default)
allWarningsAsErrors = project.hasProperty("warningsAsErrors") ? project.warningsAsErrors : false

freeCompilerArgs += '-Xopt-in=kotlin.RequiresOptIn'
freeCompilerArgs += '-opt-in=kotlin.RequiresOptIn'

// Enable experimental coroutines APIs, including Flow
freeCompilerArgs += '-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi'
freeCompilerArgs += '-Xopt-in=kotlinx.coroutines.FlowPreview'
freeCompilerArgs += '-Xopt-in=kotlin.Experimental'
freeCompilerArgs += '-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi'
freeCompilerArgs += '-opt-in=kotlinx.coroutines.FlowPreview'
freeCompilerArgs += '-opt-in=kotlin.Experimental'

// Set JVM target to 1.8
jvmTarget = "1.8"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.example.compose.jetsurvey.buildsrc

object Versions {
const val ktlint = "0.45.1"
const val ktlint = "0.45.2"
}

object Libs {
Expand All @@ -27,12 +27,12 @@ object Libs {
const val junit = "junit:junit:4.13"

object Accompanist {
const val version = "0.24.6-alpha"
const val version = "0.24.7-alpha"
const val permissions = "com.google.accompanist:accompanist-permissions:$version"
}

object Kotlin {
private const val version = "1.6.10"
private const val version = "1.6.20"
const val stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$version"
const val gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$version"
const val extensions = "org.jetbrains.kotlin:kotlin-android-extensions:$version"
Expand Down Expand Up @@ -61,7 +61,7 @@ object Libs {

object Compose {
const val snapshot = ""
const val version = "1.2.0-alpha07"
const val version = "1.2.0-alpha08"

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

object Navigation {
private const val version = "2.4.1"
private const val version = "2.4.2"
const val fragment = "androidx.navigation:navigation-fragment-ktx:$version"
const val uiKtx = "androidx.navigation:navigation-ui-ktx:$version"
}
Expand Down
4 changes: 2 additions & 2 deletions Owl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ buildscript {
}

plugins {
id 'com.diffplug.spotless' version '6.3.0'
id 'com.diffplug.spotless' version '6.4.2'
}

subprojects {
Expand All @@ -47,7 +47,7 @@ subprojects {
// Treat all Kotlin warnings as errors (disabled by default)
allWarningsAsErrors = project.hasProperty("warningsAsErrors") ? project.warningsAsErrors : false
// Opt-in to experimental compose APIs
freeCompilerArgs += '-Xopt-in=kotlin.RequiresOptIn'
freeCompilerArgs += '-opt-in=kotlin.RequiresOptIn'

jvmTarget = '1.8'
}
Expand Down
Loading

0 comments on commit 7768a4f

Please sign in to comment.