forked from MeteorDevelopment/meteor-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
129 lines (101 loc) · 3.28 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
plugins {
id 'fabric-loom' version '0.8-SNAPSHOT'
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '7.0.0'
}
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_16
archivesBaseName = project.archives_base_name
version = project.mod_version + (System.getenv("CIRCLE_BUILD_NUM") != null ? ("-" + System.getenv("CIRCLE_BUILD_NUM")) : "")
group = project.maven_group
minecraft {
accessWidener "src/main/resources/meteor-client.accesswidener"
}
repositories {
maven {
name = "jitpack"
url = "https://jitpack.io"
}
jcenter()
// For Canvas
maven {
name = "dblsaiko"
url = "https://maven.dblsaiko.net/"
}
}
dependencies {
def dependency = { id ->
implementation id
shadow id
}
// Minecraft
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_version}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
// Fabric API Indigo Renderer (only used in mixins)
modCompileOnly fabricApi.module("fabric-renderer-indigo", project.api_version)
// For XRay compatibility
//modImplementation "com.github.CaffeineMC:sodium-fabric:${project.sodium_version}"
modCompileOnly "com.github.MeteorDevelopment:sodium-fabric:${project.sodium_version}"
// Canvas for compatibility
modCompileOnly("grondag:canvas-mc117-1.17:1.0.+") { transitive = false }
// Baritone (the fork is standalone baritone and the only change is a setting to build it as fabric mod instead of forge one)
modImplementation "com.github.MeteorDevelopment:baritone:${project.baritone_version}"
include "com.github.MeteorDevelopment:baritone:${project.baritone_version}"
// Other dependencies
dependency "com.github.MeteorDevelopment:orbit:${project.orbit_version}"
dependency "com.github.MeteorDevelopment:starscript:${project.starscript_version}"
dependency "com.github.MeteorDevelopment:java-discord-rpc:${project.discordrpc_version}"
}
shadowJar {
configurations = [ project.configurations.shadow ]
}
processResources {
inputs.property "version", project.version
duplicatesStrategy = DuplicatesStrategy.WARN
from(sourceSets.main.resources.srcDirs) {
include "fabric.mod.json"
expand "version": project.version
filter { line -> line.replace("@devbuild@", System.getenv("CIRCLE_BUILD_NUM") != null ? System.getenv("CIRCLE_BUILD_NUM") : "") }
}
from(sourceSets.main.resources.srcDirs) {
exclude "fabric.mod.json"
}
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release = 16
}
jar {
from "LICENSE"
manifest {
attributes("Main-Class": "meteordevelopment.meteorclient.Main")
}
}
remapJar {
dependsOn shadowJar
input.set(shadowJar.archiveFile)
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.set("sources")
from sourceSets.main.allSource
}
task javadocJar(type: Jar) {
archiveClassifier.set("javadoc")
from javadoc
}
publishing {
publications {
maven(MavenPublication) {
artifact(remapJar) {
builtBy remapJar
}
artifact(sourcesJar) {
builtBy remapSourcesJar
}
artifact(javadocJar) {
builtBy javadocJar
}
}
}
}
apply from: "scripts/packetutils.gradle"