Skip to content

Commit

Permalink
Fix version management for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrishchenko committed Jan 4, 2025
1 parent c575c06 commit 198a169
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ dependencyResolutionManagement {
.drop(1)
.filter { ".npm.version=" in it }
.forEach { data ->
val packageName = data.substringBefore("\n")
val lineSeparator = System.lineSeparator()

val packageName = data.substringBefore(lineSeparator)
val packageAlias = packageName
.removePrefix("@")
.replace(
Expand All @@ -38,8 +40,8 @@ dependencyResolutionManagement {
.replace("/", "-")

val version = data
.substringAfter("\n")
.substringBefore("\n")
.substringAfter(lineSeparator)
.substringBefore(lineSeparator)
.substringAfter("=", "")

library("npm-$packageAlias", "npm", packageName).version(version)
Expand Down

0 comments on commit 198a169

Please sign in to comment.