Skip to content

Commit

Permalink
Update gradle-build-action to v2
Browse files Browse the repository at this point in the history
I'm not a fan of the way it handles caching, but it'll
soon be required anyway due to GitHub Actions changes
(set-output is deprecated for removal).
This however means that dependency locking is no longer
needed (build uses fix versions, resolution is already
stable/reproducible)
  • Loading branch information
tbroyer committed Nov 13, 2022
1 parent d428bc1 commit 9b05ab5
Show file tree
Hide file tree
Showing 18 changed files with 2 additions and 511 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,9 @@ jobs:

- name: Build with Gradle
id: gradle-build
uses: gradle/gradle-build-action@v1
uses: gradle/gradle-build-action@v2
with:
arguments: --no-daemon :build-logic:build build --stacktrace
distributions-cache-enabled: true
dependencies-cache-enabled: true
dependencies-cache-key: '**/*gradle.lockfile'
dependencies-cache-exact: true

- name: Store reports
if: always() && (steps.gradle-build.outcome == 'success' || steps.gradle-build.outcome == 'failure')
Expand Down Expand Up @@ -67,13 +63,9 @@ jobs:
- name: Build with Gradle
id: gradle-build
uses: gradle/gradle-build-action@v1
uses: gradle/gradle-build-action@v2
with:
arguments: --no-daemon test "-Ptest.java-toolchain=${{ matrix.java }}"
distributions-cache-enabled: true
dependencies-cache-enabled: true
dependencies-cache-key: '**/*gradle.lockfile'
dependencies-cache-exact: true

- name: Store reports
if: always() && (steps.gradle-build.outcome == 'success' || steps.gradle-build.outcome == 'failure')
Expand Down
8 changes: 0 additions & 8 deletions build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@ plugins {
`kotlin-dsl`
alias(libs.plugins.spotless)
}
buildscript {
dependencyLocking {
lockAllConfigurations()
}
}
dependencyLocking {
lockAllConfigurations()
}

spotless {
kotlinGradle {
Expand Down
58 changes: 0 additions & 58 deletions build-logic/buildscript-gradle.lockfile

This file was deleted.

75 changes: 0 additions & 75 deletions build-logic/gradle.lockfile

This file was deleted.

4 changes: 0 additions & 4 deletions build-logic/settings-gradle.lockfile

This file was deleted.

6 changes: 0 additions & 6 deletions build-logic/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ pluginManagement {
gradlePluginPortal()
}
}
buildscript {
dependencyLocking {
lockAllConfigurations()
lockMode.set(LockMode.STRICT)
}
}

rootProject.name = "build-logic"

Expand Down
5 changes: 0 additions & 5 deletions build-logic/src/main/kotlin/local/base.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ plugins {
id("com.diffplug.spotless")
}

dependencyLocking {
lockAllConfigurations()
lockMode.set(LockMode.STRICT)
}

spotless {
kotlinGradle {
ktlint(project.the<VersionCatalogsExtension>().named("libs").findVersion("ktlint").orElseThrow().requiredVersion)
Expand Down
6 changes: 0 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,3 @@ plugins {
}

version = VersionFromGit(project, "HEAD-SNAPSHOT")

tasks {
register("allDependencies") {
dependsOn(getTasksByName("dependencies", true))
}
}
21 changes: 0 additions & 21 deletions buildscript-gradle.lockfile

This file was deleted.

38 changes: 0 additions & 38 deletions gradle.lockfile

This file was deleted.

Loading

0 comments on commit 9b05ab5

Please sign in to comment.