Skip to content

Commit

Permalink
chore: restore reproducibility of kotlin sources jar (#370)
Browse files Browse the repository at this point in the history
  • Loading branch information
iProdigy authored Jan 8, 2025
1 parent 3da18fd commit b3ff379
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -13,8 +16,15 @@ dependencies {
testImplementation(project(":cache-provider-caffeine"))
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8.toString()
tasks.withType<KotlinJvmCompile>().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 {
Expand Down

0 comments on commit b3ff379

Please sign in to comment.