From b3ff37993ceeb94238843123df162dbc7319881e Mon Sep 17 00:00:00 2001 From: iProdigy <8106344+iProdigy@users.noreply.github.com> Date: Wed, 8 Jan 2025 16:40:45 -0600 Subject: [PATCH] chore: restore reproducibility of kotlin sources jar (#370) --- kotlin/build.gradle.kts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/kotlin/build.gradle.kts b/kotlin/build.gradle.kts index 8542cb6..4c2379a 100644 --- a/kotlin/build.gradle.kts +++ b/kotlin/build.gradle.kts @@ -1,3 +1,6 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile + plugins { kotlin("jvm") version "2.1.0" id("org.jetbrains.dokka") version "1.9.20" @@ -13,8 +16,15 @@ dependencies { testImplementation(project(":cache-provider-caffeine")) } -tasks.withType { - kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8.toString() +tasks.withType().configureEach { + compilerOptions { + jvmTarget = JvmTarget.JVM_1_8 + } +} + +tasks.kotlinSourcesJar { + // Workaround for https://youtrack.jetbrains.com/issue/KT-54207/ in order to restore reproducibility + enabled = false } tasks.javadocJar {