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

Added high arity for arrow-core.api functions #3360

Merged
merged 3 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

74 changes: 74 additions & 0 deletions arrow-libs/core/arrow-core-high-arity/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
@file:Suppress("DSL_SCOPE_VIOLATION")

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id(libs.plugins.kotlin.multiplatform.get().pluginId)
alias(libs.plugins.arrowGradleConfig.kotlin)
alias(libs.plugins.arrowGradleConfig.publish)
alias(libs.plugins.kotlinx.kover)
alias(libs.plugins.kotest.multiplatform)
alias(libs.plugins.spotless)
}

spotless {
kotlin {
ktlint().editorConfigOverride(mapOf("ktlint_standard_filename" to "disabled"))
}
}

apply(from = property("ANIMALSNIFFER_MPP"))

kotlin {
sourceSets {
commonMain {
dependencies {
api(projects.arrowCore)
api(projects.arrowAtomic)
api(projects.arrowContinuations)
api(projects.arrowAnnotations)
api(libs.kotlin.stdlibCommon)
}
}

commonTest {
dependencies {
implementation(projects.arrowFxCoroutines)
implementation(libs.kotest.frameworkEngine)
implementation(libs.kotest.assertionsCore)
implementation(libs.kotest.property)
}
}

jvmTest {
dependencies {
runtimeOnly(libs.kotest.runnerJUnit5)
}
}

jvmMain {
dependencies {
implementation(libs.kotlin.stdlib)
}
}

jsMain {
dependencies {
implementation(libs.kotlin.stdlibJS)
}
}
}

jvm {
tasks.jvmJar {
manifest {
attributes["Automatic-Module-Name"] = "arrow.core-high-arity"
}
}
}
}

// enables context receivers for Jvm Tests
tasks.named<KotlinCompile>("compileTestKotlinJvm") {
kotlinOptions.freeCompilerArgs += "-Xcontext-receivers"
}
4 changes: 4 additions & 0 deletions arrow-libs/core/arrow-core-high-arity/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Maven publishing configuration
pom.name=Arrow Core High Arity
# Build configuration
kapt.incremental.apt=false
6 changes: 6 additions & 0 deletions arrow-libs/core/arrow-core-high-arity/knit.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
knit.package=arrow.core.examples
knit.dir=src/jvmTest/kotlin/examples/

test.package=arrow.core.examples.test
test.dir=src/jvmTest/kotlin/examples/test/
test.template=knit.test.template
15 changes: 15 additions & 0 deletions arrow-libs/core/arrow-core-high-arity/knit.test.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// This file was automatically generated from ${file.name} by Knit tool. Do not edit.
package ${test.package}

import io.kotest.core.spec.style.StringSpec

class ${test.name} : StringSpec({
<#list cases as case>
"${case.name}" {
${case.knit.package}.${case.knit.name}.test()
}

</#list>
}) {
override fun timeout(): Long = 1000
}
Loading