fix library url location
All checks were successful
Publish to snapshot maven / build (push) Successful in 25s

This commit is contained in:
moehreag 2024-06-16 23:34:49 +02:00
parent fadcb64b34
commit 164858bb76
2 changed files with 4 additions and 3 deletions

View file

@ -7,7 +7,7 @@ plugins {
}
group = "dev.frogmc"
version = "0.0.1-alpha.2"
version = "0.0.1-alpha.3"
repositories {
mavenCentral()

View file

@ -51,7 +51,7 @@ open class MetaV1UpdateTask : DefaultTask() {
url, Files.size(file.toPath()), Hashing.sha1().hashBytes(file.readBytes()).toString()
)
}.toMutableList()
val builtFile = project.tasks.getByName(JavaBasePlugin.BUILD_TASK_NAME).outputs.files.files.find { !it.name.endsWith("-dev.jar") && !it.name.endsWith("-sources.jar") && !it.name.endsWith("-javadoc.jar") }
val builtFile = project.tasks.getByName(JavaPlugin.JAR_TASK_NAME).outputs.files.files.find { !it.name.endsWith("-dev.jar") && !it.name.endsWith("-sources.jar") && !it.name.endsWith("-javadoc.jar") }
libraries.add(MetaLibrary(project.name, getOwnUrl(), Files.size(builtFile!!.toPath()), Hashing.sha1().hashBytes(builtFile.readBytes()).toString()))
val json = JsonOutput.toJson(MetaData(version, date, libraries))
@ -91,7 +91,8 @@ open class MetaV1UpdateTask : DefaultTask() {
project.repositories.filterIsInstance<MavenArtifactRepository>().map { it.url }
.forEach {
val artifactUrl = "%s%s/%s/%s/%s-%s.jar".format(
it, escapedGroup, escapedName, escapedVersion, escapedName, escapedVersion
it.toString() + if (it.path.endsWith("/")) "" else "/",
escapedGroup, escapedName, escapedVersion, escapedName, escapedVersion
)
runCatching {