-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
98 lines (84 loc) · 2.71 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
plugins {
id 'fabric-loom' version '1.9-SNAPSHOT'
id 'maven-publish'
id "com.modrinth.minotaur" version "2.+"
}
var mc_version = project.supported_versions.split(";")[0]
version = "${project.mod_version}+${mc_version}"
group = project.maven_group
repositories {
mavenLocal()
maven { url "https://maven.nucleoid.xyz" }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url "https://maven.codedsakura.dev/releases" }
}
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.minecraft_version}+${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "dev.codedsakura.blossom:blossom-lib:${project.blossomlib_version}+${mc_version}"
}
processResources {
inputs.property "version", project.version
filteringCharset "UTF-8"
filesMatching("fabric.mod.json") {
expand(
"version": project.version,
"blossomlib_version": project.blossomlib_version,
"supported_versions": project.supported_versions.split(";").join("\",\""),
)
}
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release = 17
}
java {
archivesBaseName = project.archives_base_name
withSourcesJar()
}
jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}" }
}
}
publishing {
publications {
gpr(MavenPublication) {
artifactId = project.archives_base_name
from components.java
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/BlossomMods/${project.mod_slug}")
credentials {
username = System.getenv("USERNAME")
password = System.getenv("TOKEN")
}
}
maven {
name = "codedsakuraMavenReleases"
url = uri("https://maven.codedsakura.dev/releases")
credentials {
username = System.getenv("CS_USERNAME")
password = System.getenv("CS_TOKEN")
}
}
}
}
modrinth {
projectId = "${project.mod_slug}"
versionType = "release"
uploadFile = remapJar
changelog = System.getenv("CHANGELOG_PATH") ? rootProject.file(System.getenv("CHANGELOG_PATH")).text : ""
gameVersions = project.supported_versions.split(";").toList()
loaders = ["fabric", "quilt"]
dependencies {
required.project "BlossomLib"
}
syncBodyFrom = rootProject.file("README.md").text
}
tasks.modrinth.dependsOn tasks.modrinthSyncBody
tasks.publish.dependsOn tasks.modrinth