Skip to content

Commit

Permalink
Merge pull request #5 from RELOADEDev/master
Browse files Browse the repository at this point in the history
Add ModMenu integration, GUI and basic config system
  • Loading branch information
NebelNidas authored Dec 7, 2021
2 parents d03fcf5 + c3084e7 commit 5bf6c3f
Show file tree
Hide file tree
Showing 19 changed files with 525 additions and 48 deletions.
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gradle" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build

on: [pull_request, push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- name: Make Gradle wrapper executable
run: chmod +x ./gradlew
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build with Gradle
run: ./gradlew build
- uses: actions/upload-artifact@v2
with:
name: Package
path: build/libs
- name: Cleanup Gradle Cache
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: Build2

on: [ push, pull_request ]

Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '39 9 * * 3'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'java' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
72 changes: 55 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,35 +1,73 @@
# gradle

.gradle/
build/
out/
classes/

# eclipse

*.launch

# idea

.idea/
*.iml
*.ipr
*.iws

# vscode

.settings/
.vscode/*
!.vscode/extensions.json
!.vscode/settings.json
bin/
.classpath
.project

# macos

*.DS_Store

# fabric

run/
.env
/run/
.idea_modules/
atlassian-ide-plugin.xml
*.class
*.log
*.ctxt
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
hs_err_pid*
*~
.fuse_hidden*
.directory
.Trash-*
.nfs*
.DS_Store
.AppleDouble
.LSOverride
._*
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
*.stackdump
[Dd]esktop.ini
$RECYCLE.BIN/
*.cab
*.msi
*.msix
*.msm
*.msp
*.lnk
.gradle
gradle-app.setting
.gradletasknamecache
**/build/
logs/
!gradle-wrapper.jar
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* **NOTE THAT GUI AND AUTOCHECK WILL BE LATER!**
* Its working, provide all ModGet functional
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
# Modget-Minecraft
[![CurseForge downloads](https://cf.way2muchnoise.eu/modget.svg)](https://www.curseforge.com/minecraft/mc-mods/modget)
[![CurseForge versions](https://cf.way2muchnoise.eu/versions/modget.svg)](https://www.curseforge.com/minecraft/mc-mods/modget)
[![Modrinth downloads](https://img.shields.io/badge/dynamic/json?color=5da545&label=modrinth&prefix=downloads%20&query=downloads&url=https://api.modrinth.com/api/v1/mod/2NpFE0R3&style=flat&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMSAxMSIgd2lkdGg9IjE0LjY2NyIgaGVpZ2h0PSIxNC42NjciICB4bWxuczp2PSJodHRwczovL3ZlY3RhLmlvL25hbm8iPjxkZWZzPjxjbGlwUGF0aCBpZD0iQSI+PHBhdGggZD0iTTAgMGgxMXYxMUgweiIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNBKSI+PHBhdGggZD0iTTEuMzA5IDcuODU3YTQuNjQgNC42NCAwIDAgMS0uNDYxLTEuMDYzSDBDLjU5MSA5LjIwNiAyLjc5NiAxMSA1LjQyMiAxMWMxLjk4MSAwIDMuNzIyLTEuMDIgNC43MTEtMi41NTZoMGwtLjc1LS4zNDVjLS44NTQgMS4yNjEtMi4zMSAyLjA5Mi0zLjk2MSAyLjA5MmE0Ljc4IDQuNzggMCAwIDEtMy4wMDUtMS4wNTVsMS44MDktMS40NzQuOTg0Ljg0NyAxLjkwNS0xLjAwM0w4LjE3NCA1LjgybC0uMzg0LS43ODYtMS4xMTYuNjM1LS41MTYuNjk0LS42MjYuMjM2LS44NzMtLjM4N2gwbC0uMjEzLS45MS4zNTUtLjU2Ljc4Ny0uMzcuODQ1LS45NTktLjcwMi0uNTEtMS44NzQuNzEzLTEuMzYyIDEuNjUxLjY0NSAxLjA5OC0xLjgzMSAxLjQ5MnptOS42MTQtMS40NEE1LjQ0IDUuNDQgMCAwIDAgMTEgNS41QzExIDIuNDY0IDguNTAxIDAgNS40MjIgMCAyLjc5NiAwIC41OTEgMS43OTQgMCA0LjIwNmguODQ4QzEuNDE5IDIuMjQ1IDMuMjUyLjgwOSA1LjQyMi44MDljMi42MjYgMCA0Ljc1OCAyLjEwMiA0Ljc1OCA0LjY5MSAwIC4xOS0uMDEyLjM3Ni0uMDM0LjU2bC43NzcuMzU3aDB6IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGZpbGw9IiM1ZGE0MjYiLz48L2c+PC9zdmc+)](https://www.curseforge.com/minecraft/mc-mods/modget)
[![Modrinth downloads](https://img.shields.io/badge/dynamic/json?color=5da545&label=modrinth&prefix=downloads%20&query=downloads&url=https://api.modrinth.com/api/v1/mod/2NpFE0R3&style=flat&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMSAxMSIgd2lkdGg9IjE0LjY2NyIgaGVpZ2h0PSIxNC42NjciICB4bWxuczp2PSJodHRwczovL3ZlY3RhLmlvL25hbm8iPjxkZWZzPjxjbGlwUGF0aCBpZD0iQSI+PHBhdGggZD0iTTAgMGgxMXYxMUgweiIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNBKSI+PHBhdGggZD0iTTEuMzA5IDcuODU3YTQuNjQgNC42NCAwIDAgMS0uNDYxLTEuMDYzSDBDLjU5MSA5LjIwNiAyLjc5NiAxMSA1LjQyMiAxMWMxLjk4MSAwIDMuNzIyLTEuMDIgNC43MTEtMi41NTZoMGwtLjc1LS4zNDVjLS44NTQgMS4yNjEtMi4zMSAyLjA5Mi0zLjk2MSAyLjA5MmE0Ljc4IDQuNzggMCAwIDEtMy4wMDUtMS4wNTVsMS44MDktMS40NzQuOTg0Ljg0NyAxLjkwNS0xLjAwM0w4LjE3NCA1LjgybC0uMzg0LS43ODYtMS4xMTYuNjM1LS41MTYuNjk0LS42MjYuMjM2LS44NzMtLjM4N2gwbC0uMjEzLS45MS4zNTUtLjU2Ljc4Ny0uMzcuODQ1LS45NTktLjcwMi0uNTEtMS44NzQuNzEzLTEuMzYyIDEuNjUxLjY0NSAxLjA5OC0xLjgzMSAxLjQ5MnptOS42MTQtMS40NEE1LjQ0IDUuNDQgMCAwIDAgMTEgNS41QzExIDIuNDY0IDguNTAxIDAgNS40MjIgMCAyLjc5NiAwIC41OTEgMS43OTQgMCA0LjIwNmguODQ4QzEuNDE5IDIuMjQ1IDMuMjUyLjgwOSA1LjQyMi44MDljMi42MjYgMCA0Ljc1OCAyLjEwMiA0Ljc1OCA0LjY5MSAwIC4xOS0uMDEyLjM3Ni0uMDM0LjU2bC43NzcuMzU3aDB6IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGZpbGw9IiM1ZGE0MjYiLz48L2c+PC9zdmc+)](https://modrinth.com/mod/modget)
[![Build](https://github.com/ReviversMC/modget-minecraft/actions/workflows/build.yml/badge.svg)](https://github.com/ReviversMC/modget-minecraft/actions/workflows/build.yml)
[![License](https://img.shields.io/github/license/ReviversMC/modget-minecraft.svg)](https://github.com/ReviversMC/modget-minecraft/blob/main/LICENSE)
[![Release](https://img.shields.io/github/release/ReviversMC/modget-minecraft.svg)](https://github.com/ReviversMC/modget-minecraft/releases/latest)
[![Downloads](https://img.shields.io/github/downloads/ReviversMC/modget-minecraft/total.svg)](https://github.com/ReviversMC/modget-minecraft/releases/latest)

The Minecraft Mod Package Manager!

Modget is based on TheBrokenRail's [ModUpdater](https://gitea.thebrokenrail.com/TheBrokenRail/ModUpdater) mod and is inspired heavily by Microsoft's [Winget](https://github.com/microsoft/winget-cli).

Currently, Modget supports the following commands:
**[Mod Menu](https://modrinth.com/mod/modmenu) and [Cloth Config API](https://www.curseforge.com/minecraft/mc-mods/cloth-config) should be installed!**

Nightly builds download link [here](https://nightly.link/ReviversMC/modget-minecraft/workflows/build/main/Package.zip)

## Contributors
<a href="https://github.com/ReviversMC/modget-minecraft/graphs/contributors">
<img height="40em" src="https://contrib.rocks/image?repo=ReviversMC/modget-minecraft" />
</a>

## Currently, Modget supports the following commands:
```
/modget list Lists all installed mods recognized by modget
/modget repos list Lists all installed manifest repositories
Expand Down Expand Up @@ -42,7 +55,7 @@ If you want to add first-party support for your mods, please regularly submit ne
[![Discord chat](https://img.shields.io/badge/chat%20on-discord-7289DA?logo=discord&logoColor=white)](https://discord.gg/6bTGYFppfz)

We have an [official Discord community](https://discord.gg/6bTGYFppfz) for all of our projects. By joining, you can:
- Get installation help and technical support with all of our mods
- Get installation help and technical support with all of our mods
- Be notified of the latest developments as they happen
- Get involved and collaborate with the rest of our team
- ... and just hang out with the rest of our community.
74 changes: 56 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ plugins {
id 'fabric-loom' version '0.10.local'
// id 'com.matthewprenger.cursegradle' version '1.4.0'
id 'maven-publish'
id "com.modrinth.minotaur" version "1.2.1"
}

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

// def mod_version = project.mod_version as Object
// version = "${mod_version}+${project.minecraft_version}"
version = project.mod_version
version = project.mod_version as Object
archivesBaseName = project.archives_base_name
group = project.maven_group as Object

Expand All @@ -25,7 +26,10 @@ repositories {
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.

mavenLocal()
maven { name = "TerraformersMC"
url = "https://maven.terraformersmc.com/releases" }
maven { url = "https://maven.shedaniel.me/" }
maven {
url = "https://mvnrepository.com/"
}
Expand All @@ -52,6 +56,7 @@ repositories {
name = "NucleoidMC"
url = "https://maven.nucleoid.xyz/"
}
mavenCentral()
}


Expand Down Expand Up @@ -86,6 +91,14 @@ dependencies {

compileOnly "com.github.spotbugs:spotbugs:${project.spotbugs_version}"

modRuntimeOnly "fr.catcore:server-translations-api:1.4.8+1.18-pre1"
modImplementation "net.fabricmc:fabric-language-kotlin:1.7.0+kotlin.1.6.0"
modImplementation "com.terraformersmc:modmenu:3.0.0"
modApi("me.shedaniel.cloth:cloth-config-fabric:6.0.45") {
exclude(group: "net.fabricmc.fabric-api")
}
modImplementation "net.fabricmc.fabric-api:fabric-api:0.43.1+1.18"


if (project.use_third_party_mods) {
configurations {
Expand All @@ -101,20 +114,20 @@ dependencies {
}
}

modRuntimeOnly "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modRuntimeOnly "fr.catcore:server-translations-api:${project.server_translations_version}"
// modRuntimeOnly "curse.maven:modmenu-308702:3199797"
modRuntimeOnly "curse.maven:borderless-mining-310205:3033277"
modRuntimeOnly "curse.maven:dark-loading-screen-365727:3185761"
// modRuntimeOnly "curse.maven:dynamic-fps-335493:3302730"
// modRuntimeOnly "curse.maven:enhanced-block-entities-452046:3378154"
modRuntimeOnly "curse.maven:lazydfu-433518:3209972"
modRuntimeOnly "curse.maven:lithium-360438:3344974"
modRuntimeOnly "curse.maven:no-fade-452768:3228523"
modRuntimeOnly "curse.maven:phosphor-372124:3294303"
modRuntimeOnly "curse.maven:resolution-control-plus-446974:3206545"
modRuntimeOnly "curse.maven:smooth-boot-415758:3248104"
modRuntimeOnly "curse.maven:sodium-394468:3488820"
// modRuntimeOnly "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
// modRuntimeOnly "fr.catcore:server-translations-api:${project.server_translations_version}"
// // modRuntimeOnly "curse.maven:modmenu-308702:3199797"
// modRuntimeOnly "curse.maven:borderless-mining-310205:3033277"
// modRuntimeOnly "curse.maven:dark-loading-screen-365727:3185761"
// // modRuntimeOnly "curse.maven:dynamic-fps-335493:3302730"
// // modRuntimeOnly "curse.maven:enhanced-block-entities-452046:3378154"
// modRuntimeOnly "curse.maven:lazydfu-433518:3209972"
// modRuntimeOnly "curse.maven:lithium-360438:3344974"
// modRuntimeOnly "curse.maven:no-fade-452768:3228523"
// modRuntimeOnly "curse.maven:phosphor-372124:3294303"
// modRuntimeOnly "curse.maven:resolution-control-plus-446974:3206545"
// modRuntimeOnly "curse.maven:smooth-boot-415758:3248104"
// modRuntimeOnly "curse.maven:sodium-394468:3488820"

// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
// You may need to force-disable transitiveness on them.
Expand Down Expand Up @@ -159,6 +172,10 @@ jar {
from "LICENSE"
}

test {
useJUnitPlatform()
}

// if (project.hasProperty('curseforge.api_key')) {
// curseforge {
// apiKey = project.getProperty('curseforge.api_key')
Expand Down Expand Up @@ -210,3 +227,24 @@ publishing {
// }
}
}

//import com.modrinth.minotaur.TaskModrinthUpload
//import com.modrinth.minotaur.request.VersionType
//import com.modrinth.minotaur.request.Dependency
//
//task publishModrinth (type: TaskModrinthUpload){
// onlyIf {
// System.getenv("MODRINTH")
// }
//
// token = System.getenv("MODRINTH")
// projectId = "2NpFE0R3"
// versionNumber = version
// uploadFile = remapJar
// versionType = VersionType.ALPHA
// addGameVersion(project.minecraft_version)
// addLoader("fabric")
// addDependency("JPP6w2U1", Dependency.DependencyType.REQUIRED)
// changelog = file("CHANGELOG.md").getText("UTF-8")
// enabled = true
//}
Loading

0 comments on commit 5bf6c3f

Please sign in to comment.