Skip to content

Commit 7e0d7ac

Browse files
committed
Fix gradle module imports
Related-To #139
1 parent fd8a474 commit 7e0d7ac

6 files changed

Lines changed: 103 additions & 12 deletions

File tree

gradle/libs.versions.toml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ ktorClientPlugins = "3.1.1"
1010
logbackClassic = "1.5.20"
1111
kover = "0.9.3"
1212
binaryCompatibilityValidator = "0.18.1"
13-
13+
ksp = "2.2.20-2.0.4"
14+
kotlinpoet = "2.2.0"
15+
kotlin-compile-testing = "1.6.0"
1416

1517
[libraries]
1618
kotlinx-coroutines = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinxCoroutines" }
@@ -29,6 +31,16 @@ ktor-client-js = { module = "io.ktor:ktor-client-js", version.ref = "ktorClientC
2931
ktor-client-logging = { module = "io.ktor:ktor-client-logging", version.ref = "ktorClientCore" }
3032
ktor-client-plugins = { module = "io.ktor:ktor-client-plugins", version.ref = "ktorClientPlugins" }
3133

34+
kotlinpoet = { module = "com.squareup:kotlinpoet", version.ref = "kotlinpoet" }
35+
kotlinpoet-ksp = { module = "com.squareup:kotlinpoet-ksp", version.ref = "kotlinpoet" }
36+
ksp-api = { module = "com.google.devtools.ksp:symbol-processing-api", version.ref = "ksp" }
37+
ksp-test = { module = "com.google.devtools.ksp:symbol-processing-test", version.ref = "ksp" }
38+
kotlin-compile-testing = { module = "com.github.tschuchortdev:kotlin-compile-testing", version.ref = "kotlin-compile-testing" }
39+
kotlin-compile-testing-ksp = { module = "com.github.tschuchortdev:kotlin-compile-testing-ksp", version.ref = "kotlin-compile-testing" }
40+
41+
42+
43+
3244

3345
logback-classic = { module = "ch.qos.logback:logback-classic", version.ref = "logbackClassic" }
3446

@@ -40,4 +52,5 @@ jetbrainsKotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
4052
vanniktech-mavenPublish = { id = "com.vanniktech.maven.publish", version = "0.34.0" }
4153
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
4254
binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "binaryCompatibilityValidator" }
55+
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
4356

skainet-lang/skainet-lang-export-ops/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ kotlin {
2121

2222
sourceSets {
2323
commonMain.dependencies {
24-
implementation(project(":miKrograd"))
24+
implementation(project(":skainet-lang:skainet-lang-core"))
2525
}
2626

2727
commonTest.dependencies {
@@ -32,7 +32,7 @@ kotlin {
3232
val jvmMain by getting {
3333
kotlin.srcDir("build/generated/ksp/jvm/jvmMain/kotlin")
3434
dependencies {
35-
implementation(project(":miKrograd-annotations"))
35+
implementation(project(":skainet-lang:skainet-lang-ksp-annotations"))
3636
}
3737
}
3838

skainet-lang/skainet-lang-ksp-annotations/build.gradle.kts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,5 @@ plugins {
66

77

88
kotlin {
9-
jvm {
10-
compilations.all {
11-
kotlinOptions {
12-
jvmTarget = "17"
13-
}
14-
}
15-
}
9+
jvm()
1610
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
package org.mikrograd.diff.ksp
2+
3+
import kotlinx.serialization.Serializable
4+
5+
/**
6+
* Root documentation module containing all operator documentation for a module.
7+
*/
8+
@Serializable
9+
data class OperatorDocModule(
10+
val schema: String = "https://skainet.ai/schemas/operator-doc/v1",
11+
val version: String,
12+
val commit: String,
13+
val timestamp: String,
14+
val module: String,
15+
val operators: List<OperatorDoc>
16+
)
17+
18+
/**
19+
* Documentation for a single operator class.
20+
*/
21+
@Serializable
22+
data class OperatorDoc(
23+
val name: String,
24+
val package: String,
25+
val modality: String,
26+
val functions: List<FunctionDoc>
27+
)
28+
29+
/**
30+
* Documentation for a single function within an operator.
31+
*/
32+
@Serializable
33+
data class FunctionDoc(
34+
val name: String,
35+
val signature: String,
36+
val parameters: List<ParameterDoc>,
37+
val returnType: String,
38+
val statusByBackend: Map<String, String>,
39+
val notes: List<Note>
40+
)
41+
42+
/**
43+
* Documentation for a function parameter.
44+
*/
45+
@Serializable
46+
data class ParameterDoc(
47+
val name: String,
48+
val type: String,
49+
val description: String = ""
50+
)
51+
52+
/**
53+
* A note associated with a function, typically containing owner or issue information.
54+
*/
55+
@Serializable
56+
data class Note(
57+
val type: String, // "owner" or "issue"
58+
val backend: String,
59+
val content: String
60+
)

skainet-lang/skainet-lang-ksp-annotations/src/commonMain/kotlin/org/mikrograd/diff/ksp/Mikrograd.kt

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.mikrograd.diff.ksp
1+
package sk.ainet.lang.ops
22

33
/**
44
* Computation mode for the Mikrograd annotation.
@@ -27,3 +27,27 @@ enum class ComputationMode {
2727
@Target(AnnotationTarget.FUNCTION)
2828
@Retention(AnnotationRetention.SOURCE)
2929
annotation class Mikrograd(val mode: ComputationMode = ComputationMode.INFERENCE)
30+
31+
/**
32+
* Annotation to mark classes or functions as not implemented for specific backends.
33+
*
34+
* @param backends List of backend names where this feature is not implemented
35+
*/
36+
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
37+
@Retention(AnnotationRetention.SOURCE)
38+
annotation class NotImplemented(vararg val backends: String)
39+
40+
/**
41+
* Annotation to mark classes or functions as in progress for specific backends.
42+
*
43+
* @param backends List of backend names where this feature is in progress
44+
* @param owner The person or team responsible for the implementation
45+
* @param issue URL or identifier for the tracking issue
46+
*/
47+
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
48+
@Retention(AnnotationRetention.SOURCE)
49+
annotation class InProgress(
50+
vararg val backends: String,
51+
val owner: String = "",
52+
val issue: String = ""
53+
)

skainet-lang/skainet-lang-ksp-processor/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ kotlin {
1010
sourceSets {
1111
val jvmMain by getting {
1212
dependencies {
13-
implementation(project("skainet-lang:skainet-lang-ksp-annotations"))
13+
implementation(project(":skainet-lang:skainet-lang-ksp-annotations"))
1414
implementation(libs.kotlinpoet) // Use version from libs.versions.toml
1515
implementation(libs.kotlinpoet.ksp) // Required for KSP integration
1616
implementation(libs.ksp.api)

0 commit comments

Comments
 (0)