[ci-skip] use rootProject.name

This commit is contained in:
Ryder Belserion 2023-01-10 14:12:51 -05:00
parent 20ca5b636a
commit abbe1e0be8
No known key found for this signature in database
GPG Key ID: E4441092436053A7
3 changed files with 13 additions and 11 deletions

View File

@ -16,9 +16,9 @@ webhook {
this.username("Ryder Belserion") this.username("Ryder Belserion")
//this.content("New version of ${project.name} is ready! <@929463441159254066>") //this.content("New version of ${rootProject.name} is ready! <@929463441159254066>")
this.content("New version of ${project.name} is ready!") this.content("New version of ${rootProject.name} is ready!")
this.embeds { this.embeds {
this.embed { this.embed {
@ -27,7 +27,7 @@ webhook {
this.fields { this.fields {
this.field( this.field(
"Version ${project.version}", "Version ${project.version}",
"Download Link: https://modrinth.com/plugin/${project.name.toLowerCase()}/version/${project.version}" "Download Link: https://modrinth.com/plugin/${rootProject.name.toLowerCase()}/version/${project.version}"
) )
if (isBeta) { if (isBeta) {
@ -45,8 +45,8 @@ webhook {
} }
this.author( this.author(
project.name, rootProject.name,
"https://modrinth.com/plugin/${project.name.toLowerCase()}/versions", "https://modrinth.com/plugin/${rootProject.name.toLowerCase()}/versions",
"https://cdn-raw.modrinth.com/data/r3BBZyf3/4522ef0f83143c4803473d356160a3e877c2499c.png" "https://cdn-raw.modrinth.com/data/r3BBZyf3/4522ef0f83143c4803473d356160a3e877c2499c.png"
) )
} }

View File

@ -20,7 +20,7 @@ fun getPluginVersionType(): String {
tasks { tasks {
shadowJar { shadowJar {
archiveFileName.set("${project.name}-${getPluginVersion()}.jar") archiveFileName.set("${rootProject.name}-${getPluginVersion()}.jar")
listOf( listOf(
"org.bstats", "org.bstats",
@ -32,9 +32,9 @@ tasks {
modrinth { modrinth {
token.set(System.getenv("MODRINTH_TOKEN")) token.set(System.getenv("MODRINTH_TOKEN"))
projectId.set(project.name.toLowerCase()) projectId.set(rootProject.name.toLowerCase())
versionName.set("${project.name} ${getPluginVersion()}") versionName.set("${rootProject.name} ${getPluginVersion()}")
versionNumber.set(getPluginVersion()) versionNumber.set(getPluginVersion())
versionType.set(getPluginVersionType()) versionType.set(getPluginVersionType())
@ -58,11 +58,11 @@ tasks {
processResources { processResources {
filesMatching("plugin.yml") { filesMatching("plugin.yml") {
expand( expand(
"name" to project.name, "name" to rootProject.name,
"group" to project.group, "group" to project.group,
"version" to getPluginVersion(), "version" to getPluginVersion(),
"description" to project.description, "description" to project.description,
"website" to "https://modrinth.com/plugin/${project.name.toLowerCase()}" "website" to "https://modrinth.com/plugin/${rootProject.name.toLowerCase()}"
) )
} }
} }
@ -85,7 +85,7 @@ publishing {
publications { publications {
create<MavenPublication>("maven") { create<MavenPublication>("maven") {
groupId = "${project.group}" groupId = "${project.group}"
artifactId = project.name.toLowerCase() artifactId = rootProject.name.toLowerCase()
version = getPluginVersion() version = getPluginVersion()
from(components["java"]) from(components["java"])
} }

View File

@ -1,3 +1,5 @@
rootProject.name = extra["name"] as String
dependencyResolutionManagement { dependencyResolutionManagement {
includeBuild("build-logic") includeBuild("build-logic")
} }