fix library url location
All checks were successful
Publish to snapshot maven / build (push) Successful in 25s
All checks were successful
Publish to snapshot maven / build (push) Successful in 25s
This commit is contained in:
parent
fadcb64b34
commit
164858bb76
|
@ -7,7 +7,7 @@ plugins {
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "dev.frogmc"
|
group = "dev.frogmc"
|
||||||
version = "0.0.1-alpha.2"
|
version = "0.0.1-alpha.3"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|
|
@ -51,7 +51,7 @@ open class MetaV1UpdateTask : DefaultTask() {
|
||||||
url, Files.size(file.toPath()), Hashing.sha1().hashBytes(file.readBytes()).toString()
|
url, Files.size(file.toPath()), Hashing.sha1().hashBytes(file.readBytes()).toString()
|
||||||
)
|
)
|
||||||
}.toMutableList()
|
}.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()))
|
libraries.add(MetaLibrary(project.name, getOwnUrl(), Files.size(builtFile!!.toPath()), Hashing.sha1().hashBytes(builtFile.readBytes()).toString()))
|
||||||
|
|
||||||
val json = JsonOutput.toJson(MetaData(version, date, libraries))
|
val json = JsonOutput.toJson(MetaData(version, date, libraries))
|
||||||
|
@ -91,7 +91,8 @@ open class MetaV1UpdateTask : DefaultTask() {
|
||||||
project.repositories.filterIsInstance<MavenArtifactRepository>().map { it.url }
|
project.repositories.filterIsInstance<MavenArtifactRepository>().map { it.url }
|
||||||
.forEach {
|
.forEach {
|
||||||
val artifactUrl = "%s%s/%s/%s/%s-%s.jar".format(
|
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 {
|
runCatching {
|
||||||
|
|
Loading…
Reference in a new issue