Skip to content

Commit 80119ba

Browse files
Merge pull request #717 from square/sedwards/update-kotlin-agp
Update AGP versions, Gradle Versions, and OptIn Notation
2 parents 64e3073 + d59fe8c commit 80119ba

File tree

10 files changed

+15
-17
lines changed

10 files changed

+15
-17
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ subprojects {
5555

5656
// Don't panic, all this does is allow us to use the @OptIn meta-annotation.
5757
// to define our own experiments.
58-
freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
58+
freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
5959
}
6060
}
6161

gradle/libs.versions.toml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
[versions]
22

3-
# Included for convenience to turn on when benchmarking.
4-
#androidTools = "7.3.0-alpha03"
5-
androidTools = "7.0.0"
3+
androidTools = "7.1.3"
64

75
compileSdk = "31"
86
minSdkVersion = "21"
@@ -11,8 +9,6 @@ targetSdk = "30"
119
androidx-activity = "1.3.0"
1210
androidx-appcompat = "1.3.1"
1311
androidx-benchmark = "1.1.0-beta04"
14-
# Included for convenience to turn on when benchmarking.
15-
#androidx-benchmark = "1.1.0-SNAPSHOT"
1612
androidx-compose = "1.1.0-rc01"
1713
androidx-compose-compiler = "1.1.0-rc02"
1814
androidx-constraintlayout = "2.1.2"
@@ -22,8 +18,6 @@ androidx-lifecycle = "2.4.0"
2218
androidx-navigation = "2.4.0-alpha09"
2319
androidx-paging = "3.0.1"
2420
androidx-profileinstaller = "1.2.0-alpha02"
25-
# Included for convenience to turn on when benchmarking.
26-
#androidx-profileinstaller = "1.2.0-SNAPSHOT"
2721
androidx-recyclerview = "1.2.1"
2822
androidx-room = "2.4.0-alpha04"
2923
androidx-savedstate = "1.1.0"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

samples/tutorial/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88

99
deps = [
1010
activityktx: 'androidx.activity:activity-ktx:1.3.0',
11-
agp: "com.android.tools.build:gradle:7.0.0",
11+
agp: "com.android.tools.build:gradle:7.1.3",
1212
appcompat: 'androidx.appcompat:appcompat:1.3.1',
1313
constraintlayout: 'androidx.constraintlayout:constraintlayout:2.0.1',
1414
kotlin: [
@@ -51,7 +51,7 @@ subprojects {
5151

5252
tasks.withType(KotlinCompile).configureEach {
5353
kotlinOptions {
54-
freeCompilerArgs += '-Xopt-in=kotlin.RequiresOptIn'
54+
freeCompilerArgs += '-opt-in=kotlin.RequiresOptIn'
5555
}
5656
}
5757
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

trace-encoder/src/main/java/com/squareup/tracing/TraceEncoder.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import kotlinx.coroutines.CancellationException
44
import kotlinx.coroutines.CoroutineDispatcher
55
import kotlinx.coroutines.CoroutineScope
66
import kotlinx.coroutines.Dispatchers.IO
7+
import kotlinx.coroutines.ObsoleteCoroutinesApi
78
import kotlinx.coroutines.channels.Channel.Factory.UNLIMITED
89
import kotlinx.coroutines.channels.ClosedSendChannelException
910
import kotlinx.coroutines.channels.SendChannel
@@ -27,6 +28,7 @@ import kotlin.time.TimeSource
2728
* @param sinkProvider Returns the [BufferedSink] to use to write trace events to. Called on a
2829
* background thread.
2930
*/
31+
@OptIn(ObsoleteCoroutinesApi::class)
3032
public class TraceEncoder(
3133
scope: CoroutineScope,
3234
private val start: TimeMark = TraceEncoderTimeMark,
@@ -37,7 +39,6 @@ public class TraceEncoder(
3739
private val processIdCounter = AtomicInteger(0)
3840
private val threadIdCounter = AtomicInteger(0)
3941

40-
@Suppress("EXPERIMENTAL_API_USAGE")
4142
private val events: SendChannel<List<ChromeTraceEvent>> =
4243
scope.actor(ioDispatcher, capacity = UNLIMITED) {
4344
sinkProvider().use { sink ->

workflow-testing/src/main/java/com/squareup/workflow1/testing/WorkerTester.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
@file:Suppress("EXPERIMENTAL_API_USAGE")
1+
@file:OptIn(FlowPreview::class, ExperimentalCoroutinesApi::class)
22

33
package com.squareup.workflow1.testing
44

55
import com.squareup.workflow1.Worker
66
import com.squareup.workflow1.testing.WorkflowTestRuntime.Companion.DEFAULT_TIMEOUT_MS
77
import kotlinx.coroutines.Dispatchers.Unconfined
8+
import kotlinx.coroutines.ExperimentalCoroutinesApi
9+
import kotlinx.coroutines.FlowPreview
810
import kotlinx.coroutines.cancelChildren
911
import kotlinx.coroutines.channels.ReceiveChannel
1012
import kotlinx.coroutines.flow.produceIn

workflow-testing/src/main/java/com/squareup/workflow1/testing/WorkflowTestRuntime.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@file:Suppress("EXPERIMENTAL_API_USAGE")
1+
@file:OptIn(ExperimentalCoroutinesApi::class)
22

33
package com.squareup.workflow1.testing
44

@@ -19,6 +19,7 @@ import kotlinx.coroutines.CancellationException
1919
import kotlinx.coroutines.CoroutineExceptionHandler
2020
import kotlinx.coroutines.CoroutineScope
2121
import kotlinx.coroutines.Dispatchers.Unconfined
22+
import kotlinx.coroutines.ExperimentalCoroutinesApi
2223
import kotlinx.coroutines.Job
2324
import kotlinx.coroutines.NonCancellable
2425
import kotlinx.coroutines.cancel

workflow-ui/compose-tooling/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ tasks.withType<KotlinCompile> {
2626
kotlinOptions {
2727
@Suppress("SuspiciousCollectionReassignment")
2828
freeCompilerArgs += listOf(
29-
"-Xopt-in=kotlin.RequiresOptIn"
29+
"-opt-in=kotlin.RequiresOptIn"
3030
)
3131
}
3232
}

workflow-ui/compose/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ tasks.withType<KotlinCompile> {
2626
kotlinOptions {
2727
@Suppress("SuspiciousCollectionReassignment")
2828
freeCompilerArgs += listOf(
29-
"-Xopt-in=kotlin.RequiresOptIn"
29+
"-opt-in=kotlin.RequiresOptIn"
3030
)
3131
}
3232
}

0 commit comments

Comments
 (0)