Skip to content

Commit

Permalink
Fix incompatible versioning (#3463)
Browse files Browse the repository at this point in the history
  • Loading branch information
serras authored Jul 4, 2024
1 parent 6d4b177 commit c860806
Show file tree
Hide file tree
Showing 19 changed files with 166 additions and 11 deletions.
10 changes: 10 additions & 0 deletions arrow-libs/core/arrow-annotations/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
@file:Suppress("DSL_SCOPE_VIOLATION")

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion


plugins {
id(libs.plugins.kotlin.multiplatform.get().pluginId)
alias(libs.plugins.arrowGradleConfig.kotlin)
Expand Down Expand Up @@ -31,4 +35,10 @@ kotlin {
}
}
}

@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
(project.rootProject.properties["kotlin_language_version"] as? String)?.also { languageVersion = KotlinVersion.fromVersion(it) }
(project.rootProject.properties["kotlin_api_version"] as? String)?.also { apiVersion = KotlinVersion.fromVersion(it) }
}
}
7 changes: 7 additions & 0 deletions arrow-libs/core/arrow-atomic/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@file:Suppress("DSL_SCOPE_VIOLATION")

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
Expand Down Expand Up @@ -48,6 +49,12 @@ kotlin {
}
}
}

@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
(project.rootProject.properties["kotlin_language_version"] as? String)?.also { languageVersion = KotlinVersion.fromVersion(it) }
(project.rootProject.properties["kotlin_api_version"] as? String)?.also { apiVersion = KotlinVersion.fromVersion(it) }
}
}

tasks.withType<Test>().configureEach {
Expand Down
8 changes: 8 additions & 0 deletions arrow-libs/core/arrow-autoclose/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@file:Suppress("DSL_SCOPE_VIOLATION")

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile


Expand Down Expand Up @@ -42,6 +44,12 @@ kotlin {
}
}
}

@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
(project.rootProject.properties["kotlin_language_version"] as? String)?.also { languageVersion = KotlinVersion.fromVersion(it) }
(project.rootProject.properties["kotlin_api_version"] as? String)?.also { apiVersion = KotlinVersion.fromVersion(it) }
}
}

// enables context receivers for Jvm Tests
Expand Down
12 changes: 11 additions & 1 deletion arrow-libs/core/arrow-cache4k/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
@file:Suppress("DSL_SCOPE_VIOLATION")

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion


plugins {
`java-library`
// `java-library`
id(libs.plugins.kotlin.multiplatform.get().pluginId)
alias(libs.plugins.publish)
alias(libs.plugins.spotless)
Expand Down Expand Up @@ -58,6 +62,12 @@ kotlin {
// -- Deprecated as of 1.8.20 --
// iosArm32() // deprecated as of 1.8.20
// watchosX86()

@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
(project.rootProject.properties["kotlin_language_version"] as? String)?.also { languageVersion = KotlinVersion.fromVersion(it) }
(project.rootProject.properties["kotlin_api_version"] as? String)?.also { apiVersion = KotlinVersion.fromVersion(it) }
}
}

tasks.named<Jar>("jvmJar").configure {
Expand Down
8 changes: 8 additions & 0 deletions arrow-libs/core/arrow-core-high-arity/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@file:Suppress("DSL_SCOPE_VIOLATION")

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
Expand Down Expand Up @@ -35,4 +37,10 @@ kotlin {
}
}
}

@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
(project.rootProject.properties["kotlin_language_version"] as? String)?.also { languageVersion = KotlinVersion.fromVersion(it) }
(project.rootProject.properties["kotlin_api_version"] as? String)?.also { apiVersion = KotlinVersion.fromVersion(it) }
}
}
11 changes: 11 additions & 0 deletions arrow-libs/core/arrow-core-retrofit/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
@file:Suppress("DSL_SCOPE_VIOLATION")

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion


