-
-
Notifications
You must be signed in to change notification settings - Fork 43
/
build.gradle
100 lines (85 loc) · 2.99 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
buildscript {
repositories {
jcenter()
maven { url "https://repo.nallar.me/" }
maven { url "https://plugins.gradle.org/m2/" }
maven { url "http://files.minecraftforge.net/maven" }
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath 'org.minimallycorrect.modpatcher:ModPatcherGradle:0.1-SNAPSHOT'
classpath 'org.minimallycorrect.libloader:LibLoaderGradle:0.1-SNAPSHOT'
classpath 'org.minimallycorrect.gradle:DefaultsPlugin:0.0.28'
}
}
apply plugin: 'org.minimallycorrect.gradle.DefaultsPlugin'
apply plugin: 'org.minimallycorrect.modpatcher.ModPatcherGradle'
apply plugin: 'org.minimallycorrect.libloader.LibLoaderGradle'
group = 'org.minimallycorrect.tickthreading'
minimallyCorrectDefaults {
minecraft = 1.12
fmlCorePlugin = "org.minimallycorrect.tickthreading.mod.TickThreadingCore"
fmlCorePluginContainsFmlMod = true
labels = ['minecraft-mod', 'threading', 'minecraft', 'java', 'performance']
description = "Multi-threaded minecraft. Performance over correctness. What could go wrong?"
} ()
gradle.startParameter.showStacktrace = org.gradle.api.logging.configuration.ShowStacktrace.ALWAYS
modpatcher {
mixinPackage = "org.minimallycorrect.tickthreading.mixin"
extractGeneratedSources = true
generateInheritanceHierarchy = true
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
testCompile 'junit:junit:4.12'
compileOnly 'org.jetbrains:annotations:15.0'
testCompileOnly 'org.projectlombok:lombok:1.16.18'
testCompileOnly 'org.jetbrains:annotations:15.0'
libLoader "org.minimallycorrect.typedconfig:TypedConfig:0.1-SNAPSHOT"
libLoader "org.minimallycorrect.modpatcher:ModPatcher:${minimallyCorrectDefaults.minecraft}-SNAPSHOT"
}
if (System.env.GRADLE_USER_HOME) {
ext.homeDir = System.env.GRADLE_USER_HOME + '/'
} else {
ext.homeDir = System.properties['user.home'] + '/.gradle/'
}
ext.mappingsPath = homeDir + 'caches/minecraft/net/minecraftforge/forge/' + minimallyCorrectDefaults.forge + '/unpacked/conf/'
def jarConfig = {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from mappingsPath + 'packaged.srg'
from mappingsPath + 'methods.csv'
from mappingsPath + 'fields.csv'
from './generated/extendsMap.obj'
}
jar jarConfig
jar {
classifier = 'extended'
}
def outputJarFile = (File) jar.outputs.files.getSingleFile()
task coreJar(type: Zip, dependsOn: reobfJar) {
from zipTree(outputJarFile).matching { exclude 'org/minimallycorrect/tickthreading/mixin/extended/**' }
archiveName = jar.archiveName.replace('-' + jar.classifier, "-core")
destinationDir = jar.destinationDir
exclude('org/minimallycorrect/tickthreading/mixin/extended**')
}
artifacts {
archives coreJar
}
build.dependsOn(coreJar)
// Source compiler configuration
tasks.withType(JavaCompile) {
sourceCompatibility = 8
targetCompatibility = 8
options.with {
deprecation = true
encoding = 'UTF-8'
compilerArgs <<
"-XDignore.symbol.file=true" <<
"-Xlint:all" <<
"-Xlint:-path" <<
"-Xlint:-processing"
fork = true
forkOptions.executable = 'javac'
}
}