Skip to content
Merged
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
6 changes: 1 addition & 5 deletions Common/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
plugins {
id 'org.spongepowered.gradle.vanilla' version '0.2.1-SNAPSHOT'
id "at.petra-k.PKSubprojPlugin"
}

pkSubproj {
platform "common"
id "at.petra-k.pkpcpbp.PKSubprojPlugin"
}

minecraft {
Expand Down
1 change: 1 addition & 0 deletions Common/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
platform=common
27 changes: 17 additions & 10 deletions Fabric/build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
plugins {
id 'fabric-loom' version "1.6-SNAPSHOT"
id "at.petra-k.PKSubprojPlugin"
id "at.petra-k.pkpcpbp.PKSubprojPlugin"
}

pkSubproj {
platform "fabric"
curseforgeJar remapJar.archiveFile
curseforgeJar = remapJar.archiveFile
curseforgeDependencies([
"paucal:0.6.0", "patchouli:1.20.1-80", "fabric-language-kotlin:1.9.4+kotlin.1.8.21",
"inline:1.20.1-1.0.1", "cloth-config:11.1.0",
"cardinal-components-api:5.2.1", "fabric-api:0.84"
"paucal:0.6.0",
"patchouli:1.20.1-80",
"fabric-language-kotlin:1.9.4+kotlin.1.8.21",
"inline:1.20.1-1.0.1",
"cloth-config:11.1.0",
"cardinal-components-api:5.2.1",
"fabric-api:0.84",
])
modrinthJar remapJar.archiveFile
modrinthJar = remapJar.archiveFile
modrinthDependencies([
"paucal:0.6.0", "patchouli:1.20.1-80", "fabric-language-kotlin:1.9.4+kotlin.1.8.21",
"inline:1.20.1-1.0.1", "cloth-config:11.1.0",
"cardinal-components-api:5.2.1", "fabric-api:0.84"
"paucal:0.6.0",
"patchouli:1.20.1-80",
"fabric-language-kotlin:1.9.4+kotlin.1.8.21",
"inline:1.20.1-1.0.1",
"cloth-config:11.1.0",
"cardinal-components-api:5.2.1",
"fabric-api:0.84",
])
}

Expand Down
2 changes: 2 additions & 0 deletions Fabric/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
platform=fabric

fabricVersion=0.85.0+1.20.1
fabricLoaderVersion=0.14.21
fabricLanguageKotlinVersion=1.9.4+kotlin.1.8.21
Expand Down
17 changes: 11 additions & 6 deletions Forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,26 @@ plugins {
id "java"
id "maven-publish"

id "at.petra-k.PKSubprojPlugin"
id "at.petra-k.pkpcpbp.PKSubprojPlugin"
}

apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'org.spongepowered.mixin'

pkSubproj {
platform "forge"
curseforgeJar jar.archiveFile
curseforgeJar = jar.archiveFile
curseforgeDependencies([
"paucal:0.6.0", "patchouli:1.20.1-80", "caelus:3.1.0+1.20", "inline:1.20.1-1.0.1"
"paucal:0.6.0",
"patchouli:1.20.1-80",
"caelus:3.1.0+1.20",
"inline:1.20.1-1.0.1",
])
modrinthJar jar.archiveFile
modrinthJar = jar.archiveFile
modrinthDependencies([
"paucal:0.6.0", "patchouli:1.20.1-80", "caelus:3.1.0+1.20", "inline:1.20.1-1.0.1"
"paucal:0.6.0",
"patchouli:1.20.1-80",
"caelus:3.1.0+1.20",
"inline:1.20.1-1.0.1",
])
}

Expand Down
2 changes: 2 additions & 0 deletions Forge/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
platform=forge

forgeVersion=47.1.47

kotlinForForgeVersion=4.3.0
Expand Down
80 changes: 58 additions & 22 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import at.petrak.pkpcpbp.MiscUtil

buildscript {
repositories {
mavenCentral()
Expand All @@ -17,42 +19,87 @@ plugins {
// Also it looks like property lookups don't work this early
id 'fabric-loom' version '1.6-SNAPSHOT' apply false

id("at.petra-k.PKPlugin") version "0.1.0-pre-87"
id("at.petra-k.PKSubprojPlugin") version "0.1.0-pre-87" 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
}

repositories {
mavenCentral()
}

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 = 17
modInfo {
modID(project.modID)
mcVersion(project.minecraftVersion)
modVersion(project.modVersion)
modID = project.modID
mcVersion = project.minecraftVersion
modVersion = project.modVersion
}
curseforgeInfo {
id 569849
stability "beta"
token(System.getenv("CURSEFORGE_TOKEN"))
id = 569849
stability = "beta"
token = System.getenv("CURSEFORGE_TOKEN")
}
modrinthInfo {
id "nTW3yKrm"
stability "beta"
token(System.getenv("MODRINTH_TOKEN"))
id = "nTW3yKrm"
stability = "beta"
token = System.getenv("MODRINTH_TOKEN")
}
}

subprojects {
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'maven-publish'
apply plugin: 'at.petra-k.pkpcpbp.PKSubprojPlugin'
apply plugin: 'at.petra-k.pkpcpbp.PKJson5Plugin'

group = "at.petra-k.$modID"
base.archivesName = "$modID-$platform-$minecraftVersion"
version = modVersion

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

pkSubproj {
platform = project.platform
// this value is only checked if we run a publish task and the commit already starts with [Release]
// so we should be fine to just leave it enabled
pkPublish = true
artifactId = base.archivesName.get()
versionDisplayName = "$platform-$minecraftVersion-$modVersion"
}

pkJson5 {
autoProcessJson5 = true
autoProcessJson5Flattening = true
}

tasks.withType(JavaCompile).configureEach {
it.options.encoding = 'UTF-8'
it.options.release = 17
}

compileKotlin {
kotlinOptions {
jvmTarget = "17"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "17"
}
}

// Disables Gradle's custom module metadata from being published to maven. The
// metadata includes mapped dependencies which are not reasonably consumable by
// other mod developers.
Expand Down Expand Up @@ -85,17 +132,6 @@ allprojects {
javadoc.options.addStringOption('Xdoclint:none', '-quiet')
}

compileKotlin {
kotlinOptions {
jvmTarget = "17"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "17"
}
}

tasks.register("runAllDatagen") {
dependsOn ":Forge:runXplatDatagen"
dependsOn ":Forge:runForgeDatagen"
Expand Down
Loading