-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
138 lines (111 loc) · 2.69 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
/////////////////////////////
// BuildScript and Plugins //
/////////////////////////////
buildscript {
repositories {
jcenter()
maven {
name 'Forge'
url 'http://files.minecraftforge.net/maven'
}
}
dependencies {
classpath(group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true) {
exclude group: 'trove', module: 'trove'
}
}
}
plugins {
id 'org.jetbrains.kotlin.jvm' version "$kotlin_version"
id "com.github.hierynomus.license" version "0.15.0"
id 'com.github.johnrengelman.shadow' version '4.0.4'
}
apply plugin: 'net.minecraftforge.gradle'
configurations {
embed
compile.extendsFrom embed
}
//////////////////
// Dependencies //
//////////////////
repositories {
mavenCentral()
maven {
url 'https://files.minecraftforge.net/maven'
}
maven {
url 'https://minecraft.curseforge.com/api/maven/'
}
}
dependencies {
minecraft group: 'net.minecraftforge', name: 'forge', 'version': "$minecraft_version-$forge_version"
compile group: 'kottle', name: 'Kottle', 'version': kottle_version
}
minecraft {
mappings channel: 'snapshot', version: forge_mappings
runs {
client {
properties 'forge.logging.markers': 'REGISTRIES,REGISTRYDUMP'
properties 'forge.logging.console.level': 'debug'
properties 'fml.earlyprogresswindow': 'false'
mods {
makro {
source sourceSets.main
}
}
}
}
}
///////////////
// Artifacts //
///////////////
tasks {
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
}
version = "$minecraft_version-$mod_version"
processResources {
inputs.property "version", project.version
from(sourceSets.main.resources.srcDirs) {
include 'META-INF/mods.toml'
expand 'version':project.version
}
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
shadowJar {
classifier = ''
configurations = [project.configurations.embed]
}
tasks.build.dependsOn shadowJar
reobf {
shadowJar {}
}
task deobfJar(type: Jar) {
from sourceSets.main.output
classifier = 'deobf'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
classifier = 'sources'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives deobfJar
archives sourcesJar
archives javadocJar
}
///////////////
// Licencing //
///////////////
license {
include "**/*.kt"
}