-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathbuild.gradle
More file actions
149 lines (137 loc) · 4.77 KB
/
build.gradle
File metadata and controls
149 lines (137 loc) · 4.77 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
buildscript {
repositories {
gradlePluginPortal()
maven {url = 'https://maven.minecraftforge.net/'}
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.4'
}
}
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'java'
version = "2.6.15"
version = "2.6.15"
group = "ofdev" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "aa_do_not_rename_OptiFineDevTweaker"
sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
compileJava {
sourceCompatibility = targetCompatibility = '1.8'
}
repositories {
maven { url = 'https://maven.minecraftforge.net/' }
mavenCentral()
maven {
url "https://libraries.minecraft.net/"
}
}
configurations {
shadow
}
dependencies {
shadow("org.ow2.asm:asm-debug-all:5.2")
compileOnly('cpw.mods:modlauncher:4.0.+') {
transitive = false
}
compileOnly 'lzma:lzma:0.0.1'
compileOnly('net.minecraft:launchwrapper:1.12') {
transitive = false
}
// log4j version from 1.7.10, the oldest we support
compileOnly("org.apache.logging.log4j:log4j-api:2.0-beta9")
}
task shadowJarLW(type: ShadowJar) {
configurations = [project.configurations.shadow]
from(sourceSets.main.output) {
include('ofdev/launchwrapper/**', 'ofdev/common/**')
}
relocate('org.objectweb', 'ofdev.launchwrapper.org.objectweb')
classifier = "launchwrapper"
manifest {
attributes([
"TweakClass": "ofdev.launchwrapper.OptifineDevTweakerWrapper",
"TweakOrder": "-10000"
])
}
}
task shadowJarML(type: ShadowJar) {
from sourceSets.main.output
include('ofdev/modlauncher/**', 'ofdev/common/**')
classifier = "modlauncher"
manifest {
attributes([
"Specification-Title": "ofdevtweaker",
"Specification-Vendor": "ofdevtweaker",
"Specification-Version": "1", // We are version 1 of ourselves
"Implementation-Title": project.name,
"Implementation-Version": "${version}",
"Implementation-Vendor" :"ofdevtweaker",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
task shadowJarAll(type: ShadowJar) {
dependsOn(shadowJarLW)
from(sourceSets.main.output) {
include('ofdev/modlauncher/**')
include('META-INF/**')
}
from(shadowJarLW.archivePath.absolutePath) {
include('*')
}
classifier = "all"
manifest {
attributes([
"TweakClass": "ofdev.launchwrapper.OptifineDevTweakerWrapper",
"TweakOrder": "-10000",
"Specification-Title": "ofdevtweaker",
"Specification-Vendor": "ofdevtweaker",
"Specification-Version": "1", // We are version 1 of ourselves
"Implementation-Title": project.name,
"Implementation-Version": "${version}",
"Implementation-Vendor" :"ofdevtweaker",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
task shadowJarAllNoVersionForSymlink(type: ShadowJar) {
dependsOn(shadowJarLW)
from(sourceSets.main.output) {
include('ofdev/modlauncher/**')
include('META-INF/**')
}
from(shadowJarLW.archivePath.absolutePath) {
include('*')
}
version(null)
classifier = "all"
manifest {
attributes([
"TweakClass": "ofdev.launchwrapper.OptifineDevTweakerWrapper",
"TweakOrder": "-10000",
"Specification-Title": "ofdevtweaker",
"Specification-Vendor": "ofdevtweaker",
"Specification-Version": "1", // We are version 1 of ourselves
"Implementation-Title": project.name,
"Implementation-Version": "${version}",
"Implementation-Vendor" :"ofdevtweaker",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
build.dependsOn(shadowJarAll, shadowJarML, shadowJarLW, shadowJarAllNoVersionForSymlink)
jar {
manifest {
attributes([
"TweakClass": "ofdev.launchwrapper.OptifineDevTweakerWrapper",
"TweakOrder": "-10000",
"Specification-Title": "ofdevtweaker",
"Specification-Vendor": "ofdevtweaker",
"Specification-Version": "1",
"Implementation-Title": project.name,
"Implementation-Version": "${version}",
"Implementation-Vendor" :"ofdevtweaker",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}