-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle
119 lines (94 loc) · 2.86 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
117
118
119
import net.fabricmc.loom.task.RemapJarTask
plugins {
id 'fabric-loom' version '1.6-SNAPSHOT'
id 'io.github.ladysnake.chenille' version '0.13.0'
id 'io.github.juuxel.loom-quiltflower' version "1.6.0"
}
archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group
chenille {
configureTestmod {
withBaseTestRuns()
withDependencyConfiguration()
}
license = project.license_header
javaVersion = 17
}
repositories {
chenille.repositories {
ladysnake()
lucko()
modrinth()
}
mavenLocal()
}
dependencies {
//to change the versions see the gradle.properties file
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}"
modIncludeImplementation libs.fpa
modIncludeApi libs.cca.base
modIncludeImplementation libs.cca.entity
modCompileOnly (compatLibs.effective) {
transitive = false
}
modLocalImplementation libs.elmendorf
api "org.jetbrains:annotations:${jb_annotations_version}"
api "org.apiguardian:apiguardian-api:${apiguardian_version}"
testmodImplementation sourceSets.main.output
}
java {
withSourcesJar()
}
processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}
var testmodJar = tasks.register('testmodJar', Jar) {
dependsOn testmodClasses
archiveBaseName.set('ImpersonateTest')
archiveClassifier.set('dev')
from(sourceSets.testmod.output) {
include 'fabric.mod.json'
expand 'version': project.version
}
from(sourceSets.testmod.output) {
exclude 'fabric.mod.json'
}
}
var remapTestmodJar = tasks.register('remapTestmodJar', RemapJarTask) {
dependsOn project.testmodJar
archiveBaseName.set('ImpersonateTest')
inputFile.set(testmodJar.get().archiveFile)
addNestedDependencies = false
}
build.dependsOn(remapTestmodJar)
remapJar {
addNestedDependencies.set(false)
}
var standaloneJar = tasks.register('standaloneJar', Jar) {
dependsOn project.classes
from sourceSets.main.output
archiveClassifier.set('standalone-dev')
}
var remapStandaloneJar = tasks.register('remapStandaloneJar', RemapJarTask) {
dependsOn standaloneJar
archiveClassifier.set('standalone')
inputFile.set(standaloneJar.get().archiveFile)
addNestedDependencies.set(true)
}
assemble.dependsOn(remapStandaloneJar)
chenille {
configurePublishing {
mainArtifact = remapStandaloneJar.get().archiveFile
withLadysnakeMaven()
withCurseforgeRelease()
withGithubRelease()
withModrinthRelease()
}
}