-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.gradle
More file actions
126 lines (91 loc) · 3.22 KB
/
build.gradle
File metadata and controls
126 lines (91 loc) · 3.22 KB
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
117
118
119
120
121
122
123
124
125
buildscript {
//-------VERSIONING-------
def versionPropsFile = file('version.properties')
Properties versionProps = new Properties()
versionProps.load(new FileInputStream(versionPropsFile))
def isSnapshot = versionProps['version.snapshot'].toBoolean()
def version_stage= versionProps['version.stage'].toString()
def version_major = versionProps['version.major'].toInteger()
def version_minor = versionProps['version.minor'].toInteger()
def version_patch = versionProps['version.patch'].toInteger()
def version_build = versionProps['version.build'].toInteger()
if (isSnapshot) {
version = "${version_major}.${version_minor}.${version_patch}${version_stage}-snapshot#${version_build}"
System.out.println("VERSIONING-SNAPSHOT")
} else {
version = "${version_major}.${version_minor}.${version_patch}${version_stage}"
System.out.println("VERSIONING-RELEASE")
}
project.version = version
//-------VERSIONING END-------
}
plugins {
id 'java'
id 'java-library'
id 'maven-publish'
alias(libs.plugins.architectury)
alias(libs.plugins.architectury.loom) apply false
alias(libs.plugins.loom.quiltflower) apply false
}
group = project_group
archivesBaseName = project_name
architectury {
minecraft = libs.versions.minecraftVersion.get()
}
subprojects {
apply plugin: "java"
apply plugin: "java-library"
apply plugin: libs.plugins.architectury.asProvider().get().pluginId
apply plugin: libs.plugins.architectury.loom.get().pluginId
apply plugin: libs.plugins.loom.quiltflower.get().pluginId
group = rootProject.group
version = rootProject.version
archivesBaseName = project_name
loom {
silentMojangMappingsLicense()
}
java {
withSourcesJar()
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
options.release.set(17)
}
dependencies {
minecraft "com.mojang:minecraft:${libs.versions.minecraftVersion.get()}"
mappings loom.layered() {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-${libs.versions.minecraftVersion.get()}:${libs.versions.parchment.get()}@zip")
}
compileOnly(libs.lwjgl.openxr)
compileOnly(libs.bundles.annotations)
annotationProcessor(libs.bundles.annotations)
}
}
allprojects {
repositories {
mavenCentral()
maven { url "https://maven.fabricmc.net/" }
maven { url "https://maven.architectury.dev/" }
maven { url "https://maven.minecraftforge.net/" }
maven { url "https://libraries.minecraft.net/" }
maven { url 'https://jitpack.io' }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url 'https://redempt.dev' }
maven { url = "https://maven.parchmentmc.org" }
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
filter {
includeGroup "maven.modrinth"
}
}
}
compileJava {
dependsOn(clean)
}
}