plugins {
id(libs.plugins.kotlin.jvm.get().pluginId)
alias(libs.plugins.arrowGradleConfig.kotlin)
Expand Down Expand Up @@ -36,6 +40,13 @@ dependencies {
testImplementation(libs.squareup.moshi.kotlin)
}

kotlin {
compilerOptions {
(project.rootProject.properties["kotlin_language_version"] as? String)?.also { languageVersion = KotlinVersion.fromVersion(it) }
(project.rootProject.properties["kotlin_api_version"] as? String)?.also { apiVersion = KotlinVersion.fromVersion(it) }
}
}

tasks.jar {
manifest {
attributes["Automatic-Module-Name"] = "arrow.core.retrofit"
Expand Down
10 changes: 10 additions & 0 deletions arrow-libs/core/arrow-core-serialization/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
@file:Suppress("DSL_SCOPE_VIOLATION")

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion


plugins {
id(libs.plugins.kotlin.multiplatform.get().pluginId)
alias(libs.plugins.arrowGradleConfig.kotlin)
Expand Down Expand Up @@ -39,6 +43,12 @@ kotlin {
}
}
}

@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
(project.rootProject.properties["kotlin_language_version"] as? String)?.also { languageVersion = KotlinVersion.fromVersion(it) }
(project.rootProject.properties["kotlin_api_version"] as? String)?.also { apiVersion = KotlinVersion.fromVersion(it) }
}
}

tasks.withType<Test>().configureEach {
Expand Down
7 changes: 7 additions & 0 deletions arrow-libs/core/arrow-core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@file:Suppress("DSL_SCOPE_VIOLATION")

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.time.Duration

Expand Down Expand Up @@ -69,6 +70,12 @@ kotlin {
}
}
}

@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
(project.rootProject.properties["kotlin_language_version"] as? String)?.also { languageVersion = KotlinVersion.fromVersion(it) }
(project.rootProject.properties["kotlin_api_version"] as? String)?.also { apiVersion = KotlinVersion.fromVersion(it) }
}
}

// enables context receivers for Jvm Tests
Expand Down
10 changes: 10 additions & 0 deletions arrow-libs/core/arrow-eval/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
@file:Suppress("DSL_SCOPE_VIOLATION")

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion


plugins {
id(libs.plugins.kotlin.multiplatform.get().pluginId)
alias(libs.plugins.arrowGradleConfig.kotlin)
Expand Down Expand Up @@ -41,6 +45,12 @@ kotlin {
}
}
}

@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
(project.rootProject.properties["kotlin_language_version"] as? String)?.also { languageVersion = KotlinVersion.fromVersion(it) }
(project.rootProject.properties["kotlin_api_version"] as? String)?.also { apiVersion = KotlinVersion.fromVersion(it) }
}
}

tasks.withType<Test>().configureEach {
Expand Down
10 changes: 10 additions & 0 deletions arrow-libs/core/arrow-functions/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
@file:Suppress("DSL_SCOPE_VIOLATION")

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion


plugins {
id(libs.plugins.kotlin.multiplatform.get().pluginId)
alias(libs.plugins.arrowGradleConfig.kotlin)
Expand Down Expand Up @@ -44,6 +48,12 @@ kotlin {
}
}
}

@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
(project.rootProject.properties["kotlin_language_version"] as? String)?.also { languageVersion = KotlinVersion.fromVersion(it) }
(project.rootProject.properties["kotlin_api_version"] as? String)?.also { apiVersion = KotlinVersion.fromVersion(it) }
}
}

tasks.withType<Test>().configureEach {
Expand Down
8 changes: 8 additions & 0 deletions arrow-libs/fx/arrow-collectors/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@file:Suppress("DSL_SCOPE_VIOLATION")

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import java.time.Duration

plugins {
Expand Down Expand Up @@ -58,6 +60,12 @@ kotlin {
}
}
}

@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
(project.rootProject.properties["kotlin_language_version"] as? String)?.also { languageVersion = KotlinVersion.fromVersion(it) }
(project.rootProject.properties["kotlin_api_version"] as? String)?.also { apiVersion = KotlinVersion.fromVersion(it) }
}
}

tasks.withType<Test> {
Expand Down
8 changes: 8 additions & 0 deletions arrow-libs/fx/arrow-fx-coroutines/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@file:Suppress("DSL_SCOPE_VIOLATION")

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import java.time.Duration


Expand Down Expand Up @@ -64,6 +66,12 @@ kotlin {
}
}
}

@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
(project.rootProject.properties["kotlin_language_version"] as? String)?.also { languageVersion = KotlinVersion.fromVersion(it) }
(project.rootProject.properties["kotlin_api_version"] as? String)?.also { apiVersion = KotlinVersion.fromVersion(it) }
}
}

