forked from Ladysnake/PlayerAbilityLib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
74 lines (64 loc) · 1.85 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
import net.fabricmc.loom.task.RemapJarTask
plugins {
id "maven-publish"
id 'dev.architectury.loom' version '1.6-SNAPSHOT'
}
def isCI = System.getenv("GITHUB_ACTION")
def isRELEASE = System.getenv("GITHUB_RELEASE")
archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group
repositories {
maven {
name = 'NeoForged'
url = 'https://maven.neoforged.net/releases'
}
}
dependencies {
//to change the versions see the gradle.properties file
minecraft "net.minecraft:minecraft:$project.minecraft_version"
mappings loom.layered {
it.mappings("net.fabricmc:yarn:$project.yarn_mappings:v2")
it.mappings("dev.architectury:yarn-mappings-patch-neoforge:$project.yarn_mappings_patch_version")
}
neoForge "net.neoforged:neoforge:$project.neoforge_version"
api "org.jetbrains:annotations:19.0.0"
}
java {
withSourcesJar()
}
processResources {
inputs.property "version", project.mod_version
filesMatching("META-INF/neoforge.mods.toml") {
expand "version": project.mod_version
}
}
publishing {
publications {
mavenJava(org.gradle.api.publish.maven.MavenPublication) {
//from components.java
artifact sourcesJar
artifact(jar){
classifier = "dev"
}
afterEvaluate {
artifact(remapJar){
classifier = null
}
}
}
}
repositories {
if (isCI && isRELEASE) {
maven {
url = "https://repo.repsy.io/mvn/trinsdar/trins-mods/"
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
} else {
mavenLocal()
}
}
}