Skip to content
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

Upgrade gradle to 7.0. #420

Merged
merged 2 commits into from
May 19, 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
17 changes: 14 additions & 3 deletions compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,20 @@ subprojects {
// IntelliJ refuses to sort imports correctly.
// This is a known issue: https://github.com/pinterest/ktlint/issues/527
"import-ordering",
Comment on lines 95 to 96
Copy link
Collaborator

Choose a reason for hiding this comment

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

A heads-up just in case you're interested in a follow-on PR:

It looks like the import-ordering issue has been (mostly) fixed thanks to the introduction of a layout table for Kotlin imports. (But note the misbehavior cited at the end of that conversation, including a comment by the tried-and-true Valeriy Ovechkin 😺 .)

Copy link
Collaborator Author

@zach-klippenstein zach-klippenstein May 19, 2021

Choose a reason for hiding this comment

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

I'm not interesting in diverging these effectively duplicate configs any more than necessary. We can follow up and address in the main project once these have merged.

// Ktlint doesn't know how to handle nullary annotations on function types, e.g.
// @Composable () -> Unit.
"paren-spacing"

// We had to disable the indent and parameter-list-wrapping rules, because they lead to
// false positives even in the most recent KtLint version. We created tickets:
//
// https://github.com/pinterest/ktlint/issues/963
// https://github.com/pinterest/ktlint/issues/964
// https://github.com/pinterest/ktlint/issues/965
//
// We can't revert the KtLint version, because they only work with Kotlin 1.3 and would
// block Kotlin 1.4. We rather have a newer Kotlin version than a proper indent. The
// indent rule needs to be disabled globally due to another bug:
// https://github.com/pinterest/ktlint/issues/967
"indent",
"parameter-list-wrapping"
Comment on lines +97 to +110
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I just copied this in from the main project's build.gradle.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Seems we should be able to re-enable indent and parameter-list-wrapping (assuming we're on a recent-enough version of ktlint and there aren't any new Kotlin-compatibility issues) 🤞.

963 was allegedly fixed here; 964 here (transitively via 918); 965 here.

)
)
}
Expand Down
6 changes: 3 additions & 3 deletions compose/buildSrc/src/main/java/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ object Versions {

@Suppress("unused")
object Dependencies {
const val android_gradle_plugin = "com.android.tools.build:gradle:7.0.0-alpha10"
const val android_gradle_plugin = "com.android.tools.build:gradle:7.1.0-alpha01"

object AndroidX {
const val appcompat = "androidx.appcompat:appcompat:1.3.0-beta01"
Expand All @@ -57,8 +57,8 @@ object Dependencies {
}

const val dokka = "org.jetbrains.dokka:dokka-gradle-plugin:0.10.0"
const val mavenPublish = "com.vanniktech:gradle-maven-publish-plugin:0.11.1"
const val ktlint = "org.jlleitschuh.gradle:ktlint-gradle:9.2.0"
const val mavenPublish = "com.vanniktech:gradle-maven-publish-plugin:0.13.0"
const val ktlint = "org.jlleitschuh.gradle:ktlint-gradle:10.0.0"

object Test {
object AndroidX {
Expand Down
2 changes: 1 addition & 1 deletion compose/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-6.8.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion 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-6.8.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions versions.properties
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ version.junit.junit=4.13
version.kotlin=1.5.0
version.kotlinx.coroutines=1.4.2
version.kotlinx.serialization=1.2.0
version.me.champeau.gradle..jmh-gradle-plugin=0.5.1
version.me.champeau.gradle..jmh-gradle-plugin=0.5.3
version.moshi=1.12.0
version.okio=2.7.0
version.org.hamcrest..hamcrest-core=2.2
version.org.jetbrains..annotations=19.0.0
version.org.jetbrains.dokka..dokka-gradle-plugin=1.4.32
version.org.jetbrains.kotlin..kotlin-reflect=1.5.0
version.org.jetbrains.kotlinx..binary-compatibility-validator=0.5.0
version.org.jlleitschuh.gradle..ktlint-gradle=9.4.1
version.org.jlleitschuh.gradle..ktlint-gradle=10.0.0
version.org.openjdk.jmh..jmh-core=1.25.2
version.org.openjdk.jmh..jmh-generator-annprocess=1.25.2
version.radiography=2.3.0