tasks.withType<Test>().configureEach {
Expand Down
7 changes: 7 additions & 0 deletions arrow-libs/fx/arrow-fx-stm/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@file:Suppress("DSL_SCOPE_VIOLATION")

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile


Expand Down Expand Up @@ -50,6 +51,12 @@ kotlin {
}
}
}

@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
(project.rootProject.properties["kotlin_language_version"] as? String)?.also { languageVersion = KotlinVersion.fromVersion(it) }
(project.rootProject.properties["kotlin_api_version"] as? String)?.also { apiVersion = KotlinVersion.fromVersion(it) }
}
}

tasks.withType<Test>().configureEach {
Expand Down
8 changes: 8 additions & 0 deletions arrow-libs/optics/arrow-optics-compose/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@file:Suppress("DSL_SCOPE_VIOLATION")

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl


Expand Down Expand Up @@ -74,6 +76,12 @@ kotlin {
}
}
}

@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
(project.rootProject.properties["kotlin_language_version"] as? String)?.also { languageVersion = KotlinVersion.fromVersion(it) }
(project.rootProject.properties["kotlin_api_version"] as? String)?.also { apiVersion = KotlinVersion.fromVersion(it) }
}
}

tasks.withType<Test>().configureEach {
Expand Down
9 changes: 9 additions & 0 deletions arrow-libs/optics/arrow-optics-ksp-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
@file:Suppress("DSL_SCOPE_VIOLATION")

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion


plugins {
id(libs.plugins.kotlin.jvm.get().pluginId)
alias(libs.plugins.arrowGradleConfig.kotlin)
Expand All @@ -16,6 +20,11 @@ spotless {

kotlin {
explicitApi = null

compilerOptions {
(project.rootProject.properties["kotlin_language_version"] as? String)?.also { languageVersion = KotlinVersion.fromVersion(it) }
(project.rootProject.properties["kotlin_api_version"] as? String)?.also { apiVersion = KotlinVersion.fromVersion(it) }
}
}

apply(from = property("ANIMALSNIFFER_MPP"))
Expand Down
12 changes: 12 additions & 0 deletions arrow-libs/optics/arrow-optics-reflect/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
@file:Suppress("DSL_SCOPE_VIOLATION")

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion


plugins {
id(libs.plugins.kotlin.jvm.get().pluginId)
alias(libs.plugins.arrowGradleConfig.kotlin)
Expand Down Expand Up @@ -30,6 +34,14 @@ dependencies {
testImplementation(libs.kotest.property)
}

kotlin {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
(project.rootProject.properties["kotlin_language_version"] as? String)?.also { languageVersion = KotlinVersion.fromVersion(it) }
(project.rootProject.properties["kotlin_api_version"] as? String)?.also { apiVersion = KotlinVersion.fromVersion(it) }
}
}

tasks.jar {
manifest {
attributes["Automatic-Module-Name"] = "arrow.optics.reflect"
Expand Down
10 changes: 10 additions & 0 deletions arrow-libs/optics/arrow-optics/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
@file:Suppress("DSL_SCOPE_VIOLATION")

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion


plugins {
id(libs.plugins.kotlin.multiplatform.get().pluginId)
alias(libs.plugins.arrowGradleConfig.kotlin)
Expand Down Expand Up @@ -42,6 +46,12 @@ kotlin {
}
}
}

@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
(project.rootProject.properties["kotlin_language_version"] as? String)?.also { languageVersion = KotlinVersion.fromVersion(it) }
(project.rootProject.properties["kotlin_api_version"] as? String)?.also { apiVersion = KotlinVersion.fromVersion(it) }
}
}

tasks.withType<Test>().configureEach {
Expand Down
10 changes: 10 additions & 0 deletions arrow-libs/resilience/arrow-resilience/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
@file:Suppress("DSL_SCOPE_VIOLATION")

import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion


plugins {
id(libs.plugins.kotlin.multiplatform.get().pluginId)
alias(libs.plugins.arrowGradleConfig.kotlin)
Expand Down Expand Up @@ -39,6 +43,12 @@ kotlin {
}
}
}

@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
(project.rootProject.properties["kotlin_language_version"] as? String)?.also { languageVersion = KotlinVersion.fromVersion(it) }
(project.rootProject.properties["kotlin_api_version"] as? String)?.also { apiVersion = KotlinVersion.fromVersion(it) }
}
}

tasks.withType<Test>().configureEach {
Expand Down
Loading

0 comments on commit c860806

Please sign in to comment.