Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optics based on kotlin.reflect #2612

Merged
merged 7 commits into from Feb 9, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 32 additions & 0 deletions arrow-libs/optics/arrow-optics-reflect/build.gradle.kts
@@ -0,0 +1,32 @@
plugins {
id(libs.plugins.kotlin.multiplatform.get().pluginId)
alias(libs.plugins.arrowGradleConfig.kotlin)
alias(libs.plugins.arrowGradleConfig.publish)
}

apply(plugin = "io.kotest.multiplatform")

apply(from = property("TEST_COVERAGE"))
apply(from = property("ANIMALSNIFFER_MPP"))

kotlin {
sourceSets {
jvmMain {
dependencies {
api(projects.arrowCore)
api(projects.arrowOptics)
api(libs.kotlin.stdlibCommon)
implementation(libs.kotlin.stdlibJDK8)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this exposes the API of Kotlin Std, and uses the JDK8 implementation?

I'm still not a 100% sure how this works, and what is the correct config :/
I don't we're doing different things in different modules.. but off-topic for this PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure 100% either. In any case, I've removed the api dependency on stdlibCommon and just left the implementation for the JDK version.

api(libs.kotlin.reflect)
}
}
jvmTest {
dependencies {
implementation(projects.arrowOpticsTest)
implementation(libs.kotlin.stdlibJDK8)
implementation(libs.junitJupiterEngine)
implementation(libs.kotlin.reflect)
}
}
}
}
4 changes: 4 additions & 0 deletions arrow-libs/optics/arrow-optics-reflect/gradle.properties
@@ -0,0 +1,4 @@
# Maven publishing configuration
pom.name=Arrow Optics for Kotlin Reflection
# Build configuration
kapt.incremental.apt=false
3 changes: 3 additions & 0 deletions settings.gradle.kts
Expand Up @@ -53,6 +53,9 @@ project(":arrow-fx-stm").projectDir = file("arrow-libs/fx/arrow-fx-stm")
include("arrow-optics")
project(":arrow-optics").projectDir = file("arrow-libs/optics/arrow-optics")

include("arrow-optics-reflect")
project(":arrow-optics-reflect").projectDir = file("arrow-libs/optics/arrow-optics-reflect")

include("arrow-optics-ksp-plugin")
project(":arrow-optics-ksp-plugin").projectDir = file("arrow-libs/optics/arrow-optics-ksp-plugin")

Expand Down