-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle
133 lines (115 loc) · 3.45 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
plugins {
id 'java-library'
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'net.neoforged.moddev' version '1.0.+'
id 'org.sinytra.wiki.toolkit' version '0.1.10'
}
tasks.named('wrapper', Wrapper).configure {
// Define wrapper values here so as to not have to always do so when updating gradlew.properties.
// Switching this to Wrapper.DistributionType.ALL will download the full gradle sources that comes with
// documentation attached on cursor hover of gradle classes and methods. However, this comes with increased
// file size for Gradle. If you do switch this to ALL, run the Gradle wrapper task twice afterwards.
// (Verify by checking gradle/wrapper/gradle-wrapper.properties to see if distributionUrl now points to `-all`)
distributionType = Wrapper.DistributionType.BIN
}
group = "net.commoble.${modid}"
base { archivesName="${modid}-${mc_version}" }
version = "${mod_version}"
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
sourceSets
{
main
gametest
datagen
}
// include resources generated from datagen in main
sourceSets.main.resources { srcDir 'src/generated/resources' }
neoForge {
version = "${neo_version}"
mods {
"${modid}" {
sourceSet(sourceSets.main)
}
}
runs {
client {
client()
}
server {
server()
}
gameTestServer {
type = "gameTestServer"
}
data {
data()
programArguments.addAll '--mod', "morered_datagen", '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
}
configureEach {
}
}
}
repositories {
mavenCentral()
maven {url = "https://maven.blamejared.com/"}
maven {url = "https://maven.commoble.net"}
maven {url = "https://maven.terraformersmc.com"}
maven { url = 'https://maven.sinytra.org/' }
}
// Sets up a dependency configuration called 'localRuntime'.
// This configuration should be used instead of 'runtimeOnly' to declare
// a dependency that will be present for runtime testing but that is
// "optional", meaning it will not be pulled by dependents of this mod.
configurations {
runtimeClasspath.extendsFrom localRuntime
}
dependencies {
jarJar(implementation("net.commoble.exmachina:exmachina-${exmachina_mc_version}:${exmachina_version}"))
//compileOnly "mezz.jei:jei-${mc_version}-common-api:${jei_version}"
//compileOnly "mezz.jei:jei-${mc_version}-neoforge-api:${jei_version}"
// at runtime, use the full JEI jar for NeoForge
//localRuntime "mezz.jei:jei-${mc_version}-neoforge:${jei_version}"
//compileOnly "dev.emi:emi-neoforge:${emi_version}:api"
//localRuntime "dev.emi:emi-neoforge:${emi_version}"
localRuntime "org.sinytra:item-asset-export-neoforge:${item_asset_export_version}"
}
java
{
withSourcesJar()
withJavadocJar()
}
artifacts {
archives javadocJar
archives sourcesJar
}
// run "gradlew build publish" to build jars and generate a maven repo for them
// run "gradlew build" to build the jars without mavening them
publishing {
publications {
mavenJava(MavenPublication) {
artifactId project.archivesBaseName
artifact jar
artifact sourcesJar
artifact javadocJar
}
}
repositories {
maven {
name="localMaven"
url "file:///${project.projectDir}/maven"
}
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
wiki {
docs {
morered {
root = file('docs')
exportedAssetNamespaces = ['morered']
}
}
}