-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathbuild.gradle
115 lines (97 loc) · 3.4 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
plugins {
id "com.github.johnrengelman.shadow" version "7.1.2"
id "com.matthewprenger.cursegradle"
id "com.modrinth.minotaur"
}
apply from: '../gradle-scripts/publish-curseforge.gradle'
architectury {
platformSetupLoomIde()
fabric()
}
loom {
accessWidenerPath = project(":common").loom.accessWidenerPath
}
configurations {
common
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
compileClasspath.extendsFrom common
runtimeClasspath.extendsFrom common
developmentFabric.extendsFrom common
}
dependencies {
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
modApi "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}"
modImplementation("net.fabricmc:fabric-language-kotlin:1.8.5+kotlin.1.7.20")
// Mod menu
modImplementation("maven.modrinth:modmenu:7.1.0")
modImplementation("me.shedaniel.cloth:cloth-config:11.0.99")
// Remove the next line if you don't want to depend on the API
modApi("org.valkyrienskies:valkyrienskies-1201-fabric:${rootProject.vs2_version}")
common(project(path: ":common", configuration: "namedElements")) { transitive false }
shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) { transitive false }
}
processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version, "vs2_version": project.vs2_version.substring(0, project.vs2_version.indexOf('+'))
}
}
shadowJar {
exclude "architectury.common.json"
configurations = [project.configurations.shadowCommon]
classifier "dev-shadow"
}
remapJar {
injectAccessWidener = true
input.set shadowJar.archiveFile
dependsOn shadowJar
classifier null
}
jar {
classifier "dev"
}
sourcesJar {
def commonSources = project(":common").sourcesJar
dependsOn commonSources
from commonSources.archiveFile.map { zipTree(it) }
}
components.java {
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
skip()
}
}
publishing {
publications {
mavenCommon(MavenPublication) {
groupId = "org.valkyrienskies.eureka"
version = project.version
artifactId = rootProject.archives_base_name + "-" + project.name
from components.java
}
}
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
if (project.vs_maven_username && project.vs_maven_password) {
println "Publishing to VS Maven"
maven {
url = project.vs_maven_url
credentials {
username = project.vs_maven_username
password = project.vs_maven_password
}
}
}
// Add repositories to publish to here.
if (System.getenv("GITHUB_ACTOR") != null) {
println "Publishing to Github Packages"
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/ValkyrienSkies/Eureka")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
}