-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
112 lines (99 loc) · 2.68 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
buildscript {
ext.kotlin_version = '2.0.0'
repositories {
maven {
url "https://repo.spongepowered.org/repository/maven-public/"
}
mavenCentral()
}
dependencies {
classpath "org.spongepowered:vanillagradle:0.2.1-SNAPSHOT"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins {
id 'java'
id "org.jetbrains.kotlin.jvm" version "2.0.0"
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'maven-publish'
}
java {
toolchain.languageVersion = JavaLanguageVersion.of(21)
}
apply plugin: "org.spongepowered.gradle.vanilla"
apply plugin: 'kotlin'
group = 'sh.talonfloof.draco_std'
version = "1.21-SNAPSHOT"
configurations {
shadow
}
repositories {
mavenCentral()
maven { url = "https://repo.spongepowered.org/maven/" }
maven { url = "https://maven.minecraftforge.net/" }
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.Draco-MC:DracoLoader:main-SNAPSHOT'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation 'org.ow2.asm:asm:9.7'
implementation 'org.ow2.asm:asm-tree:9.7'
implementation 'org.ow2.asm:asm-util:9.7'
implementation 'org.ow2.asm:asm-commons:9.7'
implementation 'com.moandjiezana.toml:toml4j:0.7.2'
}
test {
useJUnitPlatform()
}
minecraft {
version("1.21")
accessWideners("src/main/resources/draco.accesswidener")
runs {
server() {
mainClass("net.minecraft.launchwrapper.Launch")
}
client() {
mainClass("net.minecraft.launchwrapper.Launch")
args("--tweakClass", "sh.talonfloof.dracoloader.bootstrap.MinecraftClientBootstrap", "--username", "Dev")
}
}
}
/*compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}*/
publishing {
repositories {
def ENV = System.getenv()
if (ENV.MAVEN_URL) {
maven {
url ENV.MAVEN_URL
}
}
}
publications {
mavenJava(MavenPublication) {
groupId project.group
artifactId project.name
version project.version
from components.java
}
shadow(MavenPublication) { publication ->
project.shadow.component(publication)
}
}
}
shadowJar {
archiveClassifier = ""
configurations = [project.configurations.compileClasspath]
dependencies {
include(dependency('com.moandjiezana.toml:toml4j:0.7.2'))
}
relocate "com.moandjiezana.toml", "sh.talonfloof.draco_std.dependencies.com.moandjiezana.toml"
}