-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
128 lines (115 loc) · 3.92 KB
/
build.gradle.kts
File metadata and controls
128 lines (115 loc) · 3.92 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
121
122
123
124
125
126
127
128
import net.fabricmc.loom.api.LoomGradleExtensionAPI
plugins {
id("architectury-plugin") version "3.4.162"
id("dev.architectury.loom") version "1.13-SNAPSHOT" apply false
`maven-publish`
}
val minecraft_version: String by rootProject
val mod_version: String by rootProject
val yarn_version: String by rootProject
val maven_group: String by rootProject
architectury {
minecraft = minecraft_version
}
subprojects {
apply(plugin = "dev.architectury.loom")
val loom = the<LoomGradleExtensionAPI>()
dependencies {
"minecraft"("com.mojang:minecraft:${minecraft_version}")
"mappings"(loom.officialMojangMappings())
}
}
allprojects {
apply(plugin = "java")
apply(plugin = "architectury-plugin")
apply(plugin = "maven-publish")
version = mod_version
group = maven_group
repositories {
ivy("https://github.com/HotswapProjects/HotswapAgent/releases/download") {
patternLayout {
artifact("[revision]/[artifact]-[revision].[ext]")
}
content {
includeGroup("virtual.github.hotswapagent")
}
metadataSources {
artifact()
}
}
}
val hotswap by configurations.creating {
isVisible = false
}
dependencies {
hotswap("virtual.github.hotswapagent:hotswap-agent:1.4.2-SNAPSHOT")
}
project.afterEvaluate {
project.extensions.findByType<LoomGradleExtensionAPI>()?.apply {
runs {
named("client") {
vmArg("-ea")
if (project.properties["jarvis.hotswap"] == "true") {
vmArg("-XX:+AllowEnhancedClassRedefinition")
vmArg("-XX:HotswapAgent=external")
vmArg("-javaagent:${hotswap.resolve().single().absolutePath}")
}
}
}
}
}
configure<BasePluginExtension> {
archivesName.set("jarvis")
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
options.release.set(17)
}
configure<JavaPluginExtension> {
withSourcesJar()
}
}
subprojects {
publishing {
if (project.name != "common")
publications {
create<MavenPublication>("maven-api") {
artifactId = rootProject.name + "-" + project.name
from(components["java"])
pom {
licenses {
license {
name.set("LGPL-3.0 or later")
url.set("https://github.com/nea89o/jarvis/blob/HEAD/.licensesnip")
}
}
developers {
developer {
name.set("Linnea Gräf")
url.set("https://nea.moe")
email.set("[email protected]")
}
}
name.set("Jarivs Common Config Interface")
description.set("Jarvis Common Config Interface is a search engine and hud editor allowing you to edit all your minecraft mods config options and HUDs in one place")
inceptionYear.set("2023")
issueManagement {
url.set("https://github.com/nea89o/jarvis/issues")
system.set("Github Issues")
}
scm {
url.set("https://github.com/nea89o/jarvis")
}
}
}
}
}
configure<LoomGradleExtensionAPI> {
runs {
removeIf { it.name == "server" }
named("client") {
property("jarvis.test", "true")
}
}
}
}