move to pkpcpbp, let's see if this does the gh
This commit is contained in:
parent
213f5907e0
commit
58cda6994f
|
@ -1,8 +1,11 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'org.spongepowered.gradle.vanilla' version '0.2.1-SNAPSHOT'
|
id 'org.spongepowered.gradle.vanilla' version '0.2.1-SNAPSHOT'
|
||||||
|
id "at.petra-k.PKSubprojPlugin"
|
||||||
}
|
}
|
||||||
|
|
||||||
archivesBaseName = getArtifactID("common")
|
pkSubproj {
|
||||||
|
platform "common"
|
||||||
|
}
|
||||||
|
|
||||||
minecraft {
|
minecraft {
|
||||||
version(minecraftVersion)
|
version(minecraftVersion)
|
||||||
|
@ -12,11 +15,6 @@ minecraft {
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|
||||||
// If you have mod jar dependencies in ./libs, you can declare them as a repository like so:
|
|
||||||
// flatDir {
|
|
||||||
// dir 'libs'
|
|
||||||
// }
|
|
||||||
|
|
||||||
maven { url 'https://maven.blamejared.com' }
|
maven { url 'https://maven.blamejared.com' }
|
||||||
|
|
||||||
maven {
|
maven {
|
||||||
|
@ -56,5 +54,3 @@ processResources {
|
||||||
expand buildProps
|
expand buildProps
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setupJar(this)
|
|
||||||
|
|
|
@ -1,8 +1,15 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'fabric-loom' // version "1.0-SNAPSHOT"
|
id 'fabric-loom' // version "1.0-SNAPSHOT"
|
||||||
|
id "at.petra-k.PKSubprojPlugin"
|
||||||
}
|
}
|
||||||
|
|
||||||
archivesBaseName = getArtifactID("fabric")
|
pkSubproj {
|
||||||
|
platform "fabric"
|
||||||
|
curseforgeJar remapJar.archiveFile
|
||||||
|
curseforgeDependencies[]
|
||||||
|
modrinthJar remapJar.archiveFile
|
||||||
|
modrinthDependencies[]
|
||||||
|
}
|
||||||
|
|
||||||
loom {
|
loom {
|
||||||
mixin.defaultRefmapName = "hexcasting.mixins.refmap.json"
|
mixin.defaultRefmapName = "hexcasting.mixins.refmap.json"
|
||||||
|
@ -34,30 +41,24 @@ loom {
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|
||||||
|
// paucal and patchi
|
||||||
|
maven { url = 'https://maven.blamejared.com' }
|
||||||
|
// modmenu and clothconfig
|
||||||
maven { url "https://maven.shedaniel.me/" }
|
maven { url "https://maven.shedaniel.me/" }
|
||||||
maven {
|
maven { url 'https://ladysnake.jfrog.io/artifactory/mods' }
|
||||||
url 'https://ladysnake.jfrog.io/artifactory/mods'
|
// Entity reach
|
||||||
}
|
maven { url "https://maven.jamieswhiteshirt.com/libs-release/" }
|
||||||
maven {
|
|
||||||
name "entity reach"
|
|
||||||
url "https://maven.jamieswhiteshirt.com/libs-release/"
|
|
||||||
}
|
|
||||||
maven { url "https://mvn.devos.one/snapshots/" }
|
maven { url "https://mvn.devos.one/snapshots/" }
|
||||||
maven {
|
maven { url = "https://maven.terraformersmc.com/releases/" }
|
||||||
name = "TerraformersMC"
|
|
||||||
url = "https://maven.terraformersmc.com/releases/"
|
|
||||||
}
|
|
||||||
exclusiveContent {
|
exclusiveContent {
|
||||||
forRepository {
|
forRepository {
|
||||||
maven {
|
maven { url = "https://api.modrinth.com/maven" }
|
||||||
name = "Modrinth"
|
|
||||||
url = "https://api.modrinth.com/maven"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
filter {
|
|
||||||
includeGroup "maven.modrinth"
|
|
||||||
}
|
}
|
||||||
|
filter { includeGroup "maven.modrinth" }
|
||||||
}
|
}
|
||||||
|
// pehkui
|
||||||
|
maven { url = "https://jitpack.io" }
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
@ -136,5 +137,3 @@ processResources {
|
||||||
expand "version": project.version
|
expand "version": project.version
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setupJar(this)
|
|
||||||
|
|
|
@ -13,16 +13,77 @@ buildscript {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id "java"
|
||||||
|
id "maven-publish"
|
||||||
|
|
||||||
|
id "at.petra-k.PKSubprojPlugin"
|
||||||
|
}
|
||||||
|
|
||||||
apply plugin: 'net.minecraftforge.gradle'
|
apply plugin: 'net.minecraftforge.gradle'
|
||||||
apply plugin: 'org.spongepowered.mixin'
|
apply plugin: 'org.spongepowered.mixin'
|
||||||
|
|
||||||
archivesBaseName = getArtifactID("forge")
|
|
||||||
|
|
||||||
// Adds KFF as dependency and Kotlin libs to the runtime classpath
|
// Adds KFF as dependency and Kotlin libs to the runtime classpath
|
||||||
// If you already know how to add the Kotlin plugin to Gradle, this is the only line you need for KFF
|
// If you already know how to add the Kotlin plugin to Gradle, this is the only line you need for KFF
|
||||||
apply from: "https://raw.githubusercontent.com/thedarkcolour/KotlinForForge/site/thedarkcolour/kotlinforforge/gradle/kff-" +
|
apply from: "https://raw.githubusercontent.com/thedarkcolour/KotlinForForge/site/thedarkcolour/kotlinforforge/gradle/kff-" +
|
||||||
"${kotlinForForgeVersion}.gradle"
|
"${kotlinForForgeVersion}.gradle"
|
||||||
|
|
||||||
|
pkSubproj {
|
||||||
|
platform "forge"
|
||||||
|
curseforgeJar jar.archiveFile
|
||||||
|
curseforgeDependencies[]
|
||||||
|
modrinthJar jar.archiveFile
|
||||||
|
modrinthDependencies[]
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
|
||||||
|
maven {
|
||||||
|
// location of the maven that hosts JEI files
|
||||||
|
name = "Progwml6 maven"
|
||||||
|
url = "https://dvs1.progwml6.com/files/maven/"
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
// location of a maven mirror for JEI files, as a fallback
|
||||||
|
name = "ModMaven"
|
||||||
|
url = "https://modmaven.dev"
|
||||||
|
}
|
||||||
|
// caelus elytra
|
||||||
|
maven { url = "https://maven.theillusivec4.top" }
|
||||||
|
// pehkui
|
||||||
|
maven { url = "https://jitpack.io" }
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
minecraft "net.minecraftforge:forge:${minecraftVersion}-${forgeVersion}"
|
||||||
|
compileOnly project(":Common")
|
||||||
|
|
||||||
|
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
|
||||||
|
|
||||||
|
compileOnly fg.deobf("at.petra-k.paucal:paucal-forge-$minecraftVersion:$paucalVersion")
|
||||||
|
runtimeOnly fg.deobf("at.petra-k.paucal:paucal-forge-$minecraftVersion:$paucalVersion")
|
||||||
|
compileOnly fg.deobf("vazkii.patchouli:Patchouli:$minecraftVersion-$patchouliVersion")
|
||||||
|
runtimeOnly fg.deobf("vazkii.patchouli:Patchouli:$minecraftVersion-$patchouliVersion")
|
||||||
|
|
||||||
|
// aughh
|
||||||
|
testCompileOnly fg.deobf("at.petra-k.paucal:paucal-forge-$minecraftVersion:$paucalVersion")
|
||||||
|
testCompileOnly fg.deobf("vazkii.patchouli:Patchouli:$minecraftVersion-$patchouliVersion")
|
||||||
|
|
||||||
|
implementation fg.deobf("top.theillusivec4.caelus:caelus-forge:$caelusVersion")
|
||||||
|
|
||||||
|
// Optional interop
|
||||||
|
|
||||||
|
compileOnly fg.deobf("mezz.jei:jei-$minecraftVersion-common-api:$jeiVersion")
|
||||||
|
compileOnly fg.deobf("mezz.jei:jei-$minecraftVersion-forge-api:$jeiVersion")
|
||||||
|
runtimeOnly fg.deobf("mezz.jei:jei-$minecraftVersion-forge:$jeiVersion")
|
||||||
|
|
||||||
|
compileOnly fg.deobf("top.theillusivec4.curios:curios-forge:$minecraftVersion-$curiosVersion:api")
|
||||||
|
runtimeOnly fg.deobf("top.theillusivec4.curios:curios-forge:$minecraftVersion-$curiosVersion")
|
||||||
|
|
||||||
|
api fg.deobf("com.github.Virtuoel:Pehkui:${pehkuiVersion}-${minecraftVersion}-forge")
|
||||||
|
}
|
||||||
|
|
||||||
minecraft {
|
minecraft {
|
||||||
mappings channel: 'official', version: minecraftVersion
|
mappings channel: 'official', version: minecraftVersion
|
||||||
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
||||||
|
@ -100,61 +161,6 @@ minecraft {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
// Put repositories for dependencies here
|
|
||||||
// ForgeGradle automatically adds the Forge maven and Maven Central for you
|
|
||||||
|
|
||||||
// If you have mod jar dependencies in ./libs, you can declare them as a repository like so:
|
|
||||||
// flatDir {
|
|
||||||
// dir 'libs'
|
|
||||||
// }
|
|
||||||
|
|
||||||
maven {
|
|
||||||
// location of the maven that hosts JEI files
|
|
||||||
name = "Progwml6 maven"
|
|
||||||
url = "https://dvs1.progwml6.com/files/maven/"
|
|
||||||
}
|
|
||||||
maven {
|
|
||||||
// location of a maven mirror for JEI files, as a fallback
|
|
||||||
name = "ModMaven"
|
|
||||||
url = "https://modmaven.dev"
|
|
||||||
}
|
|
||||||
// caelus elytra
|
|
||||||
maven { url = "https://maven.theillusivec4.top" }
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
// Specify the version of Minecraft to use. If this is any group other than 'net.minecraft', it is assumed
|
|
||||||
// that the dep is a ForgeGradle 'patcher' dependency, and its patches will be applied.
|
|
||||||
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
|
|
||||||
minecraft "net.minecraftforge:forge:${minecraftVersion}-${forgeVersion}"
|
|
||||||
compileOnly project(":Common")
|
|
||||||
|
|
||||||
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
|
|
||||||
|
|
||||||
compileOnly fg.deobf("at.petra-k.paucal:paucal-forge-$minecraftVersion:$paucalVersion")
|
|
||||||
runtimeOnly fg.deobf("at.petra-k.paucal:paucal-forge-$minecraftVersion:$paucalVersion")
|
|
||||||
compileOnly fg.deobf("vazkii.patchouli:Patchouli:$minecraftVersion-$patchouliVersion")
|
|
||||||
runtimeOnly fg.deobf("vazkii.patchouli:Patchouli:$minecraftVersion-$patchouliVersion")
|
|
||||||
|
|
||||||
// aughh
|
|
||||||
testCompileOnly fg.deobf("at.petra-k.paucal:paucal-forge-$minecraftVersion:$paucalVersion")
|
|
||||||
testCompileOnly fg.deobf("vazkii.patchouli:Patchouli:$minecraftVersion-$patchouliVersion")
|
|
||||||
|
|
||||||
implementation fg.deobf("top.theillusivec4.caelus:caelus-forge:$caelusVersion")
|
|
||||||
|
|
||||||
// Optional interop
|
|
||||||
|
|
||||||
compileOnly fg.deobf("mezz.jei:jei-$minecraftVersion-common-api:$jeiVersion")
|
|
||||||
compileOnly fg.deobf("mezz.jei:jei-$minecraftVersion-forge-api:$jeiVersion")
|
|
||||||
runtimeOnly fg.deobf("mezz.jei:jei-$minecraftVersion-forge:$jeiVersion")
|
|
||||||
|
|
||||||
compileOnly fg.deobf("top.theillusivec4.curios:curios-forge:$minecraftVersion-$curiosVersion:api")
|
|
||||||
runtimeOnly fg.deobf("top.theillusivec4.curios:curios-forge:$minecraftVersion-$curiosVersion")
|
|
||||||
|
|
||||||
api fg.deobf("com.github.Virtuoel:Pehkui:${pehkuiVersion}-${minecraftVersion}-forge")
|
|
||||||
}
|
|
||||||
|
|
||||||
mixin {
|
mixin {
|
||||||
add sourceSets.main, "hexcasting.mixins.refmap.json"
|
add sourceSets.main, "hexcasting.mixins.refmap.json"
|
||||||
|
@ -214,5 +220,4 @@ processResources {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
jar.finalizedBy('reobfJar')
|
jar.finalizedBy('reobfJar')
|
||||||
setupJar(this)
|
|
138
build.gradle
138
build.gradle
|
@ -16,97 +16,29 @@ plugins {
|
||||||
// https://github.com/FabricMC/fabric-loom/issues/612#issuecomment-1198444120
|
// https://github.com/FabricMC/fabric-loom/issues/612#issuecomment-1198444120
|
||||||
// Also it looks like property lookups don't work this early
|
// Also it looks like property lookups don't work this early
|
||||||
id 'fabric-loom' version '1.0-SNAPSHOT' apply false
|
id 'fabric-loom' version '1.0-SNAPSHOT' apply false
|
||||||
}
|
|
||||||
|
|
||||||
import com.diluv.schoomp.Webhook
|
id("at.petra-k.PKPlugin") version "0.1.0-pre-63"
|
||||||
import com.diluv.schoomp.message.Message
|
id("at.petra-k.PKSubprojPlugin") version "0.1.0-pre-63" apply false
|
||||||
|
|
||||||
|
|
||||||
def isRelease() {
|
|
||||||
try {
|
|
||||||
def stdout = new ByteArrayOutputStream()
|
|
||||||
def gitHash = System.getenv('GIT_COMMIT')
|
|
||||||
def gitPrevHash = System.getenv('GIT_PREVIOUS_COMMIT')
|
|
||||||
def travisRange = System.getenv('TRAVIS_COMMIT_RANGE')
|
|
||||||
if (gitHash && gitPrevHash) {
|
|
||||||
exec {
|
|
||||||
commandLine 'git', 'log', '--pretty=tformat:- %s', '' + gitPrevHash + '...' + gitHash
|
|
||||||
standardOutput = stdout
|
|
||||||
}
|
|
||||||
return stdout.toString().toLowerCase().contains("[release")
|
|
||||||
} else if (travisRange) {
|
|
||||||
exec {
|
|
||||||
commandLine 'git', 'log', '--pretty=tformat:- %s', '' + travisRange
|
|
||||||
standardOutput = stdout
|
|
||||||
}
|
|
||||||
return stdout.toString().toLowerCase().contains("[release")
|
|
||||||
} else {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
} catch (ignored) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
String getArtifactID(String platform) {
|
|
||||||
return "${modID}-${platform}-${minecraftVersion}"
|
|
||||||
}
|
|
||||||
|
|
||||||
void setupJar(Object project) {
|
|
||||||
project.jar {
|
|
||||||
manifest {
|
|
||||||
attributes([
|
|
||||||
'Specification-Title' : modID,
|
|
||||||
'Specification-Vendor' : "petra-kat",
|
|
||||||
'Specification-Version' : project.jar.archiveVersion,
|
|
||||||
'Implementation-Title' : project.name,
|
|
||||||
'Implementation-Version' : project.jar.archiveVersion,
|
|
||||||
'Implementation-Vendor' : "petra-kat",
|
|
||||||
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
|
|
||||||
'Timestampe' : System.currentTimeMillis(),
|
|
||||||
'Built-On-Java' : "${System.getProperty('java.vm.version')} (${System.getProperty('java.vm.vendor')})",
|
|
||||||
'Build-On-Minecraft' : minecraftVersion
|
|
||||||
])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
project.publishing {
|
|
||||||
publications {
|
|
||||||
mavenJava(MavenPublication) {
|
|
||||||
groupId project.group
|
|
||||||
artifactId project.archivesBaseName
|
|
||||||
version project.version
|
|
||||||
from project.components.java
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
maven {
|
|
||||||
url "file://" + System.getenv("local_maven")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pkpcpbp {
|
||||||
|
modInfo {
|
||||||
|
modID(project.modID)
|
||||||
|
mcVersion(project.minecraftVersion)
|
||||||
|
modVersion(project.modVersion)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'kotlin'
|
apply plugin: 'kotlin'
|
||||||
apply plugin: 'maven-publish'
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
group = "at.petra-k.$modID" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
/*
|
||||||
version = "${modVersion}"
|
|
||||||
if (!isRelease() && System.getenv('BUILD_NUMBER') != null) {
|
|
||||||
version += "-pre-" + System.getenv('BUILD_NUMBER')
|
|
||||||
} else if (System.getenv('TAG_NAME') != null) {
|
|
||||||
version = System.getenv('TAG_NAME').substring(1)
|
|
||||||
println 'Version overridden to tag version ' + version
|
|
||||||
}
|
|
||||||
// archivesBaseName set in each gradle
|
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven { url "https://libraries.minecraft.net/" }
|
maven { url "https://libraries.minecraft.net/" }
|
||||||
|
|
||||||
|
@ -134,6 +66,7 @@ subprojects {
|
||||||
url = "https://jitpack.io"
|
url = "https://jitpack.io"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
tasks.withType(JavaCompile).configureEach {
|
tasks.withType(JavaCompile).configureEach {
|
||||||
|
@ -174,50 +107,3 @@ compileTestKotlin {
|
||||||
jvmTarget = "17"
|
jvmTarget = "17"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def getGitChangelog = { ->
|
|
||||||
try {
|
|
||||||
def stdout = new ByteArrayOutputStream()
|
|
||||||
def gitHash = System.getenv('GIT_COMMIT')
|
|
||||||
def gitPrevHash = System.getenv('GIT_PREVIOUS_COMMIT')
|
|
||||||
def travisRange = System.getenv('TRAVIS_COMMIT_RANGE')
|
|
||||||
if (gitHash && gitPrevHash) {
|
|
||||||
exec {
|
|
||||||
commandLine 'git', 'log', '--pretty=tformat:> - %s', '' + gitPrevHash + '...' + gitHash
|
|
||||||
standardOutput = stdout
|
|
||||||
}
|
|
||||||
return stdout.toString().trim()
|
|
||||||
} else if (travisRange) {
|
|
||||||
exec {
|
|
||||||
commandLine 'git', 'log', '--pretty=tformat:> - %s', '' + travisRange
|
|
||||||
standardOutput = stdout
|
|
||||||
}
|
|
||||||
return stdout.toString().trim()
|
|
||||||
} else {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
} catch (ignored) {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task sendWebhook {
|
|
||||||
doLast {
|
|
||||||
try {
|
|
||||||
if (System.getenv('discordWebhook') == null || System.getenv("BUILD_URL") == null) {
|
|
||||||
println "Cannot send the webhook without the webhook url or the build url"
|
|
||||||
return
|
|
||||||
}
|
|
||||||
def webhook = new Webhook(System.getenv('discordWebhook'), 'Petrak@ Patreon Gradle')
|
|
||||||
|
|
||||||
def message = new Message()
|
|
||||||
message.setUsername("Patreon Early Access")
|
|
||||||
message.setContent("New **$modName** prerelease -- build ${System.getenv("BUILD_NUMBER")} for $minecraftVersion! \n" +
|
|
||||||
"Download it here: ${System.getenv("BUILD_URL")}\nChangelog:\n${getGitChangelog()}")
|
|
||||||
|
|
||||||
webhook.sendMessage(message)
|
|
||||||
} catch (ignored) {
|
|
||||||
project.logger.error("Failed to push Discord webhook.")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ pluginManagement {
|
||||||
name = 'Sponge Snapshots'
|
name = 'Sponge Snapshots'
|
||||||
url = 'https://repo.spongepowered.org/repository/maven-public/'
|
url = 'https://repo.spongepowered.org/repository/maven-public/'
|
||||||
}
|
}
|
||||||
|
maven { url 'https://maven.blamejared.com' }
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
|
|
Loading…
Reference in a new issue