forked from lukebemishprojects/ExcavatedVariants
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
120 lines (108 loc) · 3.21 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
120
plugins {
alias libs.plugins.quilt.licenser apply false
alias libs.plugins.mdg.plugin
alias libs.plugins.managedversioning
alias libs.plugins.architectury.loom apply false
}
managedVersioning {
versionFile.set rootProject.file('version.properties')
metadataVersion.set libs.versions.minecraft
versionPRs()
versionSnapshots()
gitHubActions {
snapshot {
prettyName.set 'Snapshot'
workflowDispatch.set(true)
onBranches.add '1.*'
gradleJob {
buildCache()
name.set 'build'
gradlew 'Build', 'checkLicenses', 'build'
gradlew 'Publish', 'publish'
mavenSnapshot('github')
}
}
release {
prettyName.set 'Release'
workflowDispatch.set(true)
gradleJob {
buildCache()
name.set 'build'
step {
setupGitUser()
}
readOnly.set false
gradlew 'Tag Release', 'tagRelease'
gradlew 'Build', 'checkLicenses', 'build'
step {
run.set 'git push && git push --tags'
}
gradlew 'Publish', 'publish', 'modrinth', 'curseforge'
mavenRelease('github')
modPublishing()
}
}
build_pr {
prettyName.set 'Build PR'
pullRequest.set(true)
gradleJob {
name.set 'build'
gradlew 'Build', 'checkLicenses', 'build'
gradlew 'Publish', 'publish'
pullRequestArtifact()
}
}
publish_pr {
prettyName.set 'Publish PR'
publishPullRequestAction(
'github',
'dev/lukebemish/dynamicassetgenerator/dynamicassetgenerator-*',
'Build PR'
)
}
}
}
managedVersioning.apply()
println "Building: $version"
configurations {
license {
canBeResolved = false
canBeConsumed = true
}
}
artifacts {
add 'license', file("LICENSE")
}
modsDotGroovy {
dslVersion = libs.versions.mdg.dsl.get()
platform 'multiloader'
multiloader {
forge = [project(':neoforge')]
fabric = [project(':fabriquilt')]
quilt = [project(':fabriquilt')]
}
}
subprojects { p ->
apply plugin: 'maven-publish'
apply plugin: 'java-library'
apply plugin: libs.plugins.quilt.licenser.get().pluginId
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
java.withSourcesJar()
java.withJavadocJar()
license {
rule rootProject.file('header.txt')
exclude '**/*.mcmeta'
exclude '**/package-info.java'
}
jar {
manifest {
attributes([
'Implementation-Commit-Time': managedVersioning.timestamp.get(),
'Implementation-Commit': managedVersioning.hash.get()
])
}
}
managedVersioning.publishing.mavenPullRequest(publishing)
managedVersioning.publishing.mavenSnapshot(publishing)
managedVersioning.publishing.mavenRelease(publishing)
}