-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
44 lines (39 loc) · 1.38 KB
/
build.gradle.kts
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
import net.minecraftforge.gradle.common.BaseExtension
import net.minecraftforge.gradle.user.UserBaseExtension
buildscript {
val fg_version: String by project
repositories {
jcenter()
maven { url = uri("http://files.minecraftforge.net/maven") }
}
dependencies {
classpath("net.minecraftforge.gradle:ForgeGradle:$fg_version")
}
}
val mod_version: String by project
val mod_description: String by project
val mod_build_number: String by project
val forge_version: String by project
val mappings_version: String by project
val mc_version: String by project
val accepted_mc_versions: String by project
apply(plugin = "net.minecraftforge.gradle.forge")
version = "$mod_version+$mod_build_number"
group = "ru.pearx.customwhitelist"
description = mod_description
configure<BasePluginConvention> {
archivesBaseName = "customwhitelist-$mc_version"
}
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_8
}
configure<UserBaseExtension> {
version = "$mc_version-$forge_version"
runDir = "run"
mappings = mappings_version
replace("@VERSION@", mod_version)
replace("@DESCRIPTION@", mod_description)
replace("@MCVERSION@", mc_version)
replace("acceptedMinecraftVersions = \"\"", "acceptedMinecraftVersions = \"$accepted_mc_versions\"")
replaceIn("CustomWhitelist.java")
}