Skip to content

Commit

Permalink
New structure to load gradle project, some updates for 1.20.6
Browse files Browse the repository at this point in the history
  • Loading branch information
KlemenDEV committed May 21, 2024
1 parent 2365d24 commit 3c67210
Show file tree
Hide file tree
Showing 20 changed files with 3,470 additions and 284 deletions.
190 changes: 34 additions & 156 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,161 +1,39 @@

# Created by https://www.toptal.com/developers/gitignore/api/gradle,intellij,java
# Edit at https://www.toptal.com/developers/gitignore?templates=gradle,intellij,java

### Intellij ###
# 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
# *.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

# 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

### Intellij Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr

# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
.idea/**/sonarlint/

# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
.idea/**/sonarIssues.xml

# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator-enh.xml
.idea/**/markdown-navigator/

# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
.idea/$CACHE_FILE$

# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml

### Java ###
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

### Gradle ###
#FILES FOR INTELLIJ IDEA
#=======================
**/.idea/workspace.xml
**/.idea/tasks.xml
**/.idea/uiDesigner.xml
**/.idea/gradle.xml
**/.idea/modules.xml
**/.idea/deployment.xml
**/.idea/discord.xml
**/.idea/shelf
**/.idea/libraries-with-intellij-classes.xml
**/.idea/php.xml
**/.idea/copilot/

#FILES FOR GRADLE
#=======================
.gradle
build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Cache of project
.gradletasknamecache
/build/
**/build/
/gradle.properties

# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties
#FILES FOR MCREATOR DEV WORKSPACE
#===============================
/jdk/
/logs

### Gradle Patch ###
**/build/
#SYSTEM AND JAVA FILES
#=====================
Thumbs.db
debug.log
hs_err_pid*

# Eclipse Gradle plugin generated files
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath
#MACOS
#=====================
.DS_Store
.AppleDouble
.LSOverride
/.idea/runConfigurations.xml

# End of https://www.toptal.com/developers/gitignore/api/gradle,intellij,java
1 change: 1 addition & 0 deletions .idea/.name

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

2 changes: 1 addition & 1 deletion .idea/compiler.xml

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

5 changes: 5 additions & 0 deletions .idea/jarRepositories.xml

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

12 changes: 12 additions & 0 deletions .idea/libraries/MCreator.xml

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

3 changes: 2 additions & 1 deletion .idea/misc.xml

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

1 change: 1 addition & 0 deletions .idea/vcs.xml

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

12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ While this project isn't much on its own, it can significantly reduce the time y

In case you have any of your own scripts for MCreator development lying around, you're welcome to open a pull request and we'll add them here for others to use.

## How do I use this?
### Prerequisites
For this to work, you need:
* a working MCreator installation (currently Windows only, default install location).
* Intellij Idea IDE with this repo open as a project (no gradle target/task for launching the ComparisonTool atm.)
### Setup

In order for this tool to work, make a new file called `gradle.properties` with the following contents:

```
mcreator_path=<path to MCreator core Gradle project directory>
```

### Resource structure
Resources folder has a fixed structure, but you may not need all the files for it to work (more on that in specific chapters below). In `img` you should put block/item images from MCreator core you are updating. In the `lists` folder you put the MCreator list you are testing and name it `mcreator`. File named `minecraft` is where you put stripped Minecraft list of entries. The maps folder takes the corresponding map named `mcreator`.
Expand Down
23 changes: 11 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,21 @@ plugins {
group 'org.example'
version '1.1-SNAPSHOT'

java.toolchain.languageVersion = JavaLanguageVersion.of(21)

repositories {
mavenCentral()
maven { url "https://repo.gradle.org/gradle/libs-releases" } // for gradle-tooling-api
flatDir { dirs mcreator_path + '/lib' }
}

dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.2'
implementation fileTree(include: ['*.jar'], dir: 'C:\\Program Files\\Pylo\\MCreator\\lib')
}

test {
useJUnitPlatform()
}
implementation project(':MCreator')

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
project(':MCreator').afterEvaluate(() ->
project(":MCreator").configurations.named("implementation").get().dependencies.each {
//noinspection ForeignDelegate
implementation it
}
)
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 3c67210

Please sign in to comment.