Skip to content

Commit 6b3540f

Browse files
committed
force dependency resolution for the current version of androidx-lifecycle
2 parents 37bd814 + 85718c3 commit 6b3540f

File tree

218 files changed

+2398
-2172
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

218 files changed

+2398
-2172
lines changed

.buildscript/android-ui-tests.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ android {
1111

1212
dependencies {
1313
androidTestImplementation project(":workflow-ui:internal-testing-android")
14-
15-
implementation(libs.androidx.test.espresso.core)
16-
implementation(libs.androidx.test.junit)
17-
implementation(libs.squareup.leakcanary.instrumentation)
14+
androidTestImplementation(libs.androidx.test.espresso.core)
15+
androidTestImplementation(libs.androidx.test.junit)
16+
androidTestImplementation(libs.squareup.leakcanary.instrumentation)
1817
}

.editorconfig

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#
1010
# Some keys were manually changed:
1111
# * insert_final_newline (is false, changed to true, expected by KtLint)
12-
# * kotlin_imports_layout (see comment below, needed for KtLint)
12+
# * ktlint_ignore_back_ticked_identifier (enabled, see comment below)
1313
# * root (see comment below)
1414

1515
# Tells tools to stop searching upwards.
@@ -30,10 +30,9 @@ ij_formatter_tags_enabled = false
3030
ij_smart_tabs = false
3131
ij_wrap_on_typing = false
3232

33-
# This config is needed for KtLint. It configures the import rule order to use IntelliJ IDEA's
34-
# default style, see also:
35-
# https://github.com/pinterest/ktlint#custom-ktlint-specific-editorconfig-properties
36-
kotlin_imports_layout = *,java.**,javax.**,kotlin.**,^
33+
# Back-ticked method names are allowed to exceed the line length. That's especially helpful for
34+
# test methods with descriptive names.
35+
ktlint_ignore_back_ticked_identifier = true
3736

3837
[*.java]
3938
ij_java_align_consecutive_assignments = false

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ your `repositories` block, and then add dependencies on the following artifacts:
6464
<td>Your Android app uses modals (popups).</td>
6565
</tr>
6666
<tr>
67-
<td nowrap><code>com.squareup.workflow1:workflow-ui-backstack-android:x.y.z</code></td>
67+
<td nowrap><code>com.squareup.workflow1:workflow-ui-container-android:x.y.z</code></td>
6868
<td>Your android app uses backstacks.</td>
6969
</tr>
7070
</table>

RELEASING.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
./gradlew build connectedCheck
1111
```
1212

13+
1. Update your tags.
14+
```bash
15+
git fetch --tags
16+
```
17+
1318
1. In `gradle.properties`, remove the `-SNAPSHOT` suffix from the `VERSION_NAME` property.
1419
E.g. `VERSION_NAME=0.1.0`
1520

@@ -38,11 +43,11 @@
3843
git commit -am "Finish releasing v0.1.0."
3944
```
4045

41-
1. Push your commits and tag:
46+
1. Push your commits and tags:
4247
```
43-
git push origin main
48+
git push origin main && git push --tags
4449
# or git push origin fix-branch
45-
git push origin v0.1.0
50+
git push origin v0.1.0 && git push --tags
4651
```
4752

4853
1. Create the release on GitHub:
@@ -119,6 +124,23 @@ mavenCentralUsername=<username>
119124
mavenCentralPassword=<password>
120125
```
121126

127+
In order to sign you'll need to specify your GPG key config in your private
128+
Gradle properties file(`~/.gradle/gradle.properties`).
129+
130+
```
131+
signing.keyId=<keyid>
132+
signing.password=<password>
133+
signing.secretKeyRingFile=<path/to/secring.gpg>
134+
```
135+
136+
If this is your first time for either, the following one time steps need
137+
to be performed:
138+
139+
1. Sign up for a Sonatype JIRA account.
140+
1. Generate a GPG key (if you don't already have one). [Instructions](https://central.sonatype.org/publish/requirements/gpg/#generating-a-key-pair).
141+
1. Distribute the GPG key to public servers. [Instructions](https://central.sonatype.org/publish/requirements/gpg/#distributing-your-public-key).
142+
1. Get access to deploy under 'com.squareup' from Sonatype.
143+
122144
#### Snapshot Releases
123145

124146
Double-check that `gradle.properties` correctly contains the `-SNAPSHOT` suffix, then upload

build.gradle.kts

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ buildscript {
1111
classpath(libs.kotlin.serialization.gradle.plugin)
1212
classpath(libs.kotlinx.binaryCompatibility.gradle.plugin)
1313
classpath(libs.kotlin.gradle.plugin)
14+
classpath(libs.google.ksp)
1415
classpath(libs.ktlint.gradle)
1516
classpath(libs.vanniktech.publish)
1617
}
@@ -61,28 +62,6 @@ subprojects {
6162
// Default "plain" reporter is actually harder to read.
6263
reporter(ReporterType.JSON)
6364
}
64-
65-
disabledRules.set(
66-
setOf(
67-
// IntelliJ refuses to sort imports correctly.
68-
// This is a known issue: https://github.com/pinterest/ktlint/issues/527
69-
"import-ordering",
70-
71-
// We had to disable the indent and parameter-list-wrapping rules, because they lead to
72-
// false positives even in the most recent KtLint version. We created tickets:
73-
//
74-
// https://github.com/pinterest/ktlint/issues/963
75-
// https://github.com/pinterest/ktlint/issues/964
76-
// https://github.com/pinterest/ktlint/issues/965
77-
//
78-
// We can't revert the KtLint version, because they only work with Kotlin 1.3 and would
79-
// block Kotlin 1.4. We rather have a newer Kotlin version than a proper indent. The
80-
// indent rule needs to be disabled globally due to another bug:
81-
// https://github.com/pinterest/ktlint/issues/967
82-
"indent",
83-
"parameter-list-wrapping"
84-
)
85-
)
8665
}
8766
}
8867

@@ -138,6 +117,20 @@ subprojects {
138117
}
139118
}
140119

120+
allprojects {
121+
122+
configurations.all {
123+
resolutionStrategy.eachDependency {
124+
// This ensures that any time a dependency has a transitive dependency upon androidx.lifecycle,
125+
// it uses the same version as the rest of the project. This is crucial, since Androidx
126+
// libraries are never in sync and lifecycle 2.4.0 introduced api-breaking changes.
127+
if (requested.group == "androidx.lifecycle") {
128+
useVersion(libs.versions.androidx.lifecycle.get())
129+
}
130+
}
131+
}
132+
}
133+
141134
// This task is invoked by the documentation site generator script in the main workflow project (not
142135
// in this repo), which also expects the generated files to be in a specific location. Both the task
143136
// name and destination directory are defined in this script:

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ android.useAndroidX=true
88
systemProp.org.gradle.internal.publish.checksums.insecure=true
99

1010
GROUP=com.squareup.workflow1
11-
VERSION_NAME=1.5.0-SNAPSHOT
11+
VERSION_NAME=1.6.0-SNAPSHOT
1212

1313
POM_DESCRIPTION=Square Workflow
1414

gradle/libs.versions.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ dokka = "1.5.31"
3333

3434
google-accompanist = "0.18.0"
3535
google-dagger = "2.40.5"
36+
google-ksp = "1.6.10-1.0.2"
3637
google-material = "1.4.0"
3738

3839
groovy = "3.0.9"
@@ -137,6 +138,7 @@ androidx-viewbinding = { module = "androidx.databinding:viewbinding", version.re
137138
dokka-gradle-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka" }
138139

139140
google-android-material = { module = "com.google.android.material:material", version.ref = "material" }
141+
google-ksp = { module = "com.google.devtools.ksp:symbol-processing-gradle-plugin", version.ref = "google-ksp" }
140142

141143
hamcrest = "org.hamcrest:hamcrest-core:2.2"
142144

internal-testing-utils/src/main/java/com/squareup/workflow1/internal/util/UncaughtExceptionGuard.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class UncaughtExceptionGuard {
4040

4141
// If the block completed successfully, but an uncaught exception was reported, report it now.
4242
uncaughtException.get()
43-
?.let { throw it }
43+
?.let { throw it }
4444

4545
return result
4646
}

internal-testing-utils/src/test/java/com/squareup/workflow1/internal/util/UncaughtExceptionGuardTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class UncaughtExceptionGuardTest {
4747
try {
4848
rethrowingUncaughtExceptions {
4949
Thread.getDefaultUncaughtExceptionHandler()
50-
.uncaughtException(Thread.currentThread(), RuntimeException("fail"))
50+
.uncaughtException(Thread.currentThread(), RuntimeException("fail"))
5151
}
5252
fail("Expected exception.")
5353
} catch (e: RuntimeException) {
@@ -67,7 +67,7 @@ class UncaughtExceptionGuardTest {
6767
// Wait for all the other threads are also ready…
6868
startLatch.await()
6969
Thread.getDefaultUncaughtExceptionHandler()
70-
.uncaughtException(Thread.currentThread(), RuntimeException("fail $i"))
70+
.uncaughtException(Thread.currentThread(), RuntimeException("fail $i"))
7171
finishedLatch.countDown()
7272
}.start()
7373
}

samples/compose-samples/src/androidTest/java/com/squareup/sample/compose/hellocompose/HelloComposeTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import androidx.compose.ui.test.onNodeWithText
66
import androidx.compose.ui.test.performClick
77
import androidx.test.ext.junit.runners.AndroidJUnit4
88
import com.squareup.workflow1.ui.WorkflowUiExperimentalApi
9+
import com.squareup.workflow1.ui.internal.test.DetectLeaksAfterTestSuccess
910
import com.squareup.workflow1.ui.internal.test.IdleAfterTestRule
10-
import leakcanary.DetectLeaksAfterTestSuccess
1111
import org.junit.Rule
1212
import org.junit.Test
1313
import org.junit.rules.RuleChain

0 commit comments

Comments
 (0)