Skip to content

Commit

Permalink
Prepare for K2 community build
Browse files Browse the repository at this point in the history
  • Loading branch information
serras committed Oct 11, 2023
1 parent 6d3a807 commit 990e1eb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,6 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 60

env:
KOTLIN_OVERRIDE: 1.9.30-dev-1098

steps:
- uses: actions/checkout@v4
with:
Expand All @@ -182,7 +179,7 @@ jobs:
- name: jvmTest (K2 enabled)
uses: gradle/gradle-build-action@v2
with:
arguments: jvmTest -Pkotlin.experimental.tryK2=true
arguments: jvmTest -Pkotlin_version=2.0.0-dev-4562 -Pkotlin_repo_url="https://maven.pkg.jetbrains.space/kotlin/p/kotlin/bootstrap" -Pkotlin_language_version=2.0

- name: Upload reports
if: failure()
Expand Down
12 changes: 11 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import kotlinx.knit.KnitPluginExtension
import org.jetbrains.dokka.gradle.DokkaMultiModuleTask
import org.jetbrains.dokka.gradle.DokkaTaskPartial
import org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

buildscript {
repositories {
Expand All @@ -21,7 +22,16 @@ allprojects {
repositories {
mavenCentral()
maven(url = "https://oss.sonatype.org/content/repositories/snapshots/")
maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/bootstrap")
(project.rootProject.properties["kotlin_repo_url"] as? String)?.also { maven(it) }
}

tasks {
withType<KotlinCompile> {
kotlinOptions {
(project.rootProject.properties["kotlin_language_version"] as? String)?.also { languageVersion = it }
(project.rootProject.properties["kotlin_api_version"] as? String)?.also { apiVersion = it }
}
}
}
}

Expand Down
14 changes: 9 additions & 5 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
rootProject.name = "arrow"

pluginManagement {
@Suppress("LocalVariableName") val kotlin_repo_url: String? by settings
repositories {
gradlePluginPortal()
mavenCentral()
mavenLocal()
maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/bootstrap")
kotlin_repo_url?.also { maven(it) }
}
}

Expand All @@ -17,17 +18,20 @@ plugins {
}

dependencyResolutionManagement {
@Suppress("LocalVariableName") val kotlin_repo_url: String? by settings
@Suppress("LocalVariableName") val kotlin_version: String? by settings

repositories {
mavenCentral()
gradlePluginPortal()
mavenLocal()
kotlin_repo_url?.also { maven(it) }
}
versionCatalogs {
create("libs") {
val kotlinOverride = System.getenv("KOTLIN_OVERRIDE")
if (!kotlinOverride.isNullOrBlank()) {
println("Overriding Kotlin version with $kotlinOverride")
version("kotlin", kotlinOverride)
if (!kotlin_version.isNullOrBlank()) {
println("Overriding Kotlin version with $kotlin_version")
version("kotlin", kotlin_version!!)
}
}
}
Expand Down

0 comments on commit 990e1eb

Please sign in to comment.