arrow-kt / arrow-integrations

Λrrow Integrations is part of Λrrow, a functional companion to Kotlin's Standard Library
http://arrow-kt.io
Other
27 stars 6 forks source link

Downgrade Kotlin and Arrow-Gradle #99

Closed i-walker closed 2 years ago

i-walker commented 2 years ago

Kotlin version to 1.6.21 Arrow-cradle-* to 0.10.1

for the 0.14.0 release

myuwono commented 2 years ago

@i-walker does arrow gradle 0.10.1 have the fix to ensure java 11 release?

i-walker commented 2 years ago

AFAIK it should work just like it does in Arrow, but @JavierSegoviaCordoba can probably answer that better

myuwono commented 2 years ago

That's good I can try inspecting that

JavierSegoviaCordoba commented 2 years ago

I think I saw a few issues in old Kotlin version with the new approach, if so, we can move the old compatibility variables to the java extension instead of the kotlin one.

myuwono commented 2 years ago

@JavierSegoviaCordoba can you point me to that approach? I've just clarified that 1.6.21 with arrow-gradle-config 0.10.1 did not seem to produce the correct variants.

JavierSegoviaCordoba commented 2 years ago

@myuwono

tasks.withType<JavaCompile>().configureEach {
  targetCompatibility = "${JavaVersion.toVersion(8)}"
  sourceCompatibility = "${JavaVersion.toVersion(8)}"
}
myuwono commented 2 years ago

@JavierSegoviaCordoba @i-walker apologies for the late reply. Sorry I wasn't being clear. That's what I have tried, along with other permutations that modifies targetCompatibility and sourceCompatibility. I can confirm none of those work.

you can try it out by cloning arrow-integrations, switching to a different jdk and executing

./gradlew :arrow-integrations-jackson-module:outgoingVariants

which outputs consistently:

> Task :arrow-integrations-jackson-module:outgoingVariants
--------------------------------------------------
Variant apiElements
--------------------------------------------------
Description = API elements for main.

Capabilities
    - io.arrow-kt:arrow-integrations-jackson-module:0.13.3-alpha.20.0+2022-07-08T23-16-02-511365Z (default capability)
Attributes
    - org.gradle.category                = library
    - org.gradle.dependency.bundling     = external
    - org.gradle.jvm.environment         = standard-jvm
    - org.gradle.jvm.version             = 17
    - org.gradle.libraryelements         = jar
    - org.gradle.usage                   = java-api
    - org.jetbrains.kotlin.platform.type = jvm

for both api and runtime elements

The only solution that appears to work is actually specifying a java toolchain in the actual submodule.

myuwono commented 2 years ago

remote pairing with @JavierSegoviaCordoba - we found the issue being the settings wasn't applied due to missing allprojects directive