Skip to content

Commit

Permalink
add dokka multimodule
Browse files Browse the repository at this point in the history
  • Loading branch information
altavir committed Oct 4, 2024
1 parent 8a453bf commit 7064546
Show file tree
Hide file tree
Showing 29 changed files with 63 additions and 111 deletions.
19 changes: 9 additions & 10 deletions benchmarks/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ repositories {
}

kotlin {
jvmToolchain(17)

compilerOptions {
optIn.addAll(
"space.kscience.kmath.UnstableKMathAPI"
)
}

jvm()

js(IR) {
Expand Down Expand Up @@ -58,7 +66,7 @@ kotlin {
implementation(project(":kmath-nd4j"))
implementation(project(":kmath-kotlingrad"))
implementation(project(":kmath-viktor"))
implementation(project(":kmath-jafama"))
// implementation(project(":kmath-jafama"))
implementation(projects.kmath.kmathTensorflow)
implementation("org.tensorflow:tensorflow-core-platform:0.4.0")
implementation("org.nd4j:nd4j-native:1.0.0-M1")
Expand Down Expand Up @@ -152,15 +160,6 @@ benchmark {
}
}

kotlin {
jvmToolchain(11)
compilerOptions {
optIn.addAll(
"space.kscience.kmath.UnstableKMathAPI"
)
}
}


private data class JmhReport(
val jmhVersion: String,
Expand Down

This file was deleted.

6 changes: 6 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ allprojects {
version = "0.4.1-dev"
}

dependencies{
subprojects.forEach {
dokka(it)
}
}

subprojects {
if (name.startsWith("kmath")) apply<MavenPublishPlugin>()

Expand Down
4 changes: 1 addition & 3 deletions examples/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ dependencies {
implementation(project(":kmath-tensors"))
implementation(project(":kmath-symja"))
implementation(project(":kmath-for-real"))
//jafama
implementation(project(":kmath-jafama"))
//multik
implementation(project(":kmath-multik"))
implementation(libs.multik.default)
Expand All @@ -54,7 +52,7 @@ dependencies {
}

kotlin {
jvmToolchain(11)
jvmToolchain(17)
sourceSets.all {
languageSettings {
optIn("kotlin.contracts.ExperimentalContracts")
Expand Down
15 changes: 0 additions & 15 deletions examples/src/main/kotlin/space/kscience/kmath/jafama/JafamaDemo.kt

This file was deleted.

3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ org.gradle.jvmargs=-Xmx4096m
org.gradle.parallel=true
org.gradle.workers.max=4

toolsVersion=0.15.4-kotlin-2.0.0
toolsVersion=0.15.6-kotlin-2.1.0-Beta1
org.jetbrains.dokka.experimental.gradle.pluginMode=V2EnabledWithHelpers
19 changes: 13 additions & 6 deletions kmath-kotlingrad/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id("space.kscience.gradle.jvm")
id("space.kscience.gradle.mpp")
}

kotlin.sourceSets
Expand All @@ -9,11 +9,18 @@ kotlin.sourceSets

description = "Kotlin∇ integration module"

dependencies {
api("ai.hypergraph:kaliningraph:0.1.9")
api("ai.hypergraph:kotlingrad:0.4.7")
api(project(":kmath-core"))
testImplementation(project(":kmath-ast"))
kscience{
jvm()

jvmMain{
api("ai.hypergraph:kaliningraph:0.1.9")
api("ai.hypergraph:kotlingrad:0.4.7")
api(project(":kmath-core"))
}

jvmTest{
implementation(project(":kmath-ast"))
}
}

readme {
Expand Down
19 changes: 13 additions & 6 deletions kmath-nd4j/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
plugins {
id("space.kscience.gradle.jvm")
id("space.kscience.gradle.mpp")
}

description = "ND4J NDStructure implementation and according NDAlgebra classes"

dependencies {
api(project(":kmath-tensors"))
api("org.nd4j:nd4j-api:1.0.0-M1")
testImplementation("org.nd4j:nd4j-native-platform:1.0.0-M1")
testImplementation("org.slf4j:slf4j-simple:1.7.32")

kscience {
jvm()

jvmMain {
api(project(":kmath-tensors"))
api("org.nd4j:nd4j-api:1.0.0-M2.1")
}

jvmTest{
implementation("org.nd4j:nd4j-native-platform:1.0.0-M1")
}
}

readme {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ public class RandomSourceGenerator internal constructor(
public val source: RandomSource,
seed: Long?,
) : RandomGenerator {
internal val random: UniformRandomProvider = seed?.let { source.create(seed) }
?: RandomSource.create(source)
internal val random: UniformRandomProvider = seed?.let { source.create(seed) } ?: source.create()

override fun nextBoolean(): Boolean = random.nextBoolean()
override fun nextDouble(): Double = random.nextDouble()
Expand Down
34 changes: 10 additions & 24 deletions kmath-symja/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,24 @@
*/

plugins {
id("space.kscience.gradle.jvm")
id("space.kscience.gradle.mpp")
}

description = "Symja integration module"

dependencies {
api("org.matheclipse:matheclipse-core:2.0.0") {
// Incorrect transitive dependencies
exclude("org.apfloat", "apfloat")
exclude("org.hipparchus", "hipparchus-clustering")
exclude("org.hipparchus", "hipparchus-core")
exclude("org.hipparchus", "hipparchus-fft")
exclude("org.hipparchus", "hipparchus-fitting")
exclude("org.hipparchus", "hipparchus-ode")
exclude("org.hipparchus", "hipparchus-optim")
exclude("org.hipparchus", "hipparchus-stat")
kscience{
jvm()

jvmMain {
api("org.matheclipse:matheclipse-core:3.0.0")

api(project(":kmath-core"))
}

// Replaces for incorrect transitive dependencies
api("org.apfloat:apfloat:1.10.0")
api("org.hipparchus:hipparchus-clustering:1.8")
api("org.hipparchus:hipparchus-core:1.8")
api("org.hipparchus:hipparchus-fft:1.8")
api("org.hipparchus:hipparchus-fitting:1.8")
api("org.hipparchus:hipparchus-ode:1.8")
api("org.hipparchus:hipparchus-optim:1.8")
api("org.hipparchus:hipparchus-stat:1.8")

api(project(":kmath-core"))
testImplementation("org.slf4j:slf4j-simple:1.7.31")

}


readme {
maturity = space.kscience.gradle.Maturity.PROTOTYPE
}
11 changes: 7 additions & 4 deletions kmath-viktor/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
plugins {
id("space.kscience.gradle.jvm")
id("space.kscience.gradle.mpp")
}

description = "Binding for https://github.com/JetBrains-Research/viktor"

dependencies {
api(project(":kmath-core"))
api("org.jetbrains.bio:viktor:1.2.0")
kscience{
jvm()
jvmMain{
api(project(":kmath-core"))
api("org.jetbrains.bio:viktor:1.2.0")
}
}

readme {
Expand Down
1 change: 0 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ include(
":kmath-tensors",
":kmath-jupyter",
":kmath-symja",
":kmath-jafama",
":examples",
":benchmarks",
)
1 change: 1 addition & 0 deletions test-utils/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ kotlin.sourceSets {
dependencies {
api(projects.kmath.kmathCore)
api(kotlin("test"))
api(spclibs.logback.classic)
}
}
}

0 comments on commit 7064546

Please sign in to comment.