File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed
plugin/src/main/java/com/github/pagr0m/kotlin/native/spm/entity/impl Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ kotlin {
1818 dependencies {
1919 packages(
2020 url = " https://github.com/AFNetworking/AFNetworking.git" ,
21- version = " 4.0.0 " ,
21+ version = exactVersion( " 4.0.1 " ) ,
2222 name = " AFNetworking"
2323 )
2424 }
Original file line number Diff line number Diff line change 11object PluginCoordinates {
22 const val GROUP = " com.github.pagr0m"
33 const val ARTIFACT = " kotlin.native.spm"
4- const val VERSION = " 0.1.1 "
4+ const val VERSION = " 0.1.2 "
55
66 const val ID = " $GROUP .$ARTIFACT "
77 const val IMPLEMENTATION_CLASS = " $ID .plugin.KotlinSpmPlugin"
Original file line number Diff line number Diff line change @@ -24,6 +24,18 @@ class DependencyManager {
2424 dependencies.add(dependency)
2525 }
2626
27+ /* *
28+ * Version definitions based on:
29+ * https://docs.swift.org/package-manager/PackageDescription/PackageDescription.html
30+ */
31+ fun fromVersion (version : String ) = " from: \" $version \" "
32+
33+ fun exactVersion (version : String ) = " .exact(\" $version \" )"
34+
35+ fun versionRange (minVersion : String , maxVersion : String ) = " \" $minVersion \" ..<\" $maxVersion \" "
36+
37+ fun versionClosedRange (minVersion : String , maxVersion : String ) = " \" $minVersion \" ...\" $maxVersion \" "
38+
2739 data class Package (
2840 @Input val url : String ,
2941 @Input @Optional val version : String? = null ,
@@ -38,7 +50,7 @@ class DependencyManager {
3850 .package(
3951 name: "$dependencyName ",
4052 url: "$url ",
41- from: " $version "
53+ $version
4254 )
4355 """ .trimIndent()
4456 }
You can’t perform that action at this time.
0 commit comments