Rename maven artifacts

Renaming the Core module artifact matchin its module name on GitHub, like the bukkit or nukkit module does.
Given that, it's more clear which maven artifact belongs to which module.
This commit is contained in:
NotMyFault 2020-01-03 20:10:16 +01:00
parent b3c91d866b
commit 1b3427837e

View File

@ -36,34 +36,34 @@ processResources {
}
//noinspection GroovyAssignabilityCheck
jar.archiveFileName = "PlotSquared-API-${project.parent.version}.jar"
jar.destinationDirectory = file("../mvn/com/github/intellectualsites/plotsquared/PlotSquared-API/" + project.parent.version)
jar.archiveFileName = "PlotSquared-CoreAPI-${project.parent.version}.jar"
jar.destinationDirectory = file("../mvn/com/github/intellectualsites/plotsquared/PlotSquared-CoreAPI/" + project.parent.version)
task createPom {
doLast {
pom {
project {
groupId = "com.github.intellectualsites.plotsquared"
artifactId = "PlotSquared-API"
artifactId = "PlotSquared-CoreAPI"
version = project.parent.version
}
}.writeTo("../mvn/com/github/intellectualsites/plotsquared/PlotSquared-API/${project.parent.version}/PlotSquared-API-${project.parent.version}.pom")
}.writeTo("../mvn/com/github/intellectualsites/plotsquared/PlotSquared-CoreAPI/${project.parent.version}/PlotSquared-CoreAPI-${project.parent.version}.pom")
pom {
project {
groupId = "com.github.intellectualsites.plotsquared"
artifactId = "PlotSquared-API"
artifactId = "PlotSquared-CoreAPI"
version = "latest"
}
}.writeTo("../mvn/com/github/intellectualsites/plotsquared/PlotSquared-API/latest/PlotSquared-API-latest.pom")
}.writeTo("../mvn/com/github/intellectualsites/plotsquared/PlotSquared-CoreAPI/latest/PlotSquared-CoreAPI-latest.pom")
}
}
task copyFiles {
doLast {
copy {
from("../mvn/com/github/intellectualsites/plotsquared/PlotSquared-API/${project.parent.version}/")
into("../mvn/com/github/intellectualsites/plotsquared/PlotSquared-API/latest/")
from("../mvn/com/github/intellectualsites/plotsquared/PlotSquared-CoreAPI/${project.parent.version}/")
into("../mvn/com/github/intellectualsites/plotsquared/PlotSquared-CoreAPI/latest/")
include("*.jar")
rename("PlotSquared-API-${project.parent.version}.jar", "PlotSquared-API-latest.jar")
rename("PlotSquared-CoreAPI-${project.parent.version}.jar", "PlotSquared-CoreAPI-latest.jar")
}
}
}