Skip to content

Commit 80c6352

Browse files
Oops
1 parent 4663868 commit 80c6352

13 files changed

Lines changed: 636 additions & 0 deletions

File tree

build.gradle.old

Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
1+
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
2+
3+
buildscript {
4+
repositories {
5+
maven { url 'https://maven.minecraftforge.net' }
6+
maven { url 'https://repo.spongepowered.org/repository/maven-public' }
7+
mavenCentral()
8+
gradlePluginPortal()
9+
}
10+
dependencies {
11+
classpath 'com.gradleup.shadow:com.gradleup.shadow.gradle.plugin:9.0.0-beta10'
12+
classpath 'net.minecraftforge.gradle:ForgeGradle:6.0.+'
13+
classpath 'org.spongepowered:mixingradle:0.7.+'
14+
}
15+
}
16+
17+
apply plugin: 'net.minecraftforge.gradle'
18+
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
19+
apply plugin: 'maven-publish'
20+
apply plugin: 'com.gradleup.shadow'
21+
apply plugin: 'org.spongepowered.mixin'
22+
23+
24+
version '1.3.6'
25+
group 'gkappa.wrapfix'
26+
archivesBaseName = 'WrapFix'
27+
28+
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
29+
30+
minecraft {
31+
// The mappings can be changed at any time, and must be in the following format.
32+
// snapshot_YYYYMMDD Snapshot are built nightly.
33+
// stable_# Stables are built at the discretion of the MCP team.
34+
// Use non-default mappings at your own risk. they may not always work.
35+
// Simply re-run your setup task after changing the mappings to update your workspace.
36+
mappings channel: 'stable', version: '39-1.12'
37+
38+
39+
// Default run configurations.
40+
// These can be tweaked, removed, or duplicated as needed.
41+
runs {
42+
client {
43+
jvmArg "-Dfml.coreMods.load=top.outlands.wrapfix.WrapFixLoadingPlugin"
44+
jvmArg "-Dmixin.hotSwap=true"
45+
jvmArg "-Dmixin.checks.interfaces=true"
46+
jvmArg "-Dmixin.debug=true"
47+
48+
workingDirectory project.file('run')
49+
50+
// Recommended logging data for a userdev environment
51+
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
52+
53+
// Recommended logging level for the console
54+
property 'forge.logging.console.level', 'debug'
55+
}
56+
57+
server {
58+
59+
jvmArg "-Dfml.coreMods.load=top.outlands.wrapfix.WrapFixLoadingPlugin"
60+
jvmArg "-Dmixin.hotSwap=true"
61+
jvmArg "-Dmixin.checks.interfaces=true"
62+
63+
// Recommended logging data for a userdev environment
64+
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
65+
66+
// Recommended logging level for the console
67+
property 'forge.logging.console.level', 'debug'
68+
}
69+
}
70+
}
71+
72+
configurations {
73+
shade
74+
shade.extendsFrom implementation
75+
76+
}
77+
78+
repositories {
79+
maven { url "https://repo.spongepowered.org/maven" }
80+
maven {
81+
url "https://cfa2.cursemaven.com"
82+
content {
83+
includeGroup "curse.maven"
84+
}
85+
metadataSources {
86+
artifact()
87+
}
88+
}
89+
maven {
90+
url "https://maven.cleanroommc.com"
91+
}
92+
flatDir {
93+
dirs "libs"
94+
}
95+
}
96+
97+
dependencies {
98+
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
99+
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
100+
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
101+
minecraft 'net.minecraftforge:forge:1.12.2-14.23.5.2860'
102+
103+
/*
104+
compileJar("org.spongepowered:mixin:0.8.5") {
105+
exclude module: "asm-commons"
106+
exclude module: "asm-tree"
107+
exclude module: "launchwrapper"
108+
exclude module: "guava"
109+
exclude module: "log4j-core"
110+
exclude module: "gson"
111+
exclude module: "commons-io"
112+
}*/
113+
shade "com.ibm.icu:icu4j:76.1"
114+
115+
// Common:
116+
annotationProcessor 'org.ow2.asm:asm-debug-all:5.2'
117+
annotationProcessor 'com.google.guava:guava:32.1.2-jre'
118+
annotationProcessor 'com.google.code.gson:gson:2.8.9'
119+
120+
// ForgeGradle:
121+
implementation ('zone.rong:mixinbooter:10.5') {
122+
transitive = false
123+
}
124+
annotationProcessor ('zone.rong:mixinbooter:10.5') {
125+
transitive = false
126+
}
127+
128+
compileOnly fg.deobf( "curse.maven:IndustrialWiresRE-521139:3474268" )
129+
compileOnly fg.deobf( "curse.maven:ImmersiveEngineering-231951:2974106" )
130+
compileOnly fg.deobf( "curse.maven:BetterQuesting-629629:4010084" )
131+
runtimeOnly "curse.maven:BetterQuesting-629629:4010084"
132+
compileOnly fg.deobf( "curse.maven:Botania-225643:3330934" )
133+
compileOnly fg.deobf( "curse.maven:Psi-241665:3085917" )
134+
compileOnly fg.deobf( "curse.maven:Baubles-227083:2518667" )
135+
compileOnly fg.deobf("curse.maven:smooth-font-285742:3944565")
136+
implementation "com.cleanroommc:configanytime:3.0"
137+
138+
139+
//compileOnly ("blus:immersiveengineering:0.12-98")
140+
//compileOnly ("mantle:industrialwires:1.8-38")
141+
//compileOnly ("loli:mixinbooter:3.2")
142+
//compileOnly ("funguy:betterquesting:3.5.329")
143+
144+
//runtimeOnly "curse.maven:MixinBooter-419286:3687785"
145+
}
146+
147+
// Example for how to get properties into the manifest for reading by the runtime..
148+
jar {
149+
manifest {
150+
attributes([
151+
"FMLCorePluginContainsFMLMod": "true",
152+
"TweakClass": "org.spongepowered.asm.launch.MixinTweaker",
153+
"FMLCorePlugin": "top.outlands.wrapfix.WrapFixLoadingPlugin",
154+
"ForceLoadAsMod": "true"
155+
])
156+
}
157+
//finalizedBy('reobfJar')
158+
}
159+
160+
// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing
161+
//publish.dependsOn('reobfJar')
162+
163+
java {
164+
withSourcesJar()
165+
}
166+
167+
168+
publishing {
169+
repositories {
170+
maven {
171+
name = "outlands"
172+
url = "https://maven.outlands.top/releases"
173+
credentials(PasswordCredentials)
174+
authentication {
175+
basic(BasicAuthentication)
176+
}
177+
}
178+
}
179+
publications {
180+
maven(MavenPublication) {
181+
groupId = "gkappa"
182+
artifactId = "wrapfix"
183+
version = version
184+
from components.java
185+
}
186+
}
187+
}
188+
189+
mixin {
190+
add sourceSets.main, "mixins.wrapfix.refmap.json"
191+
disableAnnotationProcessorCheck()
192+
}
193+
194+
shadowJar {
195+
archiveClassifier.set("shadow")
196+
configurations = [project.configurations.shade]
197+
relocate('com.ibm.icu','repack.com.ibm.icu')
198+
dependencies {
199+
include(dependency("com.ibm.icu:icu4j:76.1"))
200+
}
201+
manifest {
202+
inheritFrom jar.manifest
203+
}
204+
finalizedBy('reobfShadowJar')
205+
}
206+
207+
assemble.dependsOn shadowJar
208+
tasks.shadowJar.dependsOn("reobfJar")
209+
reobf {
210+
shadowJar {}
211+
}
212+
213+
artifacts {
214+
archives shadowJar
215+
archives sourcesJar
216+
}

