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

Update CI/build infra #1852

Merged
merged 2 commits into from
Jun 4, 2024
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
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v3

- name: Configure JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '20'
java-version: '21'
cache: 'gradle'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Test
run: ./gradlew build check --stacktrace -PkotlinTestMode=${{ matrix.kotlin-test-mode }}

Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/gradle-wrapper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: gradle-wrapper

on:
pull_request:
paths:
- 'gradlew'
- 'gradlew.bat'
- 'gradle/wrapper/**'

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v3
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ subprojects {
pluginManager.withPlugin("java") {
configure<JavaPluginExtension> {
toolchain {
languageVersion.set(JavaLanguageVersion.of(20))
languageVersion.set(libs.versions.jdk.map(JavaLanguageVersion::of))
}
}
if (project.name != "records-tests") {
Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[versions]
autoService = "1.1.1"
jdk = "21"
jvmTarget = "1.8"
kotlin = "2.0.0"
# No 0.5.0 full release yet due to KSP's 1.0.21 release being busted for CLI/programmatic use
Expand Down
4 changes: 2 additions & 2 deletions moshi/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ val java16: SourceSet by sourceSets.creating {
}
}

// We use JDK 17 for latest but target 16 for maximum compatibility
// We use newer JDKs but target 16 for maximum compatibility
val service = project.extensions.getByType<JavaToolchainService>()
val customLauncher =
service.launcherFor {
languageVersion.set(JavaLanguageVersion.of(17))
languageVersion.set(libs.versions.jdk.map(JavaLanguageVersion::of))
}

tasks.named<JavaCompile>("compileJava16Java") {
Expand Down