forked from The-Aether-Team/The-Aether
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
151 lines (124 loc) · 4.71 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
139
140
141
142
143
144
145
146
147
148
149
150
151
buildscript {
repositories {
maven {
name 'Forge'
url 'https://files.minecraftforge.net/maven'
}
maven {
name 'Sponge'
//url 'https://repo.spongepowered.org/repository/maven-public/'
url 'https://sizableshrimp.me/maven'
}
maven {
name 'Gradle'
url "https://plugins.gradle.org/m2/"
}
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.0+', changing: true
//classpath group: 'org.spongepowered', name: 'mixingradle', version: '0.7-SNAPSHOT'
classpath group: 'org.spongepowered', name: 'mixingradle', version: '0.8-SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'org.spongepowered.mixin'
version = project.mc_version + '-v' + project.aether_version
group = 'com.gildedgames.aether' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'aether'
java.toolchain.languageVersion = JavaLanguageVersion.of(8) // Mojang ships Java 8 to end users, so your mod should target Java 8.
minecraft {
mappings channel: 'official', version: project.mappings
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
runs {
client {
workingDirectory project.file('run')
//Only uncomment this if you actually need the debug logging! If you enable this the log will be full of incredibly useless information spam
//property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
//property 'forge.logging.console.level', 'debug'
property 'mixin.env.disableRefMap', 'true'
arg "--mixin=aether.mixins.json"
mods {
aether {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run')
//property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
//property 'forge.logging.console.level', 'debug'
mods {
aether {
source sourceSets.main
}
}
}
data {
workingDirectory project.file('run')
//property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
//property 'forge.logging.console.level', 'debug'
args '--mod', 'aether', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/'), '--existing', file('src/generated/resources/')
environment 'target', 'fmluserdevdata'
mods {
aether {
source sourceSets.main
}
}
}
}
}
sourceSets.main.resources {
srcDir 'src/generated/resources'
}
dependencies {
minecraft "net.minecraftforge:forge:${project.mc_version}-${project.forge_version}"
annotationProcessor 'org.spongepowered:mixin:0.8.2:processor'
compileOnly fg.deobf("top.theillusivec4.curios:curios-forge:${project.curios_version}:api")
runtimeOnly fg.deobf("top.theillusivec4.curios:curios-forge:${project.curios_version}")
compileOnly fg.deobf("com.blamejared.crafttweaker:CraftTweaker-${project.crafttweaker_version}")
compileOnly fg.deobf("curse.maven:colytra-280200:${project.colytra_version}")
runtimeOnly fg.deobf("io.github.ultimateboomer:smoothboot-forge:${project.smoothboot_version}")
}
repositories {
maven { url = "https://maven.blamejared.com" }
maven { url = "https://maven.theillusivec4.top/" }
maven { url = "https://jcenter.bintray.com/" }
maven { url = "https://www.cursemaven.com" }
}
jar {
manifest {
attributes([
"Specification-Title": project.name,
"Specification-Vendor": "Gilded Games",
"Specification-Version": "1", // We are version 1 of ourselves
"Implementation-Title": project.name,
"Implementation-Version": "${archiveVersion}",
"Implementation-Vendor" : "Gilded Games",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"MixinConfigs": "aether.mixins.json"
])
}
}
def reobfFile = file("$buildDir/reobfJar/output.jar")
def reobfArtifact = artifacts.add('default', reobfFile) {
type 'jar'
builtBy 'reobfJar'
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact reobfArtifact
}
}
repositories {
maven {
url "file:///${project.projectDir}/mcmodsrepo"
}
}
}
mixin {
add sourceSets.main, "aether.refmap.json"
}