Skip to content

Commit

Permalink
Update sortDependencies to v0.12 (#1063)
Browse files Browse the repository at this point in the history
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[com.squareup.sort-dependencies](https://redirect.github.com/square/gradle-dependencies-sorter)
| plugin | minor | `0.7` -> `0.12` |
|
[com.squareup:sort-dependencies-gradle-plugin](https://redirect.github.com/square/gradle-dependencies-sorter)
| dependencies | minor | `0.7` -> `0.12` |

---

### Release Notes

<details>
<summary>square/gradle-dependencies-sorter
(com.squareup.sort-dependencies)</summary>

###
[`v0.12`](https://redirect.github.com/square/gradle-dependencies-sorter/blob/HEAD/CHANGELOG.md#Version-012)

- \[Fix]: update to latest kotlin-editor and don't delete complex
statements in dependencies blocks.

###
[`v0.11`](https://redirect.github.com/square/gradle-dependencies-sorter/blob/HEAD/CHANGELOG.md#Version-011)

-   \[Fix]: emit errors even when not in verbose mode.
- \[Fix]: update kotlin-editor for better parsing of dependency
declarations.

###
[`v0.10`](https://redirect.github.com/square/gradle-dependencies-sorter/blob/HEAD/CHANGELOG.md#Version-010)

-   \[Feat]: support enforcedPlatform
-   \[Fix]: bad version-checking logic was hiding check results.

###
[`v0.9`](https://redirect.github.com/square/gradle-dependencies-sorter/blob/HEAD/CHANGELOG.md#Version-09)

-   \[Fix]: sort testFixtures closer to test deps.
-   \[Fix]: update KotlinEditor and handle GRADLE_DISTRIBUTION type.
-   \[Fix]: suggest fix action based on invocation context.
-   \[Chore]: build with Gradle 8.10.2.

###
[`v0.8`](https://redirect.github.com/square/gradle-dependencies-sorter/blob/HEAD/CHANGELOG.md#Version-08)

-   \[New] improve support for parsing Kotlin DSL, using KotlinEditor.
-   \[Chore] built with Gradle 8.9.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMzMuMCIsInVwZGF0ZWRJblZlciI6IjM5LjQuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

---------

Co-authored-by: Zac Sweers <[email protected]>
  • Loading branch information
slack-oss-bot and ZacSweers authored Nov 11, 2024
1 parent b5deffe commit 8c6f85a
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 32 deletions.
27 changes: 14 additions & 13 deletions config/git/hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,21 @@ original_partially_staged_chksum=$(partially_staged_chksum)
original_partially_staged_filenames=$(echo "$original_partially_staged_chksum" | grep -oE '[^ ]+$')

#### Sort Dependencies section
# Enable this if you use gradle-dependency-sorter
# Get a list of staged build.gradle.kts files
kts_files_list="$(git diff --cached --name-only --diff-filter=ACMR "-G.*" | grep -Ei "build\.gradle\.kts$" )"
if [[ ! -z ${kts_files_list} ]]; then
# We have some build files! Join them to a string delimited on space. We'll pass these to sortDependencies
kts_files_list="$(echo ${kts_files_list} | paste -sd " " -)"
"${REPO_ROOT_DIR}/config/bin/sort-dependencies" ${kts_files_list} &> /dev/null
if [[ $? != 0 ]]; then
# Something it couldn't handle came up. Show the command and run verbosely for local debugging.
echo -e "${RED}sort-dependencies failed, re-running verbosely. Alternatively, you can run the command locally" >&2
echo -e "Running format command: './config/bin/sort-dependencies --verbose ${kts_files_list}'${NC}" >&2
"${REPO_ROOT_DIR}/config/bin/sort-dependencies --verbose" ${kts_files_list} >&2
exit $?
fi
fi
#kts_files_list="$(git diff --cached --name-only --diff-filter=ACMR "-G.*" | grep -Ei "build\.gradle\.kts$" )"
#if [[ ! -z ${kts_files_list} ]]; then
# # We have some build files! Join them to a string delimited on space. We'll pass these to sortDependencies
# kts_files_list="$(echo ${kts_files_list} | paste -sd " " -)"
# "${REPO_ROOT_DIR}/config/bin/sort-dependencies" ${kts_files_list} &> /dev/null
# if [[ $? != 0 ]]; then
# # Something it couldn't handle came up. Show the command and run verbosely for local debugging.
# echo -e "${RED}sort-dependencies failed, re-running verbosely. Alternatively, you can run the command locally" >&2
# echo -e "Running format command: './config/bin/sort-dependencies --verbose ${kts_files_list}'${NC}" >&2
# "${REPO_ROOT_DIR}/config/bin/sort-dependencies --verbose" ${kts_files_list} >&2
# exit $?
# fi
#fi

# TODO eventually support detekt here too once we can wire baseline and config files
#### ktfmt
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ okhttp = "5.0.0-alpha.12"
okio = "3.9.1"
retrofit = "2.11.0"
slack-lint = "0.8.2"
sortDependencies = "0.7"
sortDependencies = "0.12"
spotless = "7.0.0.BETA4"
sqldelight = "2.0.2"
versionsPlugin = "0.51.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ plugins {
}

dependencies {
lintChecks(libs.gradleLints)
implementation(projects.tools.versionNumber)

compileOnly(gradleApi())
Expand All @@ -30,4 +29,6 @@ dependencies {
testImplementation(libs.agp)
testImplementation(libs.junit)
testImplementation(libs.truth)

lintChecks(libs.gradleLints)
}
4 changes: 2 additions & 2 deletions platforms/gradle/foundry-gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ dependencies.constraints {
}

dependencies {
lintChecks(libs.gradleLints)

api(platform(libs.okhttp.bom))
api(libs.okhttp)
// Better I/O
Expand Down Expand Up @@ -134,4 +132,6 @@ dependencies {
testImplementation(libs.junit)
testImplementation(libs.okio.fakefilesystem)
testImplementation(libs.truth)

lintChecks(libs.gradleLints)
}
27 changes: 14 additions & 13 deletions platforms/intellij/skate/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,6 @@ configurations
.configureEach { attributes { attribute(KotlinPlatformType.attribute, KotlinPlatformType.jvm) } }

dependencies {
lintChecks(libs.composeLints)

compileOnly(libs.coroutines.core.ij)

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)

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
Expand All @@ -151,6 +138,20 @@ dependencies {
testFramework(TestFrameworkType.Bundled)
}

implementation(projects.platforms.intellij.compose, exclusions)
implementation(projects.tools.tracing, exclusions)

implementation(libs.bugsnag)
implementation(libs.kaml)
implementation(libs.kotlinx.serialization.core)
implementation(libs.okhttp)
implementation(libs.okhttp.loggingInterceptor)
implementation(libs.okio)

compileOnly(libs.coroutines.core.ij)

testImplementation(libs.junit)
testImplementation(libs.truth)

lintChecks(libs.composeLints)
}
4 changes: 2 additions & 2 deletions tools/cli/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ if (System.getenv("CI") != null) {
}

dependencies {
ksp(libs.autoService.ksp)

api(libs.clikt)

implementation(libs.autoService.annotations)
Expand All @@ -63,4 +61,6 @@ dependencies {

testImplementation(libs.junit)
testImplementation(libs.truth)

ksp(libs.autoService.ksp)
}

0 comments on commit 8c6f85a

Please sign in to comment.