-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle.kts
121 lines (97 loc) · 3.14 KB
/
build.gradle.kts
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
import com.vanniktech.maven.publish.JavaLibrary
import com.vanniktech.maven.publish.JavadocJar
import com.vanniktech.maven.publish.SonatypeHost
plugins {
java
idea
id("com.vanniktech.maven.publish") version("0.28.0") // `maven-publish` doesn't support new maven central
}
version = "1.0.7"
group = "com.moulberry.mixinconstraints"
idea.module.isDownloadSources = true
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
repositories {
mavenCentral()
maven("https://maven.fabricmc.net/")
maven("https://repo.spongepowered.org/maven") // provides lexforge
maven("https://maven.neoforged.net/releases")
}
val fabric: SourceSet by sourceSets.creating {
compileClasspath += sourceSets.main.get().output
}
val forge: SourceSet by sourceSets.creating {
compileClasspath += sourceSets.main.get().output
}
val neoforge: SourceSet by sourceSets.creating {
compileClasspath += sourceSets.main.get().output
}
dependencies {
compileOnly("org.spongepowered:mixin:0.8.5")
compileOnly("org.ow2.asm:asm-tree:9.7")
implementation("org.slf4j:slf4j-api:2.0.12")
implementation("org.jetbrains:annotations:24.1.0")
"fabricImplementation"("net.fabricmc:fabric-loader:0.15.0")
"forgeImplementation"("net.minecraftforge:fmlloader:1.20.1-47.3.27")
"forgeImplementation"("net.minecraftforge:fmlcore:1.20.1-47.3.27")
"neoforgeImplementation"("net.neoforged.fancymodloader:loader:3.0.13")
}
tasks.jar {
from(fabric.output)
from(forge.output)
from(neoforge.output)
}
tasks.register<Jar>("sourcesJar") {
group = "build"
archiveClassifier.set("sources")
sourceSets.map { it.allSource }.forEach {
from(it)
}
}
mavenPublishing {
configure(JavaLibrary(JavadocJar.Javadoc(), true))
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
signAllPublications()
coordinates("com.moulberry", "mixinconstraints", version.toString())
pom {
name = "MixinConstraints"
description = "Library to enable/disable mixins using annotations"
url = "https://github.com/Moulberry/MixinConstraints"
inceptionYear = "2024"
packaging = "jar"
licenses {
license {
name = "MIT License"
url = "https://opensource.org/license/mit"
}
}
developers {
developer {
name = "Moulberry"
url = "https://github.com/Moulberry"
}
}
contributors {
contributor {
name = "rdh"
url = "https://github.com/rhysdh540"
}
contributor {
name = "IThundxr"
url = "https://ithundxr.dev"
}
}
issueManagement {
system = "GitHub"
url = "https://github.com/Moulberry/MixinConstraints/issues"
}
scm {
url = "https://github.com/Moulberry/MixinConstraints/"
connection = "scm:git:git://github.com/Moulberry/MixinConstraints.git"
developerConnection = "scm:git:ssh://[email protected]/Moulberry/MixinConstraints.git"
}
}
}