-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
115 lines (96 loc) · 3.23 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
buildscript {
repositories {
jcenter()
maven { url = "https://files.minecraftforge.net/maven" }
}
dependencies {
classpath "net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kt_version"
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'kotlin'
apply plugin: 'idea'
apply plugin: 'java'
version = mod_version
group = mod_author + "." + mod_name
archivesBaseName = mod_name
ext.mod_name = mod_name.toLowerCase()
ext.capitalized_name = mod_name.capitalize()
ext.mod_fancy_name = project.hasProperty("mod_fancy_name") ? project.mod_fancy_name : ext.capitalized_name
ext.mod_author = mod_author.toLowerCase()
sourceCompatibility = 1.8
targetCompatibility = 1.8
minecraft {
version = project.mc_version + "-" + project.forge_version
mappings = project.mcp_version
runDir = "run"
useDepAts = true
replaceIn 'ClassyHats.java'
replaceIn 'ClassyHats.kt'
replaceIn "mcmod.info"
replace "%VERSION%", project.mod_version
clientJvmArgs += ["-Dfml.coreMods.load=$corePlugin"]
serverJvmArgs += ["-Dfml.coreMods.load=$corePlugin"]
}
sourceSets {
main {
java {
srcDirs += "src/main/kotlin"
}
}
}
idea {
module {
excludeDirs += [file("run"), file("out"), file("gradle"), file(".idea")]
inheritOutputDirs = true
}
if (it.project != null)
project {
jdkName = '1.8'
languageLevel = '1.8'
}
}
tasks.withType(JavaCompile).all {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
compileKotlin {
kotlinOptions {
javaParameters = true
jvmTarget = "1.8"
}
}
repositories {
mavenCentral()
maven { url = "http://dvs1.progwml6.com/files/maven" }
maven { url = "http://maven.bluexin.be/repository/snapshots/" }
}
dependencies {
compile("org.jetbrains.kotlin:kotlin-stdlib:$kt_version")
deobfCompile "com.teamwizardry.librarianlib:librarianlib-${project.mc_version}:$liblib_version-SNAPSHOT"
compile "mezz.jei:jei_${project.mc_version}:$jei_version:api"
runtime "mezz.jei:jei_${project.mc_version}:$jei_version"
}
processResources {
inputs.property "version", project.version
inputs.property "forge_version", project.forge_version
inputs.property "mc_version", project.mc_version
inputs.property "mod_id", project.mod_name
inputs.property "mod_name", project.mod_fancy_name
inputs.property "description", project.hasProperty("mod_description") ? project.mod_description : ""
inputs.property "author", project.mod_author
from(sourceSets.main.resources.srcDirs) {
include "mcmod.info", "pack.mcmeta"
expand "version": project.version,
"forge_version": project.forge_version,
"mc_version": project.mc_version,
"mod_id": project.mod_name,
"mod_name": project.hasProperty("mod_fancy_name") ? project.mod_fancy_name : project.mod_name,
"description": project.hasProperty("mod_description") ? project.mod_description : "",
"author": project.mod_author
}
from(sourceSets.main.resources.srcDirs) {
exclude "mcmod.info", "pack.mcmeta"
}
}