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
13 changes: 11 additions & 2 deletions .github/workflows/dev_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,30 @@ on: push
jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4

- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
distribution: adopt

- name: Build with Gradle
run: ./gradlew build

- name: Release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: '${{ secrets.GITHUB_TOKEN }}'
automatic_release_tag: latest
automatic_release_tag: snapshot
prerelease: true
title: Dev Build
files: |
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,28 @@ on: pull_request
jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Wrapper Validation
uses: gradle/actions/wrapper-validation@v3
uses: gradle/actions/wrapper-validation@v4

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4

- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
distribution: adopt

- name: Build with Gradle
run: ./gradlew build

- name: Release
uses: actions/upload-artifact@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ Here is a brief explanation of the ones you might need to modify:
You can add your own mixins in the `client` array.
- `fabric.mod.json`: Contains the metadata of the addon.
Edit the various fields to reflect the metadata of your addon.
- `build.gradle`: Contains the Gradle build script.
- `build.gradle.kts`: Contains the Gradle build script.
You can manage the dependencies of the addon here.
Remember to keep the `fabric-loom` version up-to-date.
- `gradle.properties`: Contains the properties of the Gradle build.
- `gradle.properties.kts`: Contains the properties of the Gradle build.
These will be used by the build script.
- `LICENSE`: Contains the license of the addon.
You can edit this file to change the license of your addon.
Expand Down
59 changes: 0 additions & 59 deletions build.gradle

This file was deleted.

60 changes: 60 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
plugins {
id("fabric-loom") version "1.9-SNAPSHOT"
}

base {
archivesName = properties["archives_base_name"] as String
version = properties["mod_version"] as String
group = properties["maven_group"] as String
}

repositories {
maven {
name = "meteor-maven"
url = uri("https://maven.meteordev.org/releases")
}
maven {
name = "meteor-maven-snapshots"
url = uri("https://maven.meteordev.org/snapshots")
}
}

dependencies {
// Fabric
minecraft("com.mojang:minecraft:${properties["minecraft_version"] as String}")
mappings("net.fabricmc:yarn:${properties["yarn_mappings"] as String}:v2")
modImplementation("net.fabricmc:fabric-loader:${properties["loader_version"] as String}")

// Meteor
modImplementation("meteordevelopment:meteor-client:${properties["minecraft_version"] as String}-SNAPSHOT")
}

tasks {
processResources {
val propertyMap = mapOf(
"version" to project.version,
"mc_version" to project.property("minecraft_version"),
)

filesMatching("fabric.mod.json") {
expand(propertyMap)
}
}

jar {
val licenseSuffix = project.base.archivesName.get()
from("LICENSE") {
rename { "${it}_${licenseSuffix}" }
}
}

java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

withType<JavaCompile> {
options.encoding = "UTF-8"
options.release = 21
}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
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.10-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
33 changes: 20 additions & 13 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 12 additions & 10 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions settings.gradle → settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
pluginManagement {
repositories {
maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
name = "Fabric"
url = uri("https://maven.fabricmc.net/")
}
mavenCentral()
gradlePluginPortal()
Expand Down
Loading