Skip to content

Commit

Permalink
fix java version of mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
Ecdcaeb authored May 3, 2024
1 parent 0994b7a commit 0979e3b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
30 changes: 17 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ modmetadata.load(new FileInputStream("modmetadata.properties"))

apply from: 'gradle/scripts/helpers.gradle'

assertProperty 'root_package'
assertProperty 'mod_id'
assertProperty 'mod_name'

assertSubProperties 'use_access_transformer', 'access_transformer_locations'
assertSubProperties 'is_coremod', 'coremod_includes_mod', 'coremod_plugin_class_name'
assertSubProperties 'use_asset_mover', 'asset_mover_version'
Expand Down Expand Up @@ -194,18 +198,18 @@ tasks.named('processResources', ProcessResources).configure {
filterList.addAll(propertyStringList('mixin_configs').collect(config -> "mixins.${config}.json" as String))

var replaceProperties = [
mod_id: project.mod_id,
mod_name: project.mod_name,
mod_id: propertyString('mod_id'),
mod_name: propertyString('mod_name'),
mod_version: modmetadata.mod_version,
mod_description: project.mod_description,
mod_authors: "[${project.mod_authors.split(',').findAll { !it.isEmpty() }.join(', ')}]",
mod_credits: project.mod_credits,
mod_url: project.mod_url,
mod_update_json: project.mod_update_json,
mod_logo_path: project.mod_logo_path,
mod_description: propertyString('mod_description'),
mod_authors: "[${propertyStringList('mod_authors', ',').join(', ')}]",
mod_credits: propertyString('mod_credits'),
mod_url: propertyString('mod_url'),
mod_update_json: propertyString('mod_update_json'),
mod_logo_path: propertyString('mod_logo_path'),
mixin_refmap: propertyString('mixin_refmap'),
mixin_package: propertyString('mixin_package')

mixin_package: propertyString('mixin_package'),
java_version: propertyString('java_version')
]
inputs.properties replaceProperties

Expand All @@ -223,11 +227,11 @@ jar {
manifest {
def attribute_map = [:]
attribute_map['Specification-Version'] = '1' // We are version 1 of ourselves
attribute_map['Specification-Vendor'] = "[${project.mod_authors.split(',').findAll { !it.isEmpty() }.join(', ')}]"
attribute_map['Specification-Vendor'] = "[${propertyStringList('mod_authors', ',').join(', ')}]"
attribute_map['ModType'] = 'CRL'
attribute_map['Implementation-Title'] = project.name
attribute_map['Implementation-Version'] = project.mod_version
attribute_map['Implementation-Vendor'] = "[${project.mod_authors.split(',').findAll { !it.isEmpty() }.join(', ')}]"
attribute_map['Implementation-Version'] = modmetadata.mod_version
attribute_map['Implementation-Vendor'] = "[${propertyStringList('mod_authors', ',').join(', ')}]"
attribute_map['Implementation-Timestamp'] = new Date().format('yyyy-MM-dd\'T\'HH:mm:ssZ')
if(propertyBool('is_coremod')){
attribute_map['FMLCorePlugin'] = propertyString('coremod_plugin_class_name')
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mixins.modid.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"refmap": "${mixin_refmap}",
"target": "@env(DEFAULT)",
"minVersion": "0.8.5",
"compatibilityLevel": "JAVA_8",
"compatibilityLevel": "JAVA_${java_version}",
"mixins": [],
"server": [],
"client": []
Expand Down

0 comments on commit 0979e3b

Please sign in to comment.