Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 48 additions & 24 deletions Fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,55 @@ architectury {
fabric()
}

// FIXME: update dependencies/versions before releasing 0.12
pkSubproj {
pkPublish = true
curseforgeJar = remapJar.archiveFile
curseforgeDependencies([
"paucal",
"patchouli",
"fabric-language-kotlin",
"inline",
"cloth-config",
"cardinal-components-api",
"fabric-api",
])
modrinthJar = remapJar.archiveFile
modrinthDependencies([
"paucal:dabyDTwJ", // 0.6.0-fabric
"patchouli:1.20.1-80-fabric",
"fabric-language-kotlin:1.13.7+kotlin.2.2.21",
"inline:1.20.1-1.2.2-fabric",
"cloth-config:11.1.106+fabric",
"cardinal-components-api:5.2.1",
"fabric-api:0.84.0+1.20.1",
])
}
publishMods {
// for Fabric 1.21.11 and below
file = remapJar.archiveFile
modLoaders.add("fabric")
curseforge{
requires(
"paucal",
"patchouli",
"fabric-language-kotlin",
"inline",
"cloth-config",
"cardinal-components-api",
"fabric-api",
)
}
modrinth{
requires {
slug = "paucal"
version = "6xwATRVY" // 0.7.0 fabric ver
}
requires {
slug = "patchouli"
version = "1.21-88-fabric"
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: some unnecessary blank lines here

requires {
slug = "fabric-language-kotlin"
version = fabricLanguageKotlinVersion
}

requires {
slug = "inline"
version = "1.21.1-1.2.2-fabric"
}

requires {
slug = "cloth-config"
version = clothConfigVersion + "+fabric"
}
requires {
slug = "cardinal-components-api"
version = cardinalComponentsVersion
}
requires {
slug = "fabric-api"
version = fabricVersion
}
}
}

loom {
mixin.defaultRefmapName = "hexcasting.mixins.refmap.json"
Expand Down
24 changes: 21 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
#!/usr/bin/env groovy

RELEASE_BRANCHES = ["main", "1.21"]

pipeline {
agent any
tools {
jdk "jdk-21"
}
parameters {
booleanParam(
name: "PUBLISH_CURSEFORGE_AND_MODRINTH",
description: "Publish to CurseForge and modrinth",
defaultValue: false,
)
booleanParam(
name: "FORMAL_RELEASE",
description: "decides if is a formal release (without -pre)",
defaultValue: false,
)
}
environment {
discordWebhook = credentials('discordWebhook')
CURSEFORGE_TOKEN = credentials('curseforgeApiKey')
MODRINTH_TOKEN = credentials('modrinthApiKey')
FORMAL_RELEASE = "${params.FORMAL_RELEASE ? 'true' : 'false'}"
}
stages {
stage('Clean') {
Expand Down Expand Up @@ -43,23 +58,26 @@ pipeline {
stage('Publish') {
when {
allOf {
branch 'main'
expression { env.BRANCH_NAME in RELEASE_BRANCHES }
not { changeRequest() }
}
}
stages {
stage('Deploy Previews') {
steps {
echo 'Deploying previews to various places'
sh './gradlew publish publishToDiscord'
sh './gradlew publish announceDiscord'
}
}
stage('Deploy releases') {
when {
expression { params.CURSEFORGE_AND_MODRINTH}
}
steps {
echo 'Maybe deploy releases'
sh './gradlew publishCurseforge publishModrinth'
}
}
}}
}
}
}
Expand Down
49 changes: 31 additions & 18 deletions Neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,36 @@ architectury {
neoForge()
}

// FIXME: update dependencies/versions before releasing 0.12
pkSubproj {
pkPublish = true
curseforgeJar = jar.archiveFile
curseforgeDependencies([
"paucal",
"patchouli",
"caelus",
"inline",
])
modrinthJar = jar.archiveFile
modrinthDependencies([
"paucal:HyBiJPtT", // 0.6.0-forge
"patchouli:1.20.1-80-forge",
"caelus:3.1.0+1.20",
"inline:1.20.1-1.0.1-forge",
])
publishMods {
file = jar.archiveFile
modLoaders.add("neoForge")
curseforge{
requires(
"paucal",
"patchouli",
"caelus",
"inline"
)
}
modrinth{
requires {
slug = "paucal"
version = "zgpdzVKd"
platform = "neoforge"
}
requires {
slug = "patchouli"
version = "1.21-88-neoforge"
}
requires {
slug = "caelus"
version = "KsfI4QsR" // 7.0.1+1.21.1 neoforge ver
}
requires {
slug = "inline"
version = "1.21.1-1.2.2-neoforge"
}
}
}

configurations {
Expand Down Expand Up @@ -55,7 +68,7 @@ repositories {
}

maven { url = "https://maven.neoforged.net/releases/" }
// paucal and patchi
// paucal and patchouli
maven { url = 'https://maven.blamejared.com' }
maven {
name = "Curios"
Expand Down
68 changes: 31 additions & 37 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import at.petrak.pkpcpbp.MiscUtil

plugins {
// used for something??
id 'dev.architectury.loom' version '1.13-SNAPSHOT' apply false
Expand All @@ -14,63 +12,37 @@ plugins {
// Also it looks like property lookups don't work this early
id 'fabric-loom' version '1.9+' apply false

id("at.petra-k.pkpcpbp.PKPlugin") version "0.2.0-pre-104"
id("at.petra-k.pkpcpbp.PKSubprojPlugin") version "0.2.0-pre-104" apply false
id("at.petra-k.pkpcpbp.PKJson5Plugin") version "0.2.0-pre-104" apply false
id "me.modmuss50.mod-publish-plugin"
}

architectury {
minecraft = project.minecraftVersion
}

pkpcpbp {
// if something goes wrong in CI, make sure we can see the logs to figure out why
superDebugInfo = System.getenv("CI") != null
// we set the maven coordinates manually in the subprojects block
doProjectMetadata = false
setupJarMetadata = true
setupMavenMetadata = true
javaVersion = 21
modInfo {
modID = project.modID
mcVersion = project.minecraftVersion
modVersion = project.modVersion
}
curseforgeInfo {
id = 569849
stability = "beta"
token = System.getenv("CURSEFORGE_TOKEN")
}
modrinthInfo {
id = "nTW3yKrm"
stability = "beta"
token = System.getenv("MODRINTH_TOKEN")
}
}

subprojects {
subprojects { subproject ->
apply plugin: 'dev.architectury.loom'
apply plugin: 'architectury-plugin'
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'maven-publish'
apply plugin: 'at.petra-k.pkpcpbp.PKSubprojPlugin'
apply plugin: 'at.petra-k.pkpcpbp.PKJson5Plugin'

if(subproject.path != ":Common") {
apply plugin: 'me.modmuss50.mod-publish-plugin'
}
group = "at.petra-k.$modID"
base.archivesName = "$modID-$platform-$minecraftVersion"
version = modVersion

def isRelease = MiscUtil.isRelease(MiscUtil.getMostRecentPush(project))
def isRelease = System.getenv("FORMAL_RELEASE") ?
System.getenv("FORMAL_RELEASE").toBoolean() : false
def buildNumber = System.getenv("BUILD_NUMBER")
if (!isRelease && buildNumber != null) {
version += "-pre-$buildNumber"
}

pkSubproj {
platform = project.platform
artifactId = base.archivesName.get()
versionDisplayName = "$platform-$minecraftVersion-$modVersion"
kotlin {
jvmToolchain(21)
}

pkJson5 {
Expand Down Expand Up @@ -132,6 +104,28 @@ subprojects {
}
}
}
if(subproject.path != ":Common") {
publishMods {
type = BETA
changelog = ""

modrinth {
accessToken = providers.environmentVariable("MODRINTH_TOKEN")
projectId = "nTW3yKrm"
minecraftVersions.add("1.21.1")
}
curseforge {
accessToken = providers.environmentVariable("CURSEFORGE_TOKEN")
projectId = "569849"
minecraftVersions.add("1.21.1")
client = true
server = true
}
discord {
webhookUrl = providers.environmentVariable("discordWebhook")
}
}
}
}

allprojects {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pluginManagement {

plugins {
id "org.jetbrains.kotlin.jvm" version kotlinVersion
id "me.modmuss50.mod-publish-plugin" version "2.1.1"
}
}

Expand Down