-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
131 lines (110 loc) · 3.16 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
buildscript {
dependencies {
classpath 'org.ow2.asm:asm:9.0'
classpath 'org.ow2.asm:asm-commons:9.0'
classpath 'org.ow2.asm:asm-tree:9.0'
classpath 'org.ow2.asm:asm-util:9.0'
classpath 'dev.architectury.loom:dev.architectury.loom.gradle.plugin:0.7.2-SNAPSHOT'
}
}
plugins {
id 'java'
id 'dev.architectury.loom' version '0.7.2-SNAPSHOT'
id 'maven-publish'
}
repositories {
mavenCentral()
maven {
url 'https://maven.minecraftforge.net/'
}
maven {
url 'https://maven.architectury.dev/'
}
maven {
url 'https://files.minecraftforge.net/maven/'
}
maven {
url 'https://maven.fabricmc.net/'
}
maven {
name 'IzzelAliz Maven'
url 'https://maven.izzel.io/releases/'
content {
includeGroup 'icyllis.modernui'
}
}
maven {
url 'https://maven.shedaniel.me/'
}
gradlePluginPortal()
}
apply plugin: 'java'
version = "${minecraft_version}-${mod_version}"
group = 'cc.sukazyo.sericons'
archivesBaseName = 'SerializableConsciousness'
loom {
silentMojangMappingsLicense()
dataGen {
mod 'serializableconsciousness'
}
addTaskBeforeRun(":${project.name}:classes")
}
sourceSets {
main {
resources {
srcDirs += 'src/generated/resources'
exclude '.cache'
}
}
}
dependencies {
minecraft "com.mojang:minecraft:${minecraft_version}"
mappings minecraft.officialMojangMappings()
forge "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
compileOnly "com.google.code.findbugs:jsr305:3.+"
modCompile group: 'icyllis.modernui', name: 'ModernUI-Forge', version: '1.16.5-2.5.2.87'
}
java {
withSourcesJar()
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
// The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too
// JDK 9 introduced a new way of specifying this that will make sure no newer classes or methods are used.
// We'll use that if it's available, but otherwise we'll use the older option.
def targetVersion = 8
if (JavaVersion.current().isJava9Compatible()) {
it.options.release.set(targetVersion)
}
}
processResources {
inputs.property 'version', mod_version
filesMatching("META-INF/mods.toml") {
expand 'version': mod_version
}
}
jar {
manifest {
attributes([
"Specification-Title" : "SerializableConsciousness",
"Specification-Vendor" : "Timicasto",
"Specification-Version" : "1",
"Implementation-Title" : project.name,
"Implementation-Version" : project.version,
"Implementation-Vendor" : "Timicasto",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact(remapJar) {
builtBy remapJar
}
artifact(sourcesJar) {
builtBy remapSourcesJar
}
}
}
}