forked from maruohon/tweakeroo
-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathbuild.gradle
More file actions
149 lines (127 loc) · 4.58 KB
/
Copy pathbuild.gradle
File metadata and controls
149 lines (127 loc) · 4.58 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
plugins {
id 'net.fabricmc.fabric-loom' version '1.17.+'
id 'maven-publish'
}
repositories {
mavenLocal()
maven { url = "https://masa.dy.fi/maven/sakura-ryoko"
content {includeGroupAndSubgroups("fi.dy.masa")}
}
maven { url = 'https://maven.fallenbreath.me/releases'
content {includeGroupAndSubgroups("me.fallenbreath")}
}
maven { url = 'https://maven.terraformersmc.com/releases/'
content {includeGroupAndSubgroups("com.terraformersmc")}
}
maven { url = 'https://jitpack.io'
content {includeGroupAndSubgroups("com.github")}
}
}
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
implementation "net.fabricmc:fabric-loader:${project.fabric_loader_version}"
implementation "com.google.code.findbugs:jsr305:3.0.2"
// implementation "org.jspecify:jspecify:1.0.0"
implementation "fi.dy.masa.malilib:malilib-fabric-${project.minecraft_version_out}:${project.malilib_version}"
// implementation "com.github.sakura-ryoko:malilib:${project.malilib_version}"
// Fabric API. This is technically optional, but you probably want it anyway.
// compileOnly fabricApi.module("fabric-api-base", project.fabric_api_version)
// compileOnly fabricApi.module("fabric-networking-api-v1", project.fabric_api_version)
// compileOnly fabricApi.module("fabric-resource-loader-v1", project.fabric_api_version)
include(implementation("me.fallenbreath:conditional-mixin-fabric:${project.conditionalmixin_version}"))
compileOnly "com.terraformersmc:modmenu:${project.mod_menu_version}"
// runtimeOnly 'me.fallenbreath:mixin-auditor:0.2.0-u'
// Test dependencies
// testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.1'
// testImplementation 'org.junit.jupiter:junit-jupiter-params:5.10.1'
// testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.1'
// testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.10.1'
// testImplementation 'org.mockito:mockito-core:5.8.0'
// testImplementation 'org.mockito:mockito-junit-jupiter:5.8.0'
// // Fabric testing support
// testImplementation "net.fabricmc:fabric-loader-junit:${project.fabric_loader_version}"
}
base {
group = project.group + "." + project.mod_id
archivesName = project.mod_file_name + '-' + project.minecraft_version_out
version = project.mod_version
if (version.endsWith('-dev')) {
version += "." + new Date().format('yyyyMMdd.HHmmss')
}
}
loom {
accessWidenerPath = file("src/main/resources/tweakeroo.accesswidener")
// def commonVmArgs = ['-Dmixin.debug.export=true', '-Dmixin.debug.countInjections=true']
// // [FEATURE] MIXIN_AUDITOR
// runs {
// def auditVmArgs = [*commonVmArgs, '-DmixinAuditor.audit=true']
// clientMixinAudit {
// client()
// vmArgs auditVmArgs
// ideConfigGenerated false
// }
// }
}
//test {
// useJUnitPlatform()
// jvmArgs '-Dtweakeroo.debug.stdout=true'
// testLogging {
// events "passed", "skipped", "failed"
// exceptionFormat "short"
// showStackTraces = false
// showStandardStreams = false
// }
//}
processResources {
// Exclude the GIMP image files
exclude '**/*.xcf'
exclude '**/xcf'
// this will ensure that this task is redone when the versions change.
//inputs.property "minecraft_version", project.project.minecraft_version
inputs.property "mod_version", project.mod_version
filesMatching("fabric.mod.json") {
expand "mod_version": project.mod_version
}
}
tasks.withType(JavaCompile).configureEach {
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
// If Javadoc is generated, this must be specified in that task too.
it.options.encoding = "UTF-8"
// Minecraft 1.20.5/1.21 (24w14a) upwards uses Java 21.
it.options.release = 25
}
tasks.withType(AbstractArchiveTask).configureEach {
preserveFileTimestamps = true
//reproducibleFileOrder = true
}
java {
sourceCompatibility = JavaVersion.VERSION_25
targetCompatibility = JavaVersion.VERSION_25
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
}
jar {
from("LICENSE") {
rename { "${it}_${base.archivesName}"}
}
}
tasks.publish.dependsOn build
publishing {
publications {
mavenJava(MavenPublication) {
// add all the jars that should be included when publishing to maven
//artifact(jar) { builtBy remapJar }
artifactId = base.archivesName.get()
from components.java
}
}
repositories {
maven {
url = "$projectDir/../../CommonMaven"
}
}
}