Skip to content

Commit

Permalink
Tried to fix deps in published package.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOnlyTails committed Dec 10, 2021
1 parent 58e399c commit 4cb8971
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@

import com.vanniktech.maven.publish.SonatypeHost
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.w3c.dom.Node
import org.w3c.dom.NodeList
import java.time.Instant.now
import java.time.format.DateTimeFormatter.ISO_INSTANT

Expand Down Expand Up @@ -137,6 +140,23 @@ plugins.withId("com.vanniktech.maven.publish.base") {
url.set("https://github.com/theonlytails/")
}
}

withXml {
val document = asElement()
val dependencies = document.getElementsByTagName("dependencies")

fun NodeList.forEach(action: Node.() -> Unit) {
for (i in 0 until length) {
item(i).action()
}
}

dependencies.forEach {
asElement().getElementsByTagName("version").forEach {
textContent = textContent.removeSuffix("_mapped_official_$minecraftVersion")
}
}
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ forge_version=38.0.15
# Maven publishing
groupId=com.theonlytails
modId=lootgoblin
version=0.3.0
version=0.3.1

1 comment on commit 4cb8971

@vercel
Copy link

@vercel vercel bot commented on 4cb8971 Dec 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.