|
1 |
| -@Target(allowedTargets = *arrayOf(AnnotationTarget.FILE)) |
| 1 | +@Target(AnnotationTarget.FILE) |
2 | 2 | @Retention(AnnotationRetention.SOURCE)
|
3 | 3 | @MustBeDocumented
|
4 | 4 | @Repeatable
|
5 |
| -annotation class DependsOn(vararg val args: String) |
| 5 | +annotation class DependsOn(vararg val artifactLocators: String) |
6 | 6 |
|
7 | 7 | // add repo to annotation
|
8 | 8 | //annotation class DependsOn(vararg val args : String, val from = "jcenter")
|
9 | 9 |
|
10 |
| -@Target(allowedTargets = *arrayOf(AnnotationTarget.FILE)) |
| 10 | +@Target(AnnotationTarget.FILE) |
11 | 11 | @Retention(AnnotationRetention.SOURCE)
|
12 | 12 | @MustBeDocumented
|
13 | 13 | annotation class EntryPoint(val value: String)
|
14 | 14 |
|
15 | 15 |
|
16 |
| -@Target(allowedTargets = *arrayOf(AnnotationTarget.FILE)) |
| 16 | +@Target(AnnotationTarget.FILE) |
17 | 17 | @Retention(AnnotationRetention.SOURCE)
|
18 | 18 | @MustBeDocumented
|
19 | 19 | @Repeatable
|
20 | 20 | annotation class Include(val includePath: String)
|
21 | 21 |
|
22 | 22 |
|
23 |
| -@Target(allowedTargets = *arrayOf(AnnotationTarget.FILE)) |
| 23 | +@Target(AnnotationTarget.FILE) |
24 | 24 | @Retention(AnnotationRetention.SOURCE)
|
25 | 25 | @MustBeDocumented
|
26 | 26 | @Repeatable
|
27 | 27 | annotation class KotlinOpts(val runOptions: String)
|
28 | 28 |
|
29 | 29 |
|
| 30 | +// MavenRepository and DependsOnMaven are supported "as it" for compatibility with jupyter notebooks. |
| 31 | +// see https://github.com/kohesive/keplin/blob/master/keplin-maven-resolver/src/main/kotlin/uy/kohesive/keplin/kotlin/script/resolver/maven/MavenResolverAnnotations.kt |
| 32 | +// example https://github.com/kohesive/keplin/blob/a307e05eae091c99c665fe3da52a428fb0e10a6a/keplin-maven-resolver/src/test/kotlin/uy/kohesive/keplin/kotlin/script/resolver/maven/TestMavenScriptDependencies.kt#L38 |
30 | 33 |
|
31 | 34 |
|
| 35 | +// note: in contrasts to DependsOn DependsOnMaven just supports a single artifact argument |
| 36 | +@Target(AnnotationTarget.FILE) |
| 37 | +@Retention(AnnotationRetention.SOURCE) |
| 38 | +@Repeatable |
| 39 | +annotation class DependsOnMaven(val artifactLocator: String) |
| 40 | + |
| 41 | +@Target(AnnotationTarget.FILE) |
| 42 | +@Retention(AnnotationRetention.SOURCE) |
| 43 | +@Repeatable |
| 44 | +// in contrast to the original version we make the id mandatory here. |
| 45 | +// This keeps ensures compatiblity with keplin but eases parsing |
| 46 | +//annotation class MavenRepository(val id: String = "", val url: String) |
| 47 | +annotation class MavenRepository(val id: String, val url: String) |
| 48 | + |
0 commit comments