Skip to content

Commit 0df7102

Browse files
committed
Revised support for dynamic dependency version s(relates to #239)
1 parent 54b4d47 commit 0df7102

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/main/kotlin/kscript/app/Script.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ private fun String.extractAnnotParams(): List<String> {
144144
}
145145

146146
// fail if any argument is a comma separated list of artifacts (see #101)
147-
annotationArgs.filter { it.contains(',') }.let {
147+
annotationArgs.filter { it.contains(",[^)]".toRegex()) }.let {
148148
errorIf(it.isNotEmpty()) {
149149
"Artifact locators must be provided as separate annotation arguments and not as comma-separated list: " + it
150150
}

test/resources/depends_on_dynamic.kts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
#!/usr/bin/env kscript
22

3-
4-
@file:DependsOn("log4j:log4j:1.2+")
5-
//DEPS com.offbytwo:docopt:0.6.0.+
6-
// neither should having comments after declartions
3+
@file:DependsOn("log4j:log4j:[1.2,)")
4+
@file:DependsOn("com.offbytwo:docopt:[0.6,)")
75

86
// some pointless comment
97

0 commit comments

Comments
 (0)