Skip to content

Commit

Permalink
initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
LifeIsAParadox committed Jun 25, 2024
1 parent 35ad31c commit 3a518e1
Show file tree
Hide file tree
Showing 17 changed files with 782 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2

[*.java]
indent_size = 4
ij_java_imports_layout = $*, |, de.hysky.**, |, java.**, |, javax.**, |, *, |, net.minecraft.**, |, net.fabricmc.**
ij_java_class_count_to_use_import_on_demand = 999

[.editorconfig]
indent_size = 4
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Linux start script should use lf
/gradlew text eol=lf

# These are Windows script files and should use crlf
*.bat text eol=crlf

37 changes: 37 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Automatically build the project and run any configured tests for every push
# and submitted pull request. This can help catch issues that only occur on
# certain platforms or Java versions, and provides a first line of defence
# against bad commits.

name: build
on: [pull_request, push]

jobs:
build:
strategy:
matrix:
# Use these Java versions
java: [
21, # Current Java LTS
]
runs-on: ubuntu-22.04
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v2
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'microsoft'
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: build
run: ./gradlew build
- name: capture build artifacts
if: ${{ matrix.java == '21' }} # Only upload artifacts built from latest java
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: build/libs/
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
![icon.png](https://cdn.modrinth.com/data/I70N6bTC/a38a4215bb7e541cd4d4d7aaea7883effd18b9e1.png)

**Simple Modpack Update Checker** is a lightweight mod designed to check if your modpack is up-to-date. This mod
verifies the version of your modpack against a remote source and notifies you if an update is available.

## Configuration

The configuration file is located at `config/simple-modpack-update-checker.txt` and should contain two lines:

1. **Local Version**: The current version of the installed modpack. This can be any string. **Quotation marks are not
needed**
2. **Identifier**: Either a URL to a text file containing the latest version (formatted as `version = "String"`,
eg [your pack.toml from packwiz](https://raw.githubusercontent.com/SkyblockerMod/Skyblocker-modpack/main/packwiz/pack.toml))
or the Modrinth project ID.

### Examples

**Using a URL**:

```txt
3.3.3
https://raw.githubusercontent.com/SkyblockerMod/Skyblocker-modpack/main/packwiz/pack.toml
```

**Using a Modrinth Project ID**:

```txt
3.3.3
KmiWHzQ4
```

## Usage

When you start Minecraft with this mod installed, it will automatically check for updates based on your configuration
file and notify you if an update is available. If you use a Modrinth project ID, the mod will only consider the latest
stable version, ignoring alpha and beta versions.

![img.png](https://cdn.modrinth.com/data/I70N6bTC/images/1babc5d3fef1b29f8fd1aa49f845edc21b1d7774.png)

41 changes: 41 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
plugins {
id 'fabric-loom' version '1.7-SNAPSHOT'
id 'maven-publish'
}

version = project.mod_version
group = project.maven_group

base {
archivesName = project.archives_base_name
}

dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

}

processResources {
inputs.property "version", project.version

filesMatching("fabric.mod.json") {
expand "version": project.version
}
}

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

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

jar {
from("LICENSE") {
rename { "${it}_${project.base.archivesName.get()}" }
}
}
14 changes: 14 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
org.gradle.parallel=true

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.21
yarn_mappings=1.21+build.2
loader_version=0.15.11

# Mod Properties
mod_version=1.0.0
maven_group=de.hysky
archives_base_name=simple-modpack-update-checker
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 3a518e1

Please sign in to comment.