Skip to content
Open
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
100 changes: 83 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,84 @@
### Maven template
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar
.flattened-pom.xml

# IntelliJ project files
.idea
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
.idea/artifacts
.idea/compiler.xml
.idea/jarRepositories.xml
.idea/modules.xml
.idea/*.iml
.idea/modules
*.iml
out
gen
*.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
.gradle/

.idea/

build/

libs/
33 changes: 33 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
plugins {
id 'java'
}


allprojects {
apply plugin: "java"
apply plugin: "idea"
apply plugin: "maven-publish"

archivesBaseName = rootProject.archives_base_name
version = rootProject.mod_version
group = rootProject.maven_group

repositories {
mavenLocal()
mavenCentral()
maven { url 'https://jitpack.io' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.release.set(17)
}


java {
withSourcesJar()
}
}


2 changes: 1 addition & 1 deletion bukkit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<dependency>
<groupId>com.github.cryptomorin</groupId>
<artifactId>XSeries</artifactId>
<version>8.6.1</version>
<version>9.4.0</version>
</dependency>
<dependency>
<groupId>com.github.MilkBowl</groupId>
Expand Down
46 changes: 46 additions & 0 deletions core/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
plugins {
id "org.jetbrains.kotlin.jvm" version "1.7.10"
id "com.github.johnrengelman.shadow" version "7.1.2"
}
configurations {
shadowCommon
}

dependencies {
compileOnly 'com.google.code.gson:gson:2.8.9'
compileOnly 'com.github.thijsa:socket.io-client-java:1.0.3'
compileOnly 'org.apache.httpcomponents:httpclient:4.5.13'
compileOnly 'org.apache.commons:commons-lang3:3.12.0'
compileOnly 'commons-logging:commons-logging:1.2'
compileOnly 'org.apache.commons:commons-text:1.10.0'
compileOnly 'net.luckperms:api:5.4'
compileOnly 'com.github.cryptomorin:XSeries:9.8.1'
// log4j wrapper
compileOnly 'org.apache.logging.log4j:log4j-api:2.8.1'
// slf4j wrapper
compileOnly 'org.slf4j:slf4j-api:1.8.0-beta4'

shadowCommon 'org.apache.httpcomponents:httpclient:4.5.13'
shadowCommon 'org.apache.commons:commons-lang3:3.12.0'
shadowCommon 'org.apache.commons:commons-text:1.10.0'
shadowCommon 'com.github.thijsa:socket.io-client-java:1.0.3'
shadowCommon 'com.github.cryptomorin:XSeries:9.8.1'
}

shadowJar {
configurations = [project.configurations.shadowCommon]

relocate 'org.apache.http', 'net.craftingstore.libraries.apache.http'
relocate 'org.apache.commons.lang3', 'net.craftingstore.libraries.apache.commons.lang3'
relocate 'org.apache.commons.logging', 'net.craftingstore.libraries.apache.commons.logging'
relocate 'org.apache.commons.codec', 'net.craftingstore.libraries.apache.commons.codec'
relocate 'org.apache.commons.text', 'net.craftingstore.libraries.apache.commons.text'
relocate 'org.json', 'net.craftingstore.libraries.json'
relocate 'io.socket', 'net.craftingstore.libraries.socket'
relocate 'okhttp3', 'net.craftingstore.libraries.okhttp3'
relocate 'okio', 'net.craftingstore.libraries.okio'
relocate 'com.cryptomorin.xseries', 'net.craftingstore.libraries.xseries'
}


jar.finalizedBy('shadowJar')
4 changes: 2 additions & 2 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.0</version>
<version>2.8.9</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -62,7 +62,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.9</version>
<version>1.10.0</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,23 @@ public abstract class CraftingStoreLogger {
private boolean debugging;

public abstract void info(String message);
public abstract void info(String message, Throwable throwable);

public abstract void error(String message);
public abstract void error(String message, Throwable throwable);

public void debug(String message) {
if (this.debugging) {
this.info(message);
}
}

public void debug(String message, Throwable throwable) {
if (this.debugging) {
this.info(message, throwable);
}
}

public void setDebugging(boolean debugging) {
this.debugging = debugging;
if (debugging) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,28 @@

import net.craftingstore.core.logging.CraftingStoreLogger;

import java.util.logging.Level;
import java.util.logging.Logger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class JavaLogger extends CraftingStoreLogger {

private Logger logger;
public Logger LOGGER = LoggerFactory.getLogger("CraftingStore");

public JavaLogger(Logger logger) {
this.logger = logger;
this.LOGGER = logger;
}

public void info(String message) {
logger.info(message);
LOGGER.info(message);
}

public void error(String message) {
logger.log(Level.SEVERE, message);
public void info(String message, Throwable throwable) {
LOGGER.info(message, throwable);
}

public void warn(String message) {LOGGER.warn(message);}

public void warn(String message, Throwable throwable) {LOGGER.warn(message, throwable);}

public void error(String message) { LOGGER.error(message); }
public void error(String message, Throwable throwable) { LOGGER.error(message, throwable); }
}
81 changes: 81 additions & 0 deletions fabric/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
.idea/artifacts
.idea/compiler.xml
.idea/jarRepositories.xml
.idea/modules.xml
.idea/*.iml
.idea/modules
*.iml
*.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
.gradle/

build/
2 changes: 2 additions & 0 deletions fabric/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Copyright (c) 2023
All rights reserved.
Loading