-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
118 lines (98 loc) · 2.43 KB
/
build.gradle
File metadata and controls
118 lines (98 loc) · 2.43 KB
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
plugins {
id 'java-library'
id 'net.minecraftforge.gradle' version '6.0.+'
id 'idea'
id 'maven-publish'
}
java {
toolchain.languageVersion = JavaLanguageVersion.of(8)
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
}
idea {
module {
inheritOutputDirs = true
excludeDirs += file('run')
}
}
ext {
loadingPlugin = 'me.theandrey.mods.sidefix.LoadingPlugin'
}
legacy {
fixClasspath = true
extractMappings = true
attachMappings = true
}
minecraft {
mappings channel: 'stable', version: '39-1.12'
// Default run configurations.
runs {
configureEach {
workingDirectory project.file('run')
environment 'MC_VERSION', '1.12.2'
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' // Recommended logging data for a userdev environment
property 'forge.logging.console.level', 'debug' // Recommended logging level for the console
property 'fml.coreMods.load', project.loadingPlugin
}
client {
}
server {
args '--nogui'
}
}
}
repositories {
maven {
name "Su5ed LegacyDev Fork"
url "https://maven.su5ed.dev/releases"
}
}
dependencies {
minecraft 'net.minecraftforge:forge:1.12.2-14.23.5.2860'
constraints {
implementation('net.minecraftforge:legacydev:0.3.0.0-legacyExt') {
because 'needed to have all ATs work properly'
}
implementation('org.ow2.asm:asm-debug-all:5.2') {
because 'newer ASM versions include module info that causes errors in Java 8'
}
}
configurations.forEach {
// mergetool pollutes the classpath with conflicting classes
it.exclude(group: 'net.minecraftforge', module: 'mergetool')
// legacydev forge dep wants fatjar as the classifier, but 3.0 lacks it
it.resolutionStrategy.eachDependency {
if (it.requested.module.toString() == "net.minecraftforge:legacydev") {
it.artifactSelection {
it.selectArtifact(DependencyArtifact.DEFAULT_TYPE, null, null)
}
}
}
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
jar {
manifest {
attributes 'FMLCorePlugin': project.loadingPlugin
attributes 'FMLCorePluginContainsFMLMod': 'false'
}
}
tasks.register('sourcesJar', Jar) {
archiveClassifier.set('sources')
from sourceSets.main.java
}
artifacts {
archives tasks.named('sourcesJar')
}
tasks.withType(GenerateModuleMetadata).configureEach {
enabled = false
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact tasks.named('jar')
artifact tasks.named('sourcesJar')
}
}
}