Skip to content
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.

Commit

Permalink
Prepared Codebase for OSS
Browse files Browse the repository at this point in the history
  • Loading branch information
Pr3roxDLC committed Sep 10, 2022
0 parents commit f36032d
Show file tree
Hide file tree
Showing 562 changed files with 90,868 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 @@
# https://editorconfig.org

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

[*.java]
indent_size = 4

[*.{json, toml, xml, yml}]
indent_size = 2

[*.md]
max_line_length = 420
trim_trailing_whitespace = false
34 changes: 34 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
version: 2
updates:

- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: "daily"
time: "12:00"
timezone: "Europe/Berlin"
assignees:
- "Krazzzzymonkey"
- "nothub"
reviewers:
- "Krazzzzymonkey"
- "nothub"
commit-message:
prefix: "gradle"
include: "scope"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
time: "12:00"
timezone: "Europe/Berlin"
assignees:
- "Krazzzzymonkey"
- "nothub"
reviewers:
- "Krazzzzymonkey"
- "nothub"
commit-message:
prefix: "github-actions"
include: "scope"
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# ignore all files
*
# but include directories
!*/

# git
!/**/.gitkeep
!/.gitignore
!/.gitmodules

# java
!/src/**

# gradle
!/build.gradle
!/gradle.properties
!/settings.gradle
# gradle wrapper
!/gradle/**
!/gradlew
!/gradlew.bat

# misc
!/.github/**
!/.binscure/**
!/scripts/**
!/*.md
!/.editorconfig
!/LICENSE
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
A Minecaft Forge Utility Mod Designed for the anarchy environment.
Made By Krazzzzymonkey, blockparole and Pr3roxDLC
185 changes: 185 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
buildscript {
repositories {
//jcenter()
maven { url = "https://plugins.gradle.org/m2/" }
maven { url = "https://maven.minecraftforge.net" }
maven { url = 'https://repo.spongepowered.org/repository/maven-public' }
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT'
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
classpath "gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext:1.0.1"
}
}

apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'org.spongepowered.mixin'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: "org.jetbrains.gradle.plugin.idea-ext"

group = project.mod_group
archivesBaseName = project.mod_name
version = project.mod_version

sourceCompatibility = targetCompatibility = '1.8'
compileJava {
sourceCompatibility = targetCompatibility = '1.8'
options.encoding = 'UTF-8'
}

idea.project.settings {
// run all the shit needed to prepare project on gradle reload (refresh button)
taskTriggers {
beforeSync tasks.getByName("clean"), tasks.getByName("setupDecompWorkspace")
}
}

minecraft {
version = project.forge_version
mappings = project.mcp_version

runDir = "run"
makeObfSourceJar = true

coreMod = 'com.krazzzzymonkey.catalyst.mixin.MixinLoaderForge'

replaceIn "com/krazzzzymonkey/catalyst/Main.java"
replace "@modid@", project.mod_id
replace "@version@", project.mod_version
replace "@name@", project.mod_name
}

repositories {
mavenCentral()
maven {
name = 'spongepowered'
url = 'https://repo.spongepowered.org/repository/maven-public'
}
maven {
name = 'impactdevelopment'
url = 'https://impactdevelopment.github.io/maven/'
}
maven {
name = 'swt'
url = "https://maven-eclipse.github.io/maven"
}
maven {
name = "jitpack.io"
url = "https://jitpack.io"
}
maven {
name = "tigr.dev"
url = "https://maven.tigr.dev"
}
}

dependencies {
compile("org.spongepowered:mixin:0.7.11-SNAPSHOT") {
exclude module: 'launchwrapper'
exclude module: 'guava'
exclude module: 'gson'
exclude module: 'commons-io'
}
compile 'net.jodah:typetools:0.6.3'
compile "dev.tigr:simpleevents:1.3"
compile 'org.luaj:luaj-jse:3.0.1'
compile group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1.1'
compile group: 'club.minnced', name: 'java-discord-rpc', version: '2.0.1'
/*compile 'com.github.cabaletta:baritone:1.2.14'*/
/*compile 'cabaletta:baritone-api:1.2'*/
compileOnly 'com.google.code.gson:gson:2.8.0' // gson is included in mc 1.12.2, im just not sure what version
/*compileOnly 'org.jetbrains:annotations:21.0.1'*/
/*test scope*/
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.0-M1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.0-M1'
}

test {
useJUnitPlatform()
}

processResources {
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'

// replace version and mcversion
expand 'version': project.version, 'mcversion': project.minecraft.version
}
// copy everything else except the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
// move access transformer config
rename '(.+_at.cfg)', 'META-INF/$1'
}

shadowJar {
dependencies {
include(dependency('org.spongepowered:mixin'))
include(dependency('org.luaj:luaj-jse:3.0.1'))
include(dependency('com.googlecode.json-simple:json-simple:1.1.1'))
include(dependency('club.minnced:java-discord-rpc:2.0.1'))
/*include(dependency('cabaletta:baritone-api'))*/
include(dependency('dev.tigr:simpleevents:1.3'))
include(dependency('net.jodah:typetools'))

}
exclude 'dummyThing'
exclude 'LICENSE.txt'
classifier = 'shadow'
}

mixin {
defaultObfuscationEnv searge
add sourceSets.main, 'mixins.catalyst.refmap.json'
}

reobf {
shadowJar {
mappingType = 'SEARGE'
classpath = sourceSets.main.compileClasspath
}
}

sourceSets {
main {
refMap = "mixins.catalyst.refmap.json"
}
}


jar {
manifest {
attributes(
'MixinConfigs': 'mixins.catalyst.json',
'tweakClass': 'org.spongepowered.asm.launch.MixinTweaker',
'TweakOrder': 0,
'FMLCorePluginContainsFMLMod': 'true',
'FMLCorePlugin': 'com.krazzzzymonkey.catalyst.mixin.MixinLoaderForge',
'ForceLoadAsMod': 'true',
'FMLAT': 'catalyst_at.cfg'
)
}
}

task loaderJar(type: Jar, dependsOn: shadowJar) {
from(zipTree(shadowJar.archivePath)) {
include "assets/minecraft/catalyst/mainmenu/config.json"
include "com/krazzzzymonkey/**"
include "mixins.catalyst.json"
include "mixins.catalyst.refmap.json"
}
baseName = project.mod_name
version = project.mod_version
classifier = "loader"
manifest = jar.manifest
}
loaderJar.dependsOn(shadowJar)


build.dependsOn(shadowJar, loaderJar)
10 changes: 10 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_group=com.krazzzzymonkey.catalyst
mod_id=catalyst
mod_name=Catalyst
mod_version=1.10.1

forge_version=1.12.2-14.23.5.2847
mcp_version=stable_39
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit f36032d

Please sign in to comment.