Skip to content

Commit 02560f7

Browse files
committed
Also supports CRL versions
1 parent 2c7b508 commit 02560f7

4 files changed

Lines changed: 47 additions & 18 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 1.0.2
2+
- Also supports CRL versions.
3+
4+
* * *
5+
16
# 1.0.1
27
- Refix login error.
38

build.gradle

Lines changed: 41 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ java {
3636
toolchain {
3737
languageVersion = JavaLanguageVersion.of(21)
3838
}
39+
sourceCompatibility = JavaVersion.VERSION_1_8
40+
targetCompatibility = JavaVersion.VERSION_1_8
3941
if (propertyBool('generate_sources_jar')) {
4042
withSourcesJar()
4143
}
@@ -170,6 +172,25 @@ if (!propertyBool('enable_shadow')) {
170172
shadowJar.enabled = false
171173
}
172174

175+
// Shared manifest attributes (excluding ModType)
176+
ext.buildManifestAttributes = {
177+
def attribute_map = [:]
178+
if (configurations.contain.size() > 0) {
179+
attribute_map['ContainedDeps'] = configurations.contain.collect { it.name }.join(' ')
180+
attribute_map['NonModDeps'] = true
181+
}
182+
if (propertyBool('is_coremod')) {
183+
attribute_map['FMLCorePlugin'] = propertyString('coremod_plugin_class_name')
184+
if (propertyBool('coremod_includes_mod')) {
185+
attribute_map['FMLCorePluginContainsFMLMod'] = true
186+
}
187+
}
188+
if (propertyBool('use_access_transformer')) {
189+
attribute_map['FMLAT'] = propertyString('access_transformer_locations')
190+
}
191+
return attribute_map
192+
}
193+
173194
jar {
174195
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
175196
if (configurations.contain.size() > 0) {
@@ -179,22 +200,7 @@ jar {
179200
}
180201
doFirst {
181202
manifest {
182-
def attribute_map = [:]
183-
attribute_map['ModType'] = "CRL"
184-
if (configurations.contain.size() > 0) {
185-
attribute_map['ContainedDeps'] = configurations.contain.collect { it.name }.join(' ')
186-
attribute_map['NonModDeps'] = true
187-
}
188-
if (propertyBool('is_coremod')) {
189-
attribute_map['FMLCorePlugin'] = propertyString('coremod_plugin_class_name')
190-
if (propertyBool('coremod_includes_mod')) {
191-
attribute_map['FMLCorePluginContainsFMLMod'] = true
192-
}
193-
}
194-
if (propertyBool('use_access_transformer')) {
195-
attribute_map['FMLAT'] = propertyString('access_transformer_locations')
196-
}
197-
attributes(attribute_map)
203+
attributes(buildManifestAttributes())
198204
}
199205
}
200206
if (propertyBool('enable_shadow')) {
@@ -204,6 +210,25 @@ jar {
204210
}
205211
}
206212

213+
// Cleanroom variant with ModType: CRL
214+
tasks.register('cleanroomJar', Jar) {
215+
dependsOn 'remapJar'
216+
from(zipTree(tasks.jar.archiveFile)) {
217+
exclude 'META-INF/MANIFEST.MF'
218+
}
219+
archiveClassifier = 'cleanroom'
220+
manifest {
221+
def attrs = buildManifestAttributes()
222+
attrs['ModType'] = 'CRL'
223+
attrs['Fabric-Loom-Mixin-Remap-Type'] = 'static'
224+
attributes(attrs)
225+
}
226+
}
227+
228+
tasks.named('build') {
229+
dependsOn 'cleanroomJar'
230+
}
231+
207232

208233
shadowJar {
209234
configurations = [project.configurations.shadow]

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ maven_url =
5757
# Use the property `access_transformer_locations` to state custom AT files if you aren't using the default `mod_id_at.cfg` location
5858
# If multiple locations are stated, use spaces as the delimiter
5959
# WARNING: Use MCP name in AT file. Unimined will remap it to srg name when building.
60-
use_access_transformer = true
60+
use_access_transformer = false
6161
access_transformer_locations = ${mod_id}_at.cfg
6262

6363
# Coremods

src/main/resources/advancedbackupspatch_at.cfg

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)