From dd4859d44160d52fe3a2a3eafc0c8f4f1c581c15 Mon Sep 17 00:00:00 2001 From: Zac Sweers Date: Thu, 10 Oct 2024 23:39:56 -0400 Subject: [PATCH 1/4] Update sortDependencies to 0.9 --- config/bin/sort-dependencies | 4 +-- gradle/libs.versions.toml | 2 +- .../agp-handler-api/build.gradle.kts | 3 +- .../foundry-gradle-plugin/build.gradle.kts | 4 +-- platforms/intellij/skate/build.gradle.kts | 32 ++++--------------- tools/cli/build.gradle.kts | 4 +-- 6 files changed, 15 insertions(+), 34 deletions(-) diff --git a/config/bin/sort-dependencies b/config/bin/sort-dependencies index 7b14d8143..c314a2535 100755 --- a/config/bin/sort-dependencies +++ b/config/bin/sort-dependencies @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:280ba1657adbec685394cdd63ca0cba11741eb590e0fcda47979982beec920b2 -size 15667541 +oid sha256:2b6937bb236f5b5ce76ee3f98c505351fd631efd0d36c4276a1cf8e8862ccd86 +size 29276038 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index c7bbc062d..b44f554c8 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -38,7 +38,7 @@ okhttp = "5.0.0-alpha.12" okio = "3.9.1" retrofit = "2.11.0" slack-lint = "0.8.1" -sortDependencies = "0.7" +sortDependencies = "0.9" spotless = "7.0.0.BETA2" sqldelight = "2.0.2" versionsPlugin = "0.51.0" diff --git a/platforms/gradle/agp-handlers/agp-handler-api/build.gradle.kts b/platforms/gradle/agp-handlers/agp-handler-api/build.gradle.kts index 94115af83..37bbdebe1 100644 --- a/platforms/gradle/agp-handlers/agp-handler-api/build.gradle.kts +++ b/platforms/gradle/agp-handlers/agp-handler-api/build.gradle.kts @@ -20,7 +20,6 @@ plugins { } dependencies { - lintChecks(libs.gradleLints) implementation(libs.guava) compileOnly(gradleApi()) @@ -30,4 +29,6 @@ dependencies { testImplementation(libs.agp) testImplementation(libs.junit) testImplementation(libs.truth) + + lintChecks(libs.gradleLints) } diff --git a/platforms/gradle/foundry-gradle-plugin/build.gradle.kts b/platforms/gradle/foundry-gradle-plugin/build.gradle.kts index 1260d7832..a45818a35 100644 --- a/platforms/gradle/foundry-gradle-plugin/build.gradle.kts +++ b/platforms/gradle/foundry-gradle-plugin/build.gradle.kts @@ -69,8 +69,6 @@ dependencies.constraints { } dependencies { - lintChecks(libs.gradleLints) - api(platform(libs.okhttp.bom)) api(libs.okhttp) // Better I/O @@ -129,4 +127,6 @@ dependencies { testImplementation(libs.junit) testImplementation(libs.okio.fakefilesystem) testImplementation(libs.truth) + + lintChecks(libs.gradleLints) } diff --git a/platforms/intellij/skate/build.gradle.kts b/platforms/intellij/skate/build.gradle.kts index 9a11fd5b5..af3266271 100644 --- a/platforms/intellij/skate/build.gradle.kts +++ b/platforms/intellij/skate/build.gradle.kts @@ -17,7 +17,6 @@ import com.jetbrains.plugin.structure.base.utils.exists import java.nio.file.Paths import java.util.Locale import kotlin.io.path.readText -import org.jetbrains.intellij.platform.gradle.TestFrameworkType import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType plugins { @@ -118,39 +117,20 @@ configurations .configureEach { attributes { attribute(KotlinPlatformType.attribute, KotlinPlatformType.jvm) } } dependencies { - lintChecks(libs.composeLints) - - compileOnly(libs.coroutines.core.ij) + implementation(projects.platforms.intellij.compose, exclusions) + implementation(projects.tools.tracing, exclusions) implementation(libs.bugsnag) - implementation(libs.okio) implementation(libs.kaml) implementation(libs.kotlinx.serialization.core) implementation(libs.okhttp) implementation(libs.okhttp.loggingInterceptor) - implementation(projects.platforms.intellij.compose, exclusions) - implementation(projects.tools.tracing, exclusions) + implementation(libs.okio) - intellijPlatform { - // https://plugins.jetbrains.com/docs/intellij/android-studio.html#open-source-plugins-for-android-studio - // https://plugins.jetbrains.com/docs/intellij/android-studio-releases-list.html - // https://plugins.jetbrains.com/plugin/22989-android/versions/stable - plugin("org.jetbrains.android:242.21829.142") - bundledPlugins( - "com.intellij.java", - "org.intellij.plugins.markdown", - "org.jetbrains.plugins.terminal", - "org.jetbrains.kotlin", - ) - - pluginVerifier() - zipSigner() - instrumentationTools() - - testFramework(TestFrameworkType.Platform) - testFramework(TestFrameworkType.Bundled) - } + compileOnly(libs.coroutines.core.ij) testImplementation(libs.junit) testImplementation(libs.truth) + + lintChecks(libs.composeLints) } diff --git a/tools/cli/build.gradle.kts b/tools/cli/build.gradle.kts index ff52f41ac..71400a506 100644 --- a/tools/cli/build.gradle.kts +++ b/tools/cli/build.gradle.kts @@ -43,8 +43,6 @@ if (System.getenv("CI") != null) { } dependencies { - ksp(libs.autoService.ksp) - api(libs.clikt) implementation(libs.autoService.annotations) @@ -63,4 +61,6 @@ dependencies { testImplementation(libs.junit) testImplementation(libs.truth) + + ksp(libs.autoService.ksp) } From 04e0664c596900fc08d04ab2098c4739bcda608a Mon Sep 17 00:00:00 2001 From: Zac Sweers Date: Thu, 10 Oct 2024 23:40:42 -0400 Subject: [PATCH 2/4] Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bd66972a..4d85c8698 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,6 +56,7 @@ We've restructured this project! Since its early days as a simple Gradle convent - Build against gradle-nullaway `2.0.0`. - Build against Gradle versions plugin `0.51.0`. - Build against Develocity plugin `3.18.1`. +- Build against gradle-dependency-sorter plugin `0.9`. 0.19.6 ------ From 058b9768a1a3e2a26294fa6591a8f5958f0317d2 Mon Sep 17 00:00:00 2001 From: Zac Sweers Date: Thu, 10 Oct 2024 23:42:03 -0400 Subject: [PATCH 3/4] Changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d85c8698..95528146c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,7 +56,7 @@ We've restructured this project! Since its early days as a simple Gradle convent - Build against gradle-nullaway `2.0.0`. - Build against Gradle versions plugin `0.51.0`. - Build against Develocity plugin `3.18.1`. -- Build against gradle-dependency-sorter plugin `0.9`. +- Build against gradle-dependencies-sorter plugin `0.9`. 0.19.6 ------ From fbc1758069043f7571d9744c33b31510036cd1fb Mon Sep 17 00:00:00 2001 From: Zac Sweers Date: Thu, 10 Oct 2024 23:57:53 -0400 Subject: [PATCH 4/4] Restore IJ deps --- platforms/intellij/skate/build.gradle.kts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/platforms/intellij/skate/build.gradle.kts b/platforms/intellij/skate/build.gradle.kts index af3266271..32cd9c985 100644 --- a/platforms/intellij/skate/build.gradle.kts +++ b/platforms/intellij/skate/build.gradle.kts @@ -17,6 +17,7 @@ import com.jetbrains.plugin.structure.base.utils.exists import java.nio.file.Paths import java.util.Locale import kotlin.io.path.readText +import org.jetbrains.intellij.platform.gradle.TestFrameworkType import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType plugins { @@ -134,3 +135,24 @@ dependencies { lintChecks(libs.composeLints) } + +// Can't nest this inside of dependencies {} because otherwise the dependency sorter will remove it +dependencies.intellijPlatform { + // https://plugins.jetbrains.com/docs/intellij/android-studio.html#open-source-plugins-for-android-studio + // https://plugins.jetbrains.com/docs/intellij/android-studio-releases-list.html + // https://plugins.jetbrains.com/plugin/22989-android/versions/stable + plugin("org.jetbrains.android:242.21829.142") + bundledPlugins( + "com.intellij.java", + "org.intellij.plugins.markdown", + "org.jetbrains.plugins.terminal", + "org.jetbrains.kotlin", + ) + + pluginVerifier() + zipSigner() + instrumentationTools() + + testFramework(TestFrameworkType.Platform) + testFramework(TestFrameworkType.Bundled) +}