Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c69fb69
commit 9d8856f
Showing
64 changed files
with
276 additions
and
1,038 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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="release" type="GradleRunConfiguration" factoryName="Gradle"> | ||
<ExternalSystemSettings> | ||
<option name="executionName" /> | ||
<option name="externalProjectPath" value="$PROJECT_DIR$" /> | ||
<option name="externalSystemIdString" value="GRADLE" /> | ||
<option name="scriptParameters" value="" /> | ||
<option name="taskDescriptions"> | ||
<list /> | ||
</option> | ||
<option name="taskNames"> | ||
<list> | ||
<option value="modrinth" /> | ||
<option value="publish" /> | ||
<option value="webhook" /> | ||
</list> | ||
</option> | ||
<option name="vmOptions" /> | ||
</ExternalSystemSettings> | ||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess> | ||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess> | ||
<DebugAllEnabled>false</DebugAllEnabled> | ||
<ForceTestExec>false</ForceTestExec> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
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,70 +1,59 @@ | ||
import task.WebhookExtension | ||
import java.awt.Color | ||
|
||
plugins { | ||
id("crazyenvoys.root-plugin") | ||
id("paper-plugin") | ||
id("library-plugin") | ||
|
||
id("featherpatcher") version "0.0.0.2" | ||
id("xyz.jpenilla.run-paper") version "2.0.1" | ||
} | ||
|
||
val releaseUpdate = Color(27, 217, 106) | ||
val betaUpdate = Color(255, 163, 71) | ||
val changeLogs = Color(37, 137, 204) | ||
dependencies { | ||
compileOnly(libs.placeholder.api) | ||
compileOnly(libs.itemsadder.api) | ||
|
||
val beta = settings.versions.beta.get().toBoolean() | ||
val extension = settings.versions.extension.get() | ||
compileOnly(libs.cmi.api) | ||
compileOnly(libs.cmi.lib) | ||
|
||
val color = if (beta) betaUpdate else releaseUpdate | ||
val repo = if (beta) "beta" else "releases" | ||
compileOnly(libs.holographic.displays) | ||
compileOnly(libs.decent.holograms) | ||
|
||
val msg = "New version of ${rootProject.name} is ready! <@&929463450214735912>" | ||
compileOnly(libs.worldguard.api) | ||
|
||
rootProject.version = "1.4.20.5" | ||
implementation(libs.bstats.bukkit) | ||
|
||
val download = "https://modrinth.com/$extension/${rootProject.name.lowercase()}/version/${rootProject.version}" | ||
implementation(libs.triumph.cmds) | ||
|
||
webhook { | ||
this.avatar("https://en.gravatar.com/avatar/${WebhookExtension.Gravatar().md5Hex("no-reply@ryderbelserion.com")}.jpeg") | ||
implementation(libs.nbt.api) | ||
} | ||
|
||
this.username("Ryder Belserion") | ||
tasks { | ||
reobfJar { | ||
val file = File("$rootDir/jars") | ||
|
||
this.content(msg) | ||
if (!file.exists()) file.mkdirs() | ||
|
||
this.embeds { | ||
this.embed { | ||
this.color(color) | ||
outputJar.set(layout.buildDirectory.file("$file/${rootProject.name}-${rootProject.version}.jar")) | ||
} | ||
|
||
this.fields { | ||
this.field( | ||
"Download: ", | ||
download | ||
) | ||
shadowJar { | ||
listOf( | ||
"de.tr7zw.changeme.nbtapi", | ||
"dev.triumphteam", | ||
"org.bstats" | ||
).forEach { pack -> relocate(pack, "${rootProject.group}.$pack") } | ||
} | ||
|
||
this.field( | ||
"API: ", | ||
"https://repo.crazycrew.us/#/$repo/${rootProject.group.toString().replace(".", "/")}/${rootProject.name.lowercase()}-api/${rootProject.version}" | ||
) | ||
} | ||
runServer { | ||
minecraftVersion("1.19.4") | ||
} | ||
|
||
this.author( | ||
"${rootProject.name} | Version ${rootProject.version}", | ||
download, | ||
"https://raw.githubusercontent.com/RyderBelserion/assets/main/crazycrew/png/${rootProject.name}Website.png" | ||
processResources { | ||
filesMatching("plugin.yml") { | ||
expand( | ||
"name" to rootProject.name, | ||
"group" to rootProject.group, | ||
"version" to rootProject.version, | ||
"description" to rootProject.description, | ||
"website" to "https://modrinth.com/plugin/${rootProject.name.lowercase()}" | ||
) | ||
} | ||
|
||
this.embed { | ||
this.color(changeLogs) | ||
|
||
this.title("What changed?") | ||
|
||
this.description(""" | ||
> | ||
Full Changelog -> $download | ||
""".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
35 changes: 0 additions & 35 deletions
35
buildSrc/src/main/kotlin/crazyenvoys.paper-plugin.gradle.kts
This file was deleted.
Oops, something went wrong.
35 changes: 0 additions & 35 deletions
35
buildSrc/src/main/kotlin/crazyenvoys.root-plugin.gradle.kts
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,123 @@ | ||
import java.awt.Color | ||
import java.io.ByteArrayOutputStream | ||
import java.io.File | ||
|
||
plugins { | ||
id("root-plugin") | ||
|
||
id("featherpatcher") | ||
id("com.modrinth.minotaur") | ||
} | ||
|
||
val isBeta = false | ||
val repo = if (isBeta) "beta" else "releases" | ||
|
||
val type = if (isBeta) "beta" else "release" | ||
val otherType = if (isBeta) "Beta" else "Release" | ||
|
||
val msg = "New version of ${rootProject.name} is ready! <@&929463452232192063>" | ||
|
||
val downloads = """ | ||
https://modrinth.com/plugin/${rootProject.name.lowercase()}/version/${rootProject.version} | ||
""".trimIndent() | ||
|
||
// The commit id for the "main" branch prior to merging a pull request. | ||
//val start = "7684e1a" | ||
|
||
// The commit id AFTER merging the pull request so the last commit before you release. | ||
//val end = "ddd1fb9" | ||
|
||
//val commitLog = getGitHistory().joinToString(separator = "") { formatGitLog(it) } | ||
|
||
val desc = """ | ||
# Release ${rootProject.version} | ||
### Changes | ||
* WorldGuard no longer stops you from claiming envoys. | ||
### Commits | ||
<details> | ||
<summary>Other</summary> | ||
</details> | ||
As always, report any bugs @ https://github.com/Crazy-Crew/${rootProject.name}/issues | ||
""".trimIndent() | ||
|
||
val versions = listOf( | ||
"1.19.4" | ||
) | ||
|
||
/*fun getGitHistory(): List<String> { | ||
val output: String = ByteArrayOutputStream().use { outputStream -> | ||
project.exec { | ||
executable("git") | ||
args("log", "$start..$end", "--format=format:%h %s") | ||
standardOutput = outputStream | ||
} | ||
outputStream.toString() | ||
} | ||
return output.split("\n") | ||
} | ||
fun formatGitLog(commitLog: String): String { | ||
val hash = commitLog.take(7) | ||
val message = commitLog.substring(8) // Get message after commit hash + space between | ||
return "[$hash](https://github.com/Crazy-Crew/${rootProject.name}/commit/$hash) $message<br>" | ||
} | ||
*/ | ||
|
||
tasks { | ||
modrinth { | ||
token.set(System.getenv("MODRINTH_TOKEN")) | ||
projectId.set(rootProject.name.lowercase()) | ||
|
||
versionName.set("${rootProject.name} ${rootProject.version}") | ||
versionNumber.set(rootProject.version.toString()) | ||
|
||
versionType.set(type) | ||
|
||
val file = File("$rootDir/jars") | ||
if (!file.exists()) file.mkdirs() | ||
|
||
uploadFile.set(layout.buildDirectory.file("$file/${rootProject.name}-${rootProject.version}.jar")) | ||
|
||
autoAddDependsOn.set(true) | ||
|
||
gameVersions.addAll(versions) | ||
|
||
loaders.addAll(listOf("paper", "purpur")) | ||
|
||
changelog.set(desc) | ||
} | ||
} | ||
|
||
publishing { | ||
repositories { | ||
val repo = if (isBeta) "beta" else "releases" | ||
maven("https://repo.crazycrew.us/$repo") { | ||
name = "crazycrew" | ||
//credentials(PasswordCredentials::class) | ||
|
||
credentials { | ||
username = System.getenv("REPOSITORY_USERNAME") | ||
password = System.getenv("REPOSITORY_PASSWORD") | ||
} | ||
} | ||
} | ||
|
||
publications { | ||
create<MavenPublication>("maven") { | ||
groupId = rootProject.group.toString() | ||
artifactId = "${rootProject.name.lowercase()}-api" | ||
version = rootProject.version.toString() | ||
|
||
from(components["java"]) | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
plugins { | ||
id("root-plugin") | ||
|
||
id("com.github.johnrengelman.shadow") | ||
|
||
id("io.papermc.paperweight.userdev") | ||
} | ||
|
||
repositories { | ||
maven("https://repo.papermc.io/repository/maven-public/") | ||
} | ||
|
||
dependencies { | ||
paperweight.paperDevBundle("1.19.4-R0.1-SNAPSHOT") | ||
} | ||
|
||
tasks { | ||
assemble { | ||
dependsOn(reobfJar) | ||
} | ||
} |
Oops, something went wrong.