Skip to content

Commit

Permalink
Begin the Murderleague!!!
Browse files Browse the repository at this point in the history
a.k.a. ok zoomer multiloader
  • Loading branch information
EnnuiL committed Nov 3, 2024
1 parent 3e12565 commit 80e7940
Show file tree
Hide file tree
Showing 78 changed files with 773 additions and 247 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/build_status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,23 @@ jobs:
cache: 'gradle'
- name: Build with Gradle
run: ./gradlew build --rerun-tasks
- name: Detonate JARs
run: python ./ci/hissboom.py "./build/libs/*.jar"
- name: Detonate JARs (Fabric)
run: python ./ci/hissboom.py "./fabric/build/libs/*.jar"
- name: Detonate JARs (Neo)
run: python ./ci/hissboom.py "./norge/build/libs/*.jar"
- name: Upload build artifacts (Fabric)
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-Fabric-${{ github.sha }}
path: |
build/libs/*.jar
!build/libs/*-dev.jar
fabric/build/libs/*.jar
!fabric/build/libs/*-dev.jar
- name: Upload build artifacts (Neo)
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-Neo-${{ github.sha }}
path: |
norge/build/libs/*.jar
!norge/build/libs/*-dev.jar
20 changes: 15 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,28 @@ jobs:
github-token: ${{ github.token }}
version: ${{ env.TAG }}
files: |
build/libs/!(*-@(dev|sources|javadoc|slim)).jar
build/libs/*-@(sources|javadoc).jar
**/build/libs/!(*-@(dev|sources|javadoc|slim)).jar
**/build/libs/*-@(sources|javadoc).jar
- name: Publish (Fabric)
id: publish_fabric
uses: Kir-Antipov/mc-publish@995edadc13559a8b28d0b7e6571229f067ec7659 # (new) v3.3.0
with:
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
version: ${{ env.TAG }}+Fabric
version: ${{ env.TAG }}+fabric
files: |
build/libs/!(*-@(dev|sources|javadoc|slim)).jar
build/libs/*-@(sources|javadoc).jar
fabric/build/libs/!(*-@(dev|sources|javadoc|slim)).jar
fabric/build/libs/*-@(sources|javadoc).jar
- name: Publish (Neo)
id: publish_neo
uses: Kir-Antipov/mc-publish@995edadc13559a8b28d0b7e6571229f067ec7659 # (new) v3.3.0
with:
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
version: ${{ env.TAG }}+neo
files: |
norge/build/libs/!(*-@(dev|sources|javadoc|slim)).jar
norge/build/libs/*-@(sources|javadoc).jar
- name: Notify Discord
uses: Up-Mods/action-discord-release@main
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<img src="./src/main/resources/assets/ok_zoomer/icon.png" align="right" width="128px" alt="Ok Zoomer icon"/>
<img src="fabric/src/main/resources/assets/ok_zoomer/icon.png" align="right" width="128px" alt="Ok Zoomer icon"/>

# Ok Zoomer

Expand Down
151 changes: 4 additions & 147 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,152 +1,9 @@
plugins {
id 'java'
id 'maven-publish'
alias libs.plugins.quilt.loom
id 'mod_conventions'
}

def javaVersion = 21

group = project.maven_group_id

def ENV = System.getenv()
def now = new Date()

version = ENV.TAG ?: "development-${now.format('YY.MMdd.HHmm', TimeZone.getTimeZone('UTC'))}+${libs.versions.minecraft.get()}${(!ENV.TAG && ENV.BUILD_NUMBER) ? "-build.${ENV.BUILD_NUMBER}" : ''}"

base {
archivesName = "${rootProject.name}-Fabric"
}

repositories {
mavenCentral()
maven {
name = 'TerraformersMC'
url = 'https://maven.terraformersmc.com/releases'
}
maven {
name = 'ParchmentMC'
url = 'https://maven.parchmentmc.org'
content {
includeGroupByRegex 'org\\.parchmentmc(\\..*)?'
}
}
maven {
name = 'Modrinth'
url = 'https://api.modrinth.com/maven'
content {
includeGroup "maven.modrinth"
}
}
maven {
name = 'Up-Mods'
url = 'https://maven.uuid.gg/releases'
}
/*
maven {
name = "Ladysnake"
url = 'https://maven.ladysnake.org/releases'
}
*/
}

loom {
mods {
"${project.mod_id}" {
sourceSet('main')
}
}

// Mixin plugin needs this
mixin {
useLegacyMixinAp = true
}
}

// All the dependencies are declared at gradle/libs.version.toml and referenced with "libs.<id>"
// See https://docs.gradle.org/current/userguide/platforms.html for information on how version catalogs work.
dependencies {
minecraft libs.minecraft
mappings loom.officialMojangMappings()
/*
mappings(loom.layered {
it.officialMojangMappings()
it.parchment libs.parchment
})
*/
modImplementation libs.quilt.loader

modImplementation libs.fabric.api

modCompileOnly libs.modmenu
modLocalRuntime libs.modmenu

modCompileOnly libs.wrench.wrapper

//modCompileOnly libs.bundles.trinkets
//modLocalRuntime libs.bundles.trinkets

include libs.wrench.wrapper
}

processResources {
filteringCharset 'UTF-8'

def expandProps = [
'version' : version,
'maven_group_id' : maven_group_id,
'mod_id' : mod_id,
'minecraft_version' : libs.versions.minecraft.get(),
'curseforge_id' : curseforge_id,
'modrinth_id' : modrinth_id,
]

filesMatching(['*.mod.json', '*.mixins.json']) {
expand expandProps
}
inputs.properties(expandProps)
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(javaVersion)
}
withSourcesJar()
// withJavadocJar()
}

jar {
from('LICENSE.md') {
rename { "LICENSE_${base.archivesName.get()}.md" }
}
}

sourcesJar {
from('LICENSE.md') {
rename { "LICENSE_${base.archivesName.get()}.md" }
}
}

tasks.withType(JavaCompile).configureEach {
it.options.release.set(javaVersion)
}

// Configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
artifactId "${rootProject.name}-Fabric"
from components.java
}
}

repositories {
if (ENV.MAVEN_UPLOAD_URL) {
maven {
url = ENV.MAVEN_UPLOAD_URL
credentials {
username = ENV.MAVEN_UPLOAD_USERNAME
password = ENV.MAVEN_UPLOAD_PASSWORD
}
}
}
}
tasks.named('jar').configure {
it.enabled = false
}
4 changes: 4 additions & 0 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
plugins {
id 'groovy-gradle-plugin'
}

23 changes: 23 additions & 0 deletions buildSrc/src/main/groovy/mod_conventions.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
String createVersionString() {
def ENV = System.getenv()
return ENV.TAG ?: "0.0.0-development${(!ENV.TAG && ENV.BUILD_NUMBER) ? "-build.${ENV.BUILD_NUMBER}" : ''}"
}

version = createVersionString()
group = 'io.github.ennuil.ok_zoomer'

tasks.named('jar').configure {
inputs.files('LICENSE.md')

it.from(rootDir.toPath().resolve('LICENSE.md')) {
it.rename { "LICENSE_ok_zoomer.md" }
}
}

tasks.withType(JavaCompile).configureEach {
it.options.release.set(21)
}

tasks.withType(GenerateModuleMetadata).configureEach {
it.enabled = false
}
Loading

0 comments on commit 80e7940

Please sign in to comment.