gradle.properties

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Gradle Properties
2+
org.gradle.jvmargs = -Xmx3G -DsocksProxyHost=127.0.0.1 -DsocksProxyPort=1083
3+
4+
# Compilation Options
5+
generate_sources_jar = true
6+
generate_javadocs_jar = false
7+
8+
# Testing
9+
enable_junit_testing = true
10+
show_testing_output = false
11+
12+
# Shadow
13+
enable_shadow = false
14+
15+
# Set this to true if you want to use old LWJGL2 methods.
16+
# WARNING: Using LWJGL2 is no longer recommend, and some methods in LWJGL2 will be unavailable.
17+
# If you are porting an old mod lazily just set this to true.
18+
enable_lwjglx = true
19+
20+
# Mod Information
21+
# HIGHLY RECOMMEND complying with SemVer for mod_version: https://semver.org/
22+
mod_version = 2.0.0
23+
root_package = top.outlands
24+
mod_id = wrapfix
25+
mod_name = WrapFix
26+
27+
# Mod Metadata (Optional)
28+
mod_description =
29+
mod_url =
30+
mod_update_json =
31+
# Delimit authors with commas
32+
mod_authors =
33+
mod_credits =
34+
mod_logo_path =
35+
36+
# Run Configurations
37+
# If multiple arguments/tweak classes are stated, use spaces as the delimiter
38+
minecraft_username = Developer
39+
extra_jvm_args =
40+
enable_foundation_debug = false
41+
42+
# Maven Publishing (Provide secret: MAVEN_USER, MAVEN_PASS)
43+
publish_to_maven = false
44+
# Good for debugging artifacts before uploading to remote maven
45+
# GitHub actions won't run if this is true, test this by running the task `publishToMavenLocal`
46+
publish_to_local_maven = false
47+
maven_name = ${mod_name}
48+
maven_url =
49+
50+
# If any properties changes below this line, refresh gradle again to ensure everything is working correctly.
51+
# ----------------------------------------------------------------------------------------------------------------------
52+
53+
# Access Transformers
54+
# A way to change visibility of Minecraft's classes, methods and fields
55+
# An example access transformer file is given in the path: `src/main/resources/example_at.cfg`
56+
# AT files should be in the root of src/main/resources with the filename formatted as: `mod_id_at.cfg`
57+
# Use the property `access_transformer_locations` to state custom AT files if you aren't using the default `mod_id_at.cfg` location
58+
# If multiple locations are stated, use spaces as the delimiter
59+
# WARNING: Use MCP name in AT file. Unimined will remap it to srg name when building.
60+
use_access_transformer = false
61+
access_transformer_locations = ${mod_id}_at.cfg
62+
63+
# Coremods
64+
# The most powerful way to change java classes at runtime, it is however very primitive with little documentation.
65+
# Only make a coremod if you are absolutely sure of what you are doing
66+
# Change the property `coremod_includes_mod` to false if your coremod doesn't have a @Mod annotation
67+
# You MUST state a class name for `coremod_plugin_class_name` if you are making a coremod, the class should implement `IFMLLoadingPlugin`
68+
is_coremod = true
69+
coremod_includes_mod = true
70+
coremod_plugin_class_name = top.outlands.wrapfix.WrapFixLoadingPlugin
71+
72+
# AssetMover
73+
# Convenient way to allow downloading of assets from official vanilla Minecraft servers, CurseForge, or any direct links
74+
# Documentation: https://github.com/CleanroomMC/AssetMover
75+
use_asset_mover = false
76+
asset_mover_version = 2.5

