-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle
138 lines (126 loc) · 3.73 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
134
135
136
137
138
plugins {
id 'net.minecraftforge.gradle' version '[6.0,6.2)'
id 'org.parchmentmc.librarian.forgegradle' version '1.+'
id 'org.spongepowered.mixin' version '0.7.+'
id 'com.matthewprenger.cursegradle' version '1.4.0'
id "com.modrinth.minotaur" version "2.4.5"
id 'de.undercouch.download' version '3.3.0'
id 'idea'
id 'eclipse'
}
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
configurations {
optionalRuntime
runtime.extendsFrom optionalRuntime // optionalRuntime dependencies are downloaded but not exported to POM
}
sourceSets {
main {
java {
for(String s : getDisabledFolder(project)) {
exclude ('**/' + s + '/*')
}
}
}
}
idea {
module {
for (String excludeDirName in ["run", "out", "logs"]) {
File excludeDir = new File(projectDir, excludeDirName)
excludeDirs.add(excludeDir)
}
}
}
def getDisabledFolder(project) {
Set<String> set = new HashSet<>();
if (!include_biomes_o_plenty.toBoolean()) {
set += 'bop'
}
if (!include_waila.toBoolean()) {
set += 'waila'
}
if (!include_immersive_engineering.toBoolean()) {
set += 'immersive_engineering'
}
if (!include_evilcraft.toBoolean()) {
set += 'evilcraft'
}
if (!include_tough_as_nails.toBoolean()) {
set += 'tan'
}
if (!include_nyctophobia.toBoolean()) {
set += 'graveyard'
}
if (!include_survive.toBoolean()) {
set += 'survive'
}
if (!include_diet.toBoolean()) {
set += 'diet'
}
if (!include_tinkers_construction.toBoolean()) {
set += 'tconstruct'
}
if (!include_crafttweaker.toBoolean()) {
set += 'crafttweaker'
}
if (!include_betteranimalsplus.toBoolean()) {
set += 'betteranimalsplus'
}
if (!include_consecration.toBoolean()) {
set += 'consecration'
}
if (!include_minecraft_comes_alive.toBoolean()) {
set += 'mca'
}
if (!include_minecolonies.toBoolean()) {
set += 'minecolonies'
}
if (!include_player_companion.toBoolean()) {
set += 'player_companion'
}
if (!include_betteranimals.toBoolean()) {
set += 'betteranimals'
}
if (!include_bloodmagic.toBoolean()) {
set += 'bloodmagic'
}
if (!include_mekanism.toBoolean()) {
set += 'mekanism'
}
if (!include_jade.toBoolean()) {
set += 'jade'
}
if (!include_cold_sweat.toBoolean()) {
set += 'coldsweat'
}
if (!include_guard_villagers.toBoolean()) {
set += 'guardvillagers'
}
return set;
}
group = mod_group_id
base {
archivesName = mod_id
mod_version = "1.0.0"
}
apply from: 'gradle/artifacts.gradle'
apply from: 'gradle/versioning.gradle'
apply from: 'gradle/forge.gradle'
apply from: 'gradle/deploy.gradle'
tasks.named('processResources', ProcessResources).configure {
var replaceProperties = [
minecraft_version: minecraft_version, minecraft_version_range: minecraft_version_range,
forge_version: forge_version, forge_version_range: forge_version_range,
loader_version_range: loader_version_range,
mod_id: mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version,
mod_authors: mod_authors, mod_description: mod_description,
jei_version: jei_version,
vampirism_version: vampirism_version,
guideapi_version: guideapi_version,
mod_url: mod_url,
mod_issue_tracker: mod_issue_tracker,
]
inputs.properties replaceProperties
filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) {
expand replaceProperties + [project: project]
}
}