forked from kyrptonaught/DiggusMaximus
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
116 lines (96 loc) · 2.75 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
116
plugins {
id 'fabric-loom' version '1.7-SNAPSHOT'
id 'maven-publish'
id 'me.shedaniel.unified-publishing' version '0.1.+'
}
archivesBaseName = project.archives_base_name
version = "${project.mod_version}+mc${project.minecraft_version}"
group = project.maven_group
repositories {
mavenLocal()
maven { url 'https://maven.fabricmc.net' }
maven { url 'https://maven.yuluo.dev/repository/maven-public' }
maven { url 'https://maven.terraformersmc.com/releases' }
}
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modImplementation(include("net.kyrptonaught:kyrptconfig:${kyrptconfig_version}")) {
transitive false
}
modImplementation("com.terraformersmc:modmenu:${project.modmenu_version}") {
transitive false
}
}
processResources {
var replaceTokens = [
'version' : project.mod_version,
'minecraft_version': project.minecraft_version,
'loader_version' : project.loader_version,
'kyrptconfig_version': project.kyrptconfig_version
]
inputs.properties replaceTokens
filteringCharset 'UTF-8'
filesMatching('fabric.mod.json') {
expand replaceTokens
}
}
tasks.withType(JavaCompile).configureEach {
it.options.release = 21
}
jar {
from('LICENSE') {
rename { "${it}_${project.archives_base_name}" }
}
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
withSourcesJar()
}
publishing {
repositories {
mavenLocal()
maven {
name = 'YuluoMaven'
def ENV = System.getenv()
def releaseUrl = 'https://maven.yuluo.dev/repository/maven-releases/'
def snapshotUrl = 'https://maven.yuluo.dev/repository/maven-snapshots/'
url = ENV.MOD_RELEASE ? releaseUrl : snapshotUrl
credentials {
username ENV.MOD_MAVEN_USER
password ENV.MOD_MAVEN_PASS
}
}
}
publications {
mavenFabric(MavenPublication) {
artifactId = project.name
version = 'true'.equalsIgnoreCase(System.getenv('MOD_RELEASE')) ? version : "${version}-SNAPSHOT"
from components.java
}
}
}
unifiedPublishing {
project {
displayName = "Diggus Maximus Reborn ${project.mod_version} for ${project.minecraft_version}"
version = project.version
gameVersions = [project.minecraft_version]
gameLoaders = ['fabric']
releaseType = 'release'
changelog = 'See the GitHub repository for more information. \nhttps://github.com/qyl27/DiggusMaximus'
mainPublication tasks.remapJar
relations {
depends {
curseforge = 'fabric-api'
modrinth = 'fabric-api'
}
}
curseforge {
token = System.getenv('CURSEFORGE_TOKEN')
id = '977886'
}
}
}