Skip to content

compileSdkVersion 33; androidx.activity/appcompat upgrades; transitives #944

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 1 commit into from
Feb 28, 2023
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
7 changes: 5 additions & 2 deletions benchmarks/dungeon-benchmark/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import com.squareup.workflow1.libsCatalog
import com.squareup.workflow1.version

plugins {
id("com.android.test")
id("org.jetbrains.kotlin.android")
Expand All @@ -7,7 +10,7 @@ plugins {
// dependencies that those include.

android {
compileSdk = 32
compileSdk = libsCatalog.version("compileSdk").toInt()

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
Expand All @@ -21,7 +24,7 @@ android {

defaultConfig {
minSdk = 23
targetSdk = 32
targetSdk = libsCatalog.version("targetSdk").toInt()

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import com.squareup.workflow1.libsCatalog
import com.squareup.workflow1.version

plugins {
id("com.android.test")
id("org.jetbrains.kotlin.android")
Expand All @@ -7,7 +10,7 @@ plugins {
// dependencies that those include.

android {
compileSdk = 32
compileSdk = libsCatalog.version("compileSdk").toInt()

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
Expand All @@ -21,7 +24,7 @@ android {

defaultConfig {
minSdk = 26
targetSdk = 32
targetSdk = libsCatalog.version("targetSdk").toInt()

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import com.squareup.workflow1.libsCatalog
import com.squareup.workflow1.version

plugins {
id("com.android.application")
`kotlin-android`
id("kotlin-parcelize")
}
android {
compileSdk = 32
compileSdk = libsCatalog.version("compileSdk").toInt()

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
Expand All @@ -16,7 +19,7 @@ android {
}

defaultConfig {
targetSdk = 32
targetSdk = libsCatalog.version("targetSdk").toInt()
minSdk = 29
applicationId = "com.squareup.benchmarks.performance.complex.poetry"

Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/java/Versions.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@Suppress("UNUSED") // used in Groovy convention scripts
object Versions {
const val compileSdk = 31
const val targetSdk = 30
const val compileSdk = 33
const val targetSdk = 33
}
8 changes: 5 additions & 3 deletions buildSrc/src/main/java/android-defaults.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import com.android.build.gradle.TestedExtension
import com.squareup.workflow1.libsCatalog
import com.squareup.workflow1.version

configure<TestedExtension> {
compileSdkVersion(31)
compileSdkVersion(libsCatalog.version("compileSdk").toInt())

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

defaultConfig {
minSdk = 21
targetSdk = 30
minSdk = libsCatalog.version("minSdk").toInt()
targetSdk = libsCatalog.version("targetSdk").toInt()
versionCode = 1
versionName = "1.0"
}
Expand Down
7 changes: 7 additions & 0 deletions buildSrc/src/main/java/android-sample-app.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import com.android.build.gradle.TestedExtension
import com.android.build.gradle.internal.dsl.BaseAppModuleExtension
import com.squareup.workflow1.library
import com.squareup.workflow1.libsCatalog

Expand All @@ -11,6 +12,12 @@ configure<TestedExtension> {
buildFeatures.viewBinding = true
}

configure<BaseAppModuleExtension> {
lint {
baseline = file("lint-baseline.xml")
}
}
Comment on lines +15 to +19
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this to baseline android lint warnings at this snapshot.


dependencies {
"implementation"(project(":workflow-core"))
"implementation"(project(":workflow-runtime"))
Expand Down
1 change: 0 additions & 1 deletion buildSrc/src/main/java/android-ui-tests.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ plugins {
configure<TestedExtension> {
defaultConfig {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments["listener"] = "leakcanary.FailTestOnLeakRunListener"
}

testOptions {
Expand Down
48 changes: 26 additions & 22 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,33 @@

androidTools = "7.4.1"

compileSdk = "31"
minSdkVersion = "21"
targetSdk = "30"
compileSdk = "33"
minSdk = "21"
targetSdk = "33"

androidx-activity = "1.3.0"
androidx-appcompat = "1.3.1"
androidx-activity = "1.6.1"
androidx-appcompat = "1.6.1"
androidx-benchmark = "1.1.1"
androidx-cardview = "1.0.0"
androidx-compose = "1.1.0-rc01"
androidx-compose-compiler = "1.3.2"
# see https://developer.android.com/jetpack/compose/bom/bom-mapping
androidx-compose-bom = "2023.01.00"
androidx-constraintlayout = "2.1.4"
androidx-core = "1.6.0"
androidx-fragment = "1.3.6"
androidx-gridlayout = "1.0.0"
androidx-lifecycle = "2.4.0"
androidx-lifecycle = "2.5.1"
androidx-navigation = "2.4.0-alpha09"
androidx-paging = "3.0.1"
androidx-profileinstaller = "1.2.0-alpha02"
androidx-recyclerview = "1.2.1"
androidx-room = "2.4.0-alpha04"
androidx-savedstate = "1.1.0"
androidx-startup = "1.1.0"
androidx-test = "1.3.0"
androidx-test = "1.5.0"
androidx-test-espresso = "3.3.0"
androidx-test-junit-ext = "1.1.3"
androidx-test-runner = "1.5.2"
androidx-test-truth-ext = "1.4.0"
androidx-tracing = "1.1.0"
androidx-transition = "1.4.1"
Expand Down Expand Up @@ -64,14 +66,14 @@ mockito-core = "3.3.3"
mockito-kotlin = "3.2.0"

mockk = "1.11.0"
robolectric = "4.6.1"
robolectric = "4.9.2"

rxjava2-android = "2.1.1"
rxjava2-core = "2.2.21"

squareup-curtains = "1.2.2"
squareup-cycler = "0.1.9"
squareup-leakcanary = "2.8.1"
squareup-leakcanary = "2.10"
squareup-moshi = "1.13.0"
squareup-okhttp = "4.9.1"
squareup-okio = "3.0.0"
Expand Down Expand Up @@ -115,20 +117,22 @@ androidx-cardview = { module = "androidx.cardview:cardview", version.ref = "andr

androidx-compose-compiler = { module = "androidx.compose.compiler:compiler", version.ref = "androidx-compose-compiler" }

androidx-compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "androidx-compose" }
androidx-compose-foundation-layout = { module = "androidx.compose.foundation:foundation-layout", version.ref = "androidx-compose" }
androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "androidx-compose-bom" }

androidx-compose-material = { module = "androidx.compose.material:material", version.ref = "androidx-compose" }
androidx-compose-foundation = { module = "androidx.compose.foundation:foundation"}
androidx-compose-foundation-layout = { module = "androidx.compose.foundation:foundation-layout"}

androidx-compose-runtime = { module = "androidx.compose.runtime:runtime", version.ref = "androidx-compose" }
androidx-compose-runtime-saveable = { module = "androidx.compose.runtime:runtime-saveable", version.ref = "androidx-compose" }
androidx-compose-material = { module = "androidx.compose.material:material"}

androidx-compose-ui = { module = "androidx.compose.ui:ui", version.ref = "androidx-compose" }
androidx-compose-ui-geometry = { module = "androidx.compose.ui:ui-geometry", version.ref = "androidx-compose" }
androidx-compose-ui-graphics = { module = "androidx.compose.ui:ui-graphics", version.ref = "androidx-compose" }
androidx-compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "androidx-compose" }
androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "androidx-compose" }
androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "androidx-compose" }
androidx-compose-runtime = { module = "androidx.compose.runtime:runtime"}
androidx-compose-runtime-saveable = { module = "androidx.compose.runtime:runtime-saveable"}

androidx-compose-ui = { module = "androidx.compose.ui:ui"}
androidx-compose-ui-geometry = { module = "androidx.compose.ui:ui-geometry"}
androidx-compose-ui-graphics = { module = "androidx.compose.ui:ui-graphics"}
androidx-compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4"}
androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling"}
androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview"}

androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "androidx-constraintlayout" }

Expand Down Expand Up @@ -160,7 +164,7 @@ androidx-test-espresso-core = { module = "androidx.test.espresso:espresso-core",
androidx-test-espresso-idlingResource = { module = "androidx.test.espresso:espresso-idling-resource", version.ref = "androidx-test-espresso" }
androidx-test-espresso-intents = { module = "androidx.test.espresso:espresso-intents", version.ref = "androidx-test-espresso" }
androidx-test-junit = { module = "androidx.test.ext:junit", version.ref = "androidx-test-junit-ext" }
androidx-test-runner = { module = "androidx.test:runner", version.ref = "androidx-test" }
androidx-test-runner = { module = "androidx.test:runner", version.ref = "androidx-test-runner" }
androidx-test-truth = { module = "androidx.test.ext:truth", version.ref = "androidx-test-truth-ext" }

androidx-test-uiautomator = "androidx.test.uiautomator:uiautomator:2.2.0"
Expand Down
4 changes: 4 additions & 0 deletions samples/compose-samples/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ android {
}

dependencies {
val composeBom = platform(libs.androidx.compose.bom)

androidTestImplementation(libs.androidx.activity.core)
androidTestImplementation(composeBom)
androidTestImplementation(libs.androidx.compose.ui)
androidTestImplementation(libs.androidx.compose.ui.test.junit4)
androidTestImplementation(libs.androidx.test.core)
Expand All @@ -33,6 +36,7 @@ dependencies {

implementation(libs.androidx.activity.compose)
implementation(libs.androidx.activity.core)
implementation(composeBom)
implementation(libs.androidx.compose.foundation)
implementation(libs.androidx.compose.foundation.layout)
implementation(libs.androidx.compose.material)
Expand Down
33 changes: 33 additions & 0 deletions samples/compose-samples/lint-baseline.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 7.4.1" type="baseline" client="gradle" dependencies="false" name="AGP (7.4.1)" variant="all" version="7.4.1">

<issue
id="DataExtractionRules"
message="The attribute `android:allowBackup` is deprecated from Android 12 and higher and may be removed in future versions. Consider adding the attribute `android:dataExtractionRules` specifying an `@xml` resource which configures cloud backups and device transfers on Android 12 and higher."
errorLine1=" android:allowBackup=&quot;false&quot;"
errorLine2=" ~~~~~">
<location
file="src/main/AndroidManifest.xml"
line="6"
column="28"/>
</issue>

<issue
id="HardcodedText"
message="Hardcoded string &quot;Legacy&quot;, should use `@string` resource"
errorLine1=" android:text=&quot;Legacy&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/layout/legacy_view.xml"
line="12"
column="7"/>
</issue>

<issue
id="RtlEnabled"
message="The project references RTL attributes, but does not explicitly enable or disable RTL support with `android:supportsRtl` in the manifest">
<location
file="src/main/AndroidManifest.xml"/>
</issue>

</issues>
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.performClick
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.squareup.workflow1.ui.WorkflowUiExperimentalApi
import com.squareup.workflow1.ui.internal.test.DetectLeaksAfterTestSuccess
import com.squareup.workflow1.ui.internal.test.IdleAfterTestRule
import com.squareup.workflow1.ui.internal.test.IdlingDispatcherRule
import com.squareup.workflow1.ui.internal.test.compose.settleForNextRendering
import com.squareup.workflow1.ui.internal.test.retry
import kotlinx.coroutines.runBlocking
import leakcanary.DetectLeaksAfterTestSuccess
import org.junit.Rule
import org.junit.Test
import org.junit.rules.RuleChain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.performClick
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.squareup.workflow1.ui.WorkflowUiExperimentalApi
import com.squareup.workflow1.ui.internal.test.DetectLeaksAfterTestSuccess
import com.squareup.workflow1.ui.internal.test.IdleAfterTestRule
import com.squareup.workflow1.ui.internal.test.IdlingDispatcherRule
import leakcanary.DetectLeaksAfterTestSuccess
import org.junit.Rule
import org.junit.Test
import org.junit.rules.RuleChain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.performClick
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.squareup.workflow1.ui.WorkflowUiExperimentalApi
import com.squareup.workflow1.ui.internal.test.DetectLeaksAfterTestSuccess
import com.squareup.workflow1.ui.internal.test.IdleAfterTestRule
import com.squareup.workflow1.ui.internal.test.IdlingDispatcherRule
import leakcanary.DetectLeaksAfterTestSuccess
import org.junit.Rule
import org.junit.Test
import org.junit.rules.RuleChain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import androidx.compose.ui.test.junit4.createAndroidComposeRule
import androidx.compose.ui.test.performClick
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.squareup.workflow1.ui.WorkflowUiExperimentalApi
import com.squareup.workflow1.ui.internal.test.DetectLeaksAfterTestSuccess
import com.squareup.workflow1.ui.internal.test.IdleAfterTestRule
import com.squareup.workflow1.ui.internal.test.IdlingDispatcherRule
import com.squareup.workflow1.ui.internal.test.compose.settleForNextRendering
import com.squareup.workflow1.ui.internal.test.retry
import kotlinx.coroutines.runBlocking
import leakcanary.DetectLeaksAfterTestSuccess
import org.junit.Rule
import org.junit.Test
import org.junit.rules.RuleChain
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.squareup.sample.compose.launcher

import androidx.compose.ui.test.ExperimentalTestApi
import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.hasScrollToIndexAction
import androidx.compose.ui.test.junit4.createAndroidComposeRule
Expand All @@ -12,9 +11,9 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import com.squareup.sample.compose.R
import com.squareup.workflow1.ui.WorkflowUiExperimentalApi
import com.squareup.workflow1.ui.internal.test.DetectLeaksAfterTestSuccess
import com.squareup.workflow1.ui.internal.test.IdleAfterTestRule
import com.squareup.workflow1.ui.internal.test.IdlingDispatcherRule
import leakcanary.DetectLeaksAfterTestSuccess
import org.junit.Rule
import org.junit.Test
import org.junit.rules.RuleChain
Expand All @@ -31,7 +30,6 @@ class SampleLauncherTest {
.around(composeRule)
.around(IdlingDispatcherRule)

@OptIn(ExperimentalTestApi::class)
@Test
fun allSamplesLaunch() {
val appName =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.performClick
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.squareup.workflow1.ui.WorkflowUiExperimentalApi
import com.squareup.workflow1.ui.internal.test.DetectLeaksAfterTestSuccess
import com.squareup.workflow1.ui.internal.test.IdleAfterTestRule
import com.squareup.workflow1.ui.internal.test.IdlingDispatcherRule
import leakcanary.DetectLeaksAfterTestSuccess
import org.junit.Rule
import org.junit.Test
import org.junit.rules.RuleChain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import androidx.compose.ui.test.junit4.createAndroidComposeRule
import androidx.compose.ui.test.onNodeWithText
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.squareup.workflow1.ui.WorkflowUiExperimentalApi
import com.squareup.workflow1.ui.internal.test.DetectLeaksAfterTestSuccess
import com.squareup.workflow1.ui.internal.test.IdleAfterTestRule
import com.squareup.workflow1.ui.internal.test.IdlingDispatcherRule
import leakcanary.DetectLeaksAfterTestSuccess
import org.junit.Rule
import org.junit.Test
import org.junit.rules.RuleChain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import androidx.compose.ui.test.performTextInput
import androidx.compose.ui.test.performTextReplacement
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.squareup.workflow1.ui.WorkflowUiExperimentalApi
import com.squareup.workflow1.ui.internal.test.DetectLeaksAfterTestSuccess
import com.squareup.workflow1.ui.internal.test.IdleAfterTestRule
import com.squareup.workflow1.ui.internal.test.IdlingDispatcherRule
import com.squareup.workflow1.ui.internal.test.compose.settleForNextRendering
import com.squareup.workflow1.ui.internal.test.retry
import kotlinx.coroutines.runBlocking
import leakcanary.DetectLeaksAfterTestSuccess
import org.junit.Rule
import org.junit.Test
import org.junit.rules.RuleChain
Expand Down
Loading