gradle.properties.old

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
2+
# This is required to provide enough memory for the Minecraft decompilation process.
3+
org.gradle.jvmargs=-Xmx3G -DsocksProxyHost=127.0.0.1 -DsocksProxyPort=1083
4+
5+
org.gradle.daemon=false
6+
7+
org.gradle.java.installations.auto-detect=false
8+
org.gradle.java.installations.paths=/usr/lib/jvm/java-8-openjdk-amd64/

gradle/scripts/dependencies.gradle

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
apply from: 'gradle/scripts/helpers.gradle'
2+
3+
repositories {
4+
// Other repositories described by default:
5+
// CleanroomMC: https://maven.cleanroommc.com
6+
maven {
7+
name = 'Cleanroom'
8+
url = 'https://repo.cleanroommc.com/releases/'
9+
}
10+
maven {
11+
name = 'CurseMaven'
12+
url = 'https://curse.cleanroommc.com'
13+
}
14+
maven {
15+
name = 'Modrinth'
16+
url = 'https://api.modrinth.com/maven'
17+
}
18+
maven {
19+
name = 'CurseMaven'
20+
url = 'https://cursemaven.com'
21+
}
22+
mavenCentral()
23+
mavenLocal() // Must be last for caching to work
24+
}
25+
26+
dependencies {
27+
compileOnly "com.cleanroommc:sponge-mixin:0.20.12+mixin.0.8.7"
28+
if (propertyBool('enable_lwjglx')) {
29+
compileOnly "com.cleanroommc:lwjglx:1.0.0"
30+
}
31+
modImplementation 'mezz:jei:4.29.15:dev'
32+
modImplementation 'curse.maven:industrial-wires-re-521139:3474268'
33+
modImplementation 'curse.maven:immersive-engineering-231951:2974106'
34+
modImplementation 'curse.maven:better-questing-unofficial-629629:7791794'
35+
modImplementation 'curse.maven:botania-225643:3330934'
36+
modImplementation 'curse.maven:Psi-241665:3085917'
37+
modImplementation 'curse.maven:bubbles-a-baubles-fork-995393:7736064'
38+
modImplementation 'curse.maven:smooth-font-285742:3944565'
39+
40+
// Example - Dependency descriptor:
41+
// 'com.google.code.gson:gson:2.8.6' << group: com.google.code.gson, name:gson, version:2.8.6
42+
// 'group:name:version:classifier' where classifier is optional
43+
44+
// Example - CurseMaven dependencies:
45+
// 'curse.maven:had-enough-items-557549:4543375' << had-enough-items = project slug, 557549 = project id, 4543375 = file id
46+
// Full documentation: https://cursemaven.com/
47+
48+
// Example - Modrinth dependencies:
49+
// 'maven.modrinth:jei:4.16.1.1000' << jei = project name, 4.16.1.1000 = file version
50+
// Full documentation: https://docs.modrinth.com/docs/tutorials/maven/
51+
52+
// Common dependency types (configuration):
53+
// implementation = dependency available at both compile time and runtime
54+
// runtimeOnly = runtime dependency
55+
// compileOnly = compile time dependency
56+
// annotationProcessor = annotation processing dependencies
57+
// contain = bundle dependency jars into final artifact, will extract them in mod loading. Can be used it as jar-in-jar
58+
// shadow = bundle dependencies into shadow output artifact (relocation configurable in shadowJar task)
59+
// modImplementation = mod dependency available at both compile time and runtime
60+
// modCompileOnly = mod dependency available only at compile time
61+
62+
// Transitive dependencies:
63+
// (Dependencies that your dependency depends on)
64+
// If you wish to exclude transitive dependencies in the described dependencies
65+
// Use a closure as such:
66+
// implementation ('com.google.code.gson:gson:2.8.6') {
67+
// transitive = false
68+
// }
69+
}

gradle/scripts/extra.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// You may write any gradle buildscript component in this file
2+
// This file is automatically applied after build.gradle + dependencies.gradle is ran
3+
4+
// If you wish to use the default helper methods, uncomment the line below
5+
// apply from: 'gradle/scripts/helpers.gradle'

0 commit comments

Comments
 (0)