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

chore: bump Gradle to 8.1.1 #5814

Merged
merged 2 commits into from
Apr 27, 2023
Merged

chore: bump Gradle to 8.1.1 #5814

merged 2 commits into from
Apr 27, 2023

Conversation

vlsi
Copy link
Collaborator

@vlsi vlsi commented Apr 22, 2023

The PR upgrades to Gradle 8.1.1 and factors build logic to a set of files that compose together.
See https://docs.gradle.org/current/userguide/structuring_software_products.html

The end goal is to move the logic from /build.gradle.kts, and /src/build.gradle.kts to a coherent set of files in build-logic/

The current state is /build.gradle.kts 661 lines -> 153 lines, /src/build.gradle.kts 228 lines -> 0 lines (it no longer exists).

File layout

Imagine there's /src/core/build.gradle.kts that contains:

// in /src/core/build.gradle.kts
plugins {
    id("build-logic.jvm-published-library")
}

It means /src/core/build.gradle.kts applies all the bits from build-logic.jvm-published-library.gradle.kts.
If you open build-logic.jvm-published-library.gradle.kts, you'll see

// build-logic.jvm-published-library.gradle.kts
plugins {
    id("build-logic.jvm-library")
    id("build-logic.java-published-library")
}

Which means build-logic.jvm-published-library.gradle.kts composes build-logic.jvm-library.gradle.kts and build-logic.java-published-library.gradle.kts.

That means you can understand everything a given build.gradle.kts means by looking into plugins section and following the links.

Dependencies

Dependency versions are hard-coded within build.gradle.kts. It will enable adding Renovate bot for bumping the versions in the future.

TODO

@FSchumacher
Copy link
Contributor

FSchumacher commented Apr 23, 2023

Seems to work on my setup (using Java 8 with tasks, createDist and test and Java 20 with tasks and rungui)

@vlsi vlsi force-pushed the gradle811 branch 3 times, most recently from 9467864 to f944bfc Compare April 23, 2023 11:07
@vlsi vlsi marked this pull request as draft April 23, 2023 11:08
@vlsi vlsi force-pushed the gradle811 branch 18 times, most recently from 1378278 to f8a396c Compare April 26, 2023 14:54
@vlsi vlsi marked this pull request as ready for review April 26, 2023 14:59
@vlsi vlsi force-pushed the gradle811 branch 2 times, most recently from 6a4bb75 to eb07c5c Compare April 26, 2023 15:11
@vlsi
Copy link
Collaborator Author

vlsi commented Apr 26, 2023

I think this is more-or-less ready. The missing bit is that the current checksum-dependency-plugin produces a lot of warnings:

Configure project :build-logic:basics
Multiple files present for artifact org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.8.10: /Users/vlsi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-gradle-plugin-api/1.8.10/71bb7a6e45dfa34ee566f88280c2b1d0514cb473/kotlin-gradle-plugin-api-1.8.10-gradle76.jar and /Users/vlsi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-gradle-plugin-api/1.8.10/71bb7a6e45dfa34ee566f88280c2b1d0514cb473/kotlin-gradle-plugin-api-1.8.10.jar

@vlsi vlsi force-pushed the gradle811 branch 2 times, most recently from 4221c95 to e70ccb0 Compare April 27, 2023 10:22
@vlsi
Copy link
Collaborator Author

vlsi commented Apr 27, 2023

I've resolved the warnings, so I guess the PR is feature-complete.

@vlsi vlsi merged commit a9ec76d into apache:master Apr 27, 2023
@vlsi vlsi deleted the gradle811 branch April 27, 2023 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants