Skip to content

Commit

Permalink
Added high arity for arrow-core.api functions (#3360)
Browse files Browse the repository at this point in the history
  • Loading branch information
yesitskev authored Feb 6, 2024
1 parent c28a3ab commit 039a1c9
Show file tree
Hide file tree
Showing 18 changed files with 3,867 additions and 7 deletions.

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

0 comments on commit 039a1c9

Please sign in to comment.