forked from WildBamaBoy/minecraft-comes-alive
-
Notifications
You must be signed in to change notification settings - Fork 62
/
build.gradle
91 lines (76 loc) · 2.36 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
plugins {
id 'java-library'
id 'architectury-plugin' version '3.4-SNAPSHOT'
id 'dev.architectury.loom' version '1.6-SNAPSHOT' apply false
id "io.github.pacifistmc.forgix" version "1.2.9"
id "com.github.johnrengelman.shadow" version "8.1.1" apply false
}
architectury {
minecraft = rootProject.minecraft_version
}
def getAppVersion = { ->
try {
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'describe', '--tags', '--abbrev=0'
standardOutput = stdout
}
return stdout.toString().trim()
} catch (Exception e) {
println "Warning: ${e.message}, is git installed?"
return "dev"
}
} as Object
allprojects {
apply plugin: "maven-publish"
group = rootProject.group
description = rootProject.displayname
archivesBaseName = rootProject.name
version = getAppVersion()
}
subprojects {
apply plugin: 'dev.architectury.loom'
apply plugin: 'architectury-plugin'
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
implementation 'com.google.code.findbugs:jsr305:3.0.2'
}
build.finalizedBy(mergeJars)
assemble.finalizedBy(mergeJars)
java {
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
tasks.withType(JavaCompile).configureEach {
it.options.release = 17
}
publishing {
repositories {
maven {
name = "reposiliteRepository"
url = uri("https://maven.conczin.net/Artifacts")
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_TOKEN")
}
}
}
}
}
forgix {
group = rootProject.groupId
mergedJarName = "${rootProject.name}-${rootProject.version}-universal.jar"
outputDir = "build/libs"
forge {
jarLocation = "build/libs/${rootProject.name}-${rootProject.version}-forge.jar"
mixin "mca.mixin.json"
}
fabric {
jarLocation = "build/libs/${rootProject.name}-${rootProject.version}-fabric.jar"
}
quilt {
jarLocation = "build/libs/${rootProject.name}-${rootProject.version}-quilt.jar"
}
}