-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
120 lines (108 loc) · 3.2 KB
/
build.gradle.kts
File metadata and controls
120 lines (108 loc) · 3.2 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.kotlin.gradle.utils.extendsFrom
plugins {
kotlin("jvm") version "1.9.0"
`java-library`
`maven-publish`
`java-gradle-plugin`
id("com.gradle.plugin-publish") version "1.1.0"
id("com.github.johnrengelman.shadow") version "8.1.1"
}
group = "lol.koblizek"
version = "0.2.1"
tasks.getByName("build").finalizedBy("shadowJar")
val dependency: Configuration by configurations.creating
configurations.implementation {
extendsFrom(dependency)
}
tasks.getByName("shadowJar", ShadowJar::class) {
this.archiveClassifier = ""
configurations = listOf(dependency)
dependencies {
exclude(dependency("org.jetbrains.kotlin:.*:.*"))
}
exclude("META-INF/*.SF", "META-INF/*.DSA", "META-INF/*.RSA", "OSGI-INF/**", "*.profile", "module-info.class", "ant_tasks/**")
mergeServiceFiles()
listOf(
"com.github.salomonbrys.kotson",
"com.google.errorprone.annotations",
"com.google.gson",
"dev.denwav.hypo",
"io.sigpipe.jbsdiff",
"me.jamiemansfield",
"net.fabricmc",
"org.apache.commons",
"org.apache.felix",
"org.apache.http",
"org.cadixdev",
"org.eclipse",
"org.jgrapht",
"org.jheaps",
"org.objectweb.asm",
"org.osgi",
"org.tukaani.xz",
"org.slf4j",
"codechicken.diffpatch",
"codechicken.repack",
"joptsimple",
"net.minecraftforge",
"net.neoforged",
"org.jetbrains.java"
).forEach { pack ->
relocate(pack, "composer.$pack")
}
}
repositories {
mavenCentral()
maven {
url = uri("https://maven.fabricmc.net/")
}
maven {
name = "neoforgedReleases"
url = uri("https://maven.neoforged.net/releases")
}
maven { url = uri("https://jitpack.io") }
}
dependencies {
dependency("com.github.MCPHackers:DiffPatch:cde1224")
dependency("org.apache.commons:commons-lang3:3.13.0")
dependency("commons-io:commons-io:2.14.0")
dependency("com.google.code.gson:gson:2.10.1")
dependency("net.neoforged:AutoRenamingTool:1.0.7")
dependency("org.vineflower:vineflower:1.9.3")
dependency("net.fabricmc:tiny-remapper:0.8.7")
dependency("net.fabricmc:mapping-io:0.4.2")
implementation(gradleApi())
testImplementation(kotlin("test"))
}
tasks.test {
useJUnitPlatform()
}
kotlin {
jvmToolchain(17)
}
gradlePlugin {
website = "https://github.com/ComposeMC/Composer"
vcsUrl = "https://github.com/ComposeMC/Composer"
plugins {
create("composer") {
id = "lol.koblizek.composer"
displayName = "Composer"
description = "Plugin which makes creating Minecraft server development much easier!"
implementationClass = "lol.koblizek.composer.ComposerPlugin"
tags = listOf("minecraft", "decompilation", "deobfuscation", "plugins")
}
}
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
groupId = "lol.koblizek"
artifactId = "composer"
from(components["java"])
}
}
repositories {
mavenLocal()
}
}