Skip to content

Commit b353591

Browse files
committed
Buildable and importable in modern IDEs
**Disclaimer: We do not support ForgeGradle 2. The changes made to the buildscript are purely to allow the project to be imported into modern IDEs for research and archival purposes.** ForgeGradle 2.3 returns with 0 changes! Aside from that, you can now import the project into the latest version of IntelliJ IDEA. I tested this version in Maven Local using the latest 1.12 MDK (not to be confused with 1.12.2), and the setup works as expected from the terminal. Here's how I accomplished this: - Ported the buildscript to Gradle 9. - This includes all the changes made to our modern buildscripts. See `MinecraftForge/GradleUtils` for a good example. - Use Nokee's redistribution of Gradle 2.14's API and Test Kit. - Yes, all tests pass. - Did some funny things to ensure that the built artifacts are near identical to 2.3.7. - The only major difference is that the META-INF directory is no longer trimmed down. Here's why I did this: - Project preservation. - It might be good to reference this code in an IDE when working on Mavenizer backports. - To assert dominance.
1 parent 9baefdc commit b353591

22 files changed

+920
-565
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@ name: Publish
22

33
on:
44
push:
5-
branches: [ "FG_2.3" ]
5+
branches: [ 'FG_2.3' ]
6+
paths-ignore:
7+
- '.github/workflows/**'
8+
- 'docs/**'
9+
- 'README.md'
610

711
permissions:
812
contents: read
913

1014
jobs:
1115
build:
12-
uses: MinecraftForge/SharedActions/.github/workflows/gradle.yml@main
16+
uses: MinecraftForge/SharedActions/.github/workflows/gradle.yml@v0
1317
with:
14-
java: 8
15-
gradle_tasks: "uploadArchives"
16-
artifact_group: "net.minecraftforge.gradle"
17-
artifact_name: "ForgeGradle"
18+
java: 17
19+
gradle_tasks: 'check publish'
1820
secrets:
1921
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
2022
PROMOTE_ARTIFACT_WEBHOOK: ${{ secrets.PROMOTE_ARTIFACT_WEBHOOK }}

.gitignore

Lines changed: 71 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,77 @@
1-
# gradle
1+
### Java template
2+
# Compiled class file
3+
*.class
4+
5+
# Log file
6+
*.log
7+
8+
# BlueJ files
9+
*.ctxt
10+
11+
# Mobile Tools for Java (J2ME)
12+
.mtj.tmp/
13+
14+
# Package Files #
15+
*.jar
16+
*.war
17+
*.nar
18+
*.ear
19+
*.zip
20+
*.tar.gz
21+
*.rar
22+
23+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
24+
hs_err_pid*
25+
replay_pid*
26+
27+
### Intellij+all template
28+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
29+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
30+
31+
# CMake
32+
cmake-build-*/
33+
34+
# File-based project format
35+
*.iws
36+
37+
# IntelliJ
38+
.idea/
39+
out/
40+
41+
# mpeltonen/sbt-idea plugin
42+
.idea_modules/
43+
44+
# JIRA plugin
45+
atlassian-ide-plugin.xml
46+
47+
# Crashlytics plugin (for Android Studio and IntelliJ)
48+
com_crashlytics_export_strings.xml
49+
crashlytics.properties
50+
crashlytics-build.properties
51+
fabric.properties
52+
53+
### Gradle template
254
.gradle
3-
build
55+
**/build/
56+
!**/src/**/build/
57+
58+
# Ignore Gradle GUI config
459
gradle-app.setting
560

6-
# GMCP plugin
7-
/minecraft
61+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
62+
!gradle-wrapper.jar
863

9-
# eclipse
10-
.settings
11-
.metadata
12-
.classpath
13-
.project
14-
bin
64+
# Avoid ignore Gradle wrappper properties
65+
!gradle-wrapper.properties
66+
67+
# Cache of project
68+
.gradletasknamecache
1569

16-
# intellij
17-
out
18-
*.idea
19-
*.iml
70+
# Eclipse Gradle plugin generated files
71+
# Eclipse Core
72+
.project
73+
# JDT-specific (Eclipse Java Development Tools)
74+
.classpath
2075

21-
/repo/
76+
# Local Repository
77+
repo/
File renamed without changes.

0 commit comments

Comments
 (0)