Skip to content

Commit

Permalink
GH-1960 Force Kotlin 1.9.20-RC in Gradle toolchain setup
Browse files Browse the repository at this point in the history
  • Loading branch information
dzikoysk committed Oct 23, 2023
1 parent 9df58dc commit e99a728
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 23 deletions.
42 changes: 20 additions & 22 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ scmVersion {
}

allprojects {
apply(plugin = "java-library")
apply(plugin = "application")

group = "com.reposilite"
version = rootProject.scmVersion.version

// Give a friendly error when building project and git tags aren't available
Expand Down Expand Up @@ -94,15 +98,27 @@ allprojects {
}
}
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11

withJavadocJar()
withSourcesJar()
}

tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = "11"
languageVersion = "1.9"
freeCompilerArgs = listOf("-Xjvm-default=all") // For generating default methods in interfaces
}
}
}

subprojects {
apply(plugin = "java-library")
apply(plugin = "application")
apply(plugin = "maven-publish")

group = "com.reposilite"

dependencies {
val unirest = "3.14.5"
testImplementation("com.konghq:unirest-java:$unirest")
Expand All @@ -117,28 +133,10 @@ subprojects {
testImplementation("org.junit.jupiter:junit-jupiter-engine:$junit")
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

java {
withJavadocJar()
withSourcesJar()
}

sourceSets.main {
java.srcDirs("src/main/kotlin")
}

tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = "11"
languageVersion = "1.9"
freeCompilerArgs = listOf("-Xjvm-default=all") // For generating default methods in interfaces
}
}

publishing {
repositories {
maven {
Expand Down
9 changes: 8 additions & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,20 @@
*/

plugins {
kotlin("jvm") version "1.9.20-RC"
`kotlin-dsl`
}

repositories {
maven("https://plugins.gradle.org/m2")
gradlePluginPortal()
}

dependencies {
implementation("pl.allegro.tech.build:axion-release-plugin:1.13.6")
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}

0 comments on commit e99a728

Please sign in to comment.