Skip to content

Commit

Permalink
actually add files
Browse files Browse the repository at this point in the history
  • Loading branch information
tasgon committed Nov 7, 2022
1 parent 483fa85 commit d6cd78f
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 9 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
on:
workflow_dispatch:
inputs:
branch:
description: "Branch"
required: true
on: workflow_dispatch

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "0.12.0-SNAPSHOT" apply false
id 'org.jetbrains.kotlin.plugin.serialization' version '1.5.20'
id "me.shedaniel.unified-publishing" version "0.1.+"
}
apply plugin: 'kotlin'

Expand Down
1 change: 0 additions & 1 deletion common/src/main/kotlin/observable/Observable.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import net.minecraft.network.chat.Component
import net.minecraft.resources.ResourceLocation
import net.minecraft.server.level.ServerPlayer
import net.minecraft.world.entity.player.Player
import net.minecraft.world.level.Level
import net.minecraft.world.phys.Vec3
import observable.client.Overlay
import observable.client.ProfileScreen
Expand Down
41 changes: 41 additions & 0 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,47 @@ sourcesJar {
from commonSources.archiveFile.map { zipTree(it) }
}


// Credit to shedaniel (architectury) for most of this
unifiedPublishing {
project {
displayName = "$project.version (fabric)"
releaseType = "$rootProject.release_channel"
changelog = "See Observable's GitHub releases page for all changes between versions."
gameVersions = ["1.19.2"]
gameLoaders = ["fabric", "quilt"]
mainPublication remapJar
relations {
depends {
curseforge = "fabric-api"
modrinth = "fabric-api"
}
depends {
curseforge = "architectury-api"
modrinth = "architectury-api"
}
}

var CURSE_API_KEY = project.findProperty("CURSE_API_KEY") ?: System.getenv("CURSE_API_KEY")
if (CURSE_API_KEY != null) {
curseforge {
token = CURSE_API_KEY
id = rootProject.curseforge_id
gameVersions.addAll "Java 17", "1.19-Snapshot"
}
}

var MODRINTH_TOKEN = project.findProperty("MODRINTH_TOKEN") ?: System.getenv("MODRINTH_TOKEN")
if (MODRINTH_TOKEN != null) {
modrinth {
token = MODRINTH_TOKEN
id = rootProject.modrinth_id
version = "$project.version+$project.name"
}
}
}
}

publishing {
publications {
mavenFabric(MavenPublication) {
Expand Down
36 changes: 36 additions & 0 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,42 @@ components.java {
}
}

// Credit to shedaniel (architectury) for most of this
unifiedPublishing {
project {
displayName = "$project.version (forge)"
releaseType = "$rootProject.release_channel"
changelog = "See Observable's GitHub releases page for all changes between versions."
gameVersions = ["1.19.2"]
gameLoaders = ["forge"]
mainPublication remapJar
relations {
depends {
curseforge = "architectury-api"
modrinth = "architectury-api"
}
}

var CURSE_API_KEY = project.findProperty("CURSE_API_KEY") ?: System.getenv("CURSE_API_KEY")
if (CURSE_API_KEY != null) {
curseforge {
token = CURSE_API_KEY
id = rootProject.curseforge_id
gameVersions.addAll "Java 17", "1.19-Snapshot"
}
}

var MODRINTH_TOKEN = project.findProperty("MODRINTH_TOKEN") ?: System.getenv("MODRINTH_TOKEN")
if (MODRINTH_TOKEN != null) {
modrinth {
token = MODRINTH_TOKEN
id = rootProject.modrinth_id
version = "$project.version+$project.name"
}
}
}
}

publishing {
publications {
mavenForge(MavenPublication) {
Expand Down
8 changes: 6 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ org.gradle.jvmargs=-Xmx3G
minecraft_version=1.19.2

archives_base_name=observable
mod_version=3.3.0-beta
mod_version=3.3.0
release_channel=beta
maven_group=observable

architectury_version=6.2.46

fabric_loader_version=0.14.10
fabric_api_version=0.64.0+1.19.2

forge_version=43.1.1
forge_version=43.1.1

curseforge_id=509575
modrinth_id=VYRu7qmG

0 comments on commit d6cd78f

Please sign in to comment.