1+ plugins {
2+ id ' java-library'
3+ id ' net.neoforged.moddev' version ' 2.0.95'
4+ }
5+
6+ /* tasks.named('wrapper', Wrapper).configure {
7+ // Define wrapper values here so as to not have to always do so when updating gradlew.properties.
8+ // Switching this to Wrapper.DistributionType.ALL will download the full gradle sources that comes with
9+ // documentation attached on cursor hover of gradle classes and methods. However, this comes with increased
10+ // file size for Gradle. If you do switch this to ALL, run the Gradle wrapper task twice afterwards.
11+ // (Verify by checking gradle/wrapper/gradle-wrapper.properties to see if distributionUrl now points to `-all`)
12+ distributionType = Wrapper.DistributionType.BIN
13+ }*/
14+
15+ neoForge {
16+ // Specify the version of NeoForge to use.
17+ version = project. neoforge_version
18+
19+ // This line is optional. Access Transformers are automatically detected
20+ // accessTransformers = project.files('src/main/resources/META-INF/accesstransformer.cfg')
21+
22+ // Default run configurations.
23+ // These can be tweaked, removed, or duplicated as needed.
24+ runs {
25+ server {
26+ server()
27+ programArgument ' --nogui'
28+ }
29+
30+ configureEach {
31+ systemProperty ' forge.logging.markers' , ' REGISTRIES'
32+ logLevel = org.slf4j.event.Level . DEBUG
33+ }
34+ }
35+
36+ /* mods {
37+ // define mod <-> source bindings
38+ // these are used to tell the game which sources are for which mod
39+ // multi mod projects should define one per mod
40+ "${mod_id}" {
41+ sourceSet(sourceSets.main)
42+ }
43+ }*/
44+ }
45+
46+ // Include resources generated by data generators.
47+ sourceSets. main. resources { srcDir ' src/generated/resources' }
48+
49+ // Sets up a dependency configuration called 'localRuntime'.
50+ // This configuration should be used instead of 'runtimeOnly' to declare
51+ // a dependency that will be present for runtime testing but that is
52+ // "optional", meaning it will not be pulled by dependents of this mod.
53+ configurations {
54+ runtimeClasspath. extendsFrom localRuntime
55+ zip. exclude group : " net.fabricmc" , module : " fabric-loader"
56+ }
57+
58+ dependencies {
59+ zip compileOnly(project(path : ' :loader-common' , configuration : ' default' ))
60+
61+ // Example optional mod dependency with JEI
62+ // The JEI API is declared for compile time use, while the full JEI artifact is used at runtime
63+ // compileOnly "mezz.jei:jei-${mc_version}-common-api:${jei_version}"
64+ // compileOnly "mezz.jei:jei-${mc_version}-neoforge-api:${jei_version}"
65+ // We add the full version to localRuntime, not runtimeOnly, so that we do not publish a dependency on it
66+ // localRuntime "mezz.jei:jei-${mc_version}-neoforge:${jei_version}"
67+
68+ compileOnly " maven.modrinth:proxy-compatible-forge:${ project.proxy_forge_version} "
69+
70+ // Example mod dependency using a mod jar from ./libs with a flat dir repository
71+ // This maps to ./libs/coolmod-${mc_version}-${coolmod_version}.jar
72+ // The group id is ignored when searching -- in this case, it is "blank"
73+ // implementation "blank:coolmod-${mc_version}:${coolmod_version}"
74+
75+ // Example mod dependency using a file as dependency
76+ // implementation files("libs/coolmod-${mc_version}-${coolmod_version}.jar")
77+
78+ // Example project dependency using a sister or child project:
79+ // implementation project(":myproject")
80+
81+ // For more info:
82+ // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
83+ // http://www.gradle.org/docs/current/userguide/dependency_management.html
84+ }
85+
86+ jar {
87+ archiveFileName = " protoweaver-${ version} -neoforge.jar"
88+ from {
89+ exclude " architectury.common.marker"
90+ duplicatesStrategy = DuplicatesStrategy . EXCLUDE
91+ configurations. zip. collect { it. isDirectory() ? it : zipTree(it) }
92+ }
93+ }
0 commit comments