Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci-skip] Update build script things
[ci-skip] Update build script things
- Loading branch information
Showing
20 changed files
with
116 additions
and
340 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ on: | |
push: | ||
branches: | ||
- main | ||
#- dev | ||
workflow_dispatch: | ||
inputs: | ||
logLevel: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,72 @@ | ||
import com.lordcodes.turtle.shellRun | ||
import task.WebhookExtension | ||
import java.awt.Color | ||
|
||
plugins { | ||
id("crazyenvoys.root-plugin") | ||
|
||
id("featherpatcher") version "8ef64e4" | ||
} | ||
|
||
val releaseUpdate = Color(27, 217, 106) | ||
val betaUpdate = Color(255, 163, 71) | ||
val changeLogs = Color(37, 137, 204) | ||
|
||
val beta = settings.versions.beta.get().toBoolean() | ||
val extension = settings.versions.extension.get() | ||
|
||
val color = if (beta) betaUpdate else releaseUpdate | ||
val repo = if (beta) "beta" else "releases" | ||
|
||
val url = if (beta) "https://ci.crazycrew.us/job/${rootProject.name}/" else "https://modrinth.com/$extension/${rootProject.name.lowercase()}/versions" | ||
val download = if (beta) "https://ci.crazycrew.us/job/${rootProject.name}/" else "https://modrinth.com/$extension/${rootProject.name.lowercase()}/version/${rootProject.version}" | ||
val msg = if (beta) "New version of ${rootProject.name} is ready!" else "New version of ${rootProject.name} is ready! <@&929463450214735912>" | ||
|
||
val hash = shellRun("git", listOf("rev-parse", "--short", "HEAD")) | ||
|
||
rootProject.version = if (beta) hash else "1.4.20.4" | ||
|
||
webhook { | ||
this.avatar("https://en.gravatar.com/avatar/${WebhookExtension.Gravatar().md5Hex("no-reply@ryderbelserion.com")}.jpeg") | ||
|
||
this.username("Ryder Belserion") | ||
|
||
this.content("New version of ${rootProject.name} is ready! <@&1029922295210311681>") | ||
this.content(msg) | ||
|
||
this.embeds { | ||
this.embed { | ||
this.color(color) | ||
|
||
this.fields { | ||
this.field( | ||
"Version ${rootProject.version}", | ||
"Download Link: https://modrinth.com/$extension/${rootProject.name.lowercase()}/version/${rootProject.version}" | ||
"Download: ", | ||
url | ||
) | ||
|
||
this.field( | ||
"API Update", | ||
"Version ${rootProject.version} has been pushed to https://repo.crazycrew.us/#/$repo" | ||
"API: ", | ||
"https://repo.crazycrew.us/#/$repo/${rootProject.group.toString().replace(".", "/")}/${rootProject.name.lowercase()}-api/${rootProject.version}" | ||
) | ||
} | ||
|
||
this.author( | ||
rootProject.name, | ||
"https://modrinth.com/$extension/${rootProject.name.lowercase()}/versions", | ||
"https://cdn-raw.modrinth.com/data/EMORKQjj/1cf7fffa9bf92d1bc292983dc320984cc764b51e.png" | ||
"${rootProject.name} | Version ${rootProject.version}", | ||
url, | ||
"https://raw.githubusercontent.com/RyderBelserion/assets/main/crazycrew/png/${rootProject.name}Website.png" | ||
) | ||
} | ||
|
||
this.embed { | ||
this.color(changeLogs) | ||
|
||
this.title("What changed?") | ||
|
||
this.description(""" | ||
Changes: | ||
» N/A | ||
""".trimIndent()) | ||
} | ||
} | ||
|
||
this.url("DISCORD_WEBHOOK") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
dependencyResolutionManagement { | ||
versionCatalogs { | ||
create("libs") { | ||
from(files("../gradle/libs.versions.toml")) | ||
} | ||
} | ||
|
||
repositories.gradlePluginPortal() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 7 additions & 24 deletions
31
buildSrc/src/main/kotlin/crazyenvoys.root-plugin.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,35 @@ | ||
import task.ReleaseWebhook | ||
import task.WebhookExtension | ||
|
||
plugins { | ||
`java-library` | ||
|
||
`maven-publish` | ||
|
||
id("com.github.hierynomus.license") | ||
|
||
id("com.github.johnrengelman.shadow") | ||
} | ||
|
||
repositories { | ||
maven("https://repo.triumphteam.dev/snapshots") | ||
|
||
maven("https://libraries.minecraft.net") | ||
|
||
maven("https://repo.crazycrew.us/api") | ||
|
||
maven("https://jitpack.io") | ||
|
||
mavenCentral() | ||
mavenLocal() | ||
} | ||
|
||
java { | ||
toolchain.languageVersion.set(JavaLanguageVersion.of("17")) | ||
} | ||
|
||
tasks { | ||
// Creating the extension to be available on the root gradle | ||
val webhookExtension = extensions.create("webhook", WebhookExtension::class) | ||
|
||
// Register the task | ||
register<ReleaseWebhook>("webhook") { | ||
extension = webhookExtension | ||
} | ||
|
||
compileJava { | ||
options.encoding = Charsets.UTF_8.name() | ||
options.release.set(17) | ||
} | ||
} | ||
|
||
license { | ||
header = rootProject.file("LICENSE") | ||
encoding = "UTF-8" | ||
|
||
mapping("java", "JAVADOC_STYLE") | ||
javadoc { | ||
options.encoding = Charsets.UTF_8.name() | ||
} | ||
|
||
include("**/*.java") | ||
processResources { | ||
filteringCharset = Charsets.UTF_8.name() | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.