Skip to content

Commit

Permalink
Change nomixin to be in classifier
Browse files Browse the repository at this point in the history
  • Loading branch information
Roadhog360 committed Apr 26, 2024
1 parent 4a6254d commit f62ff49
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -171,19 +171,19 @@ shadowJar {
}

task shadowJarNoMixin(type: Jar) {
dependsOn shadowJar
classifier = ''
version += '-nomixin'
from(zipTree(tasks.shadowJar.archivePath)){
exclude "org/spongepowered/**"
exclude "META-INF/services/**"
exclude "mcmod.info" // we create a different mcmod.info in this task
}
from(sourceSets.main.resources.srcDirs) {
include "mcmod.info"
def metaNoMixin = meta.clone()
// add +nomixin to the end of the version in mcmod.info
dependsOn shadowJar

classifier = 'nomixin'
version += ''
from(zipTree(tasks.shadowJar.archivePath)) {
exclude "org/spongepowered/**"
exclude "META-INF/services/**"
exclude "mcmod.info" // we create a different mcmod.info in this task
}
from(sourceSets.main.resources.srcDirs) {
include "mcmod.info"
def metaNoMixin = meta.clone()
// add +nomixin to the end of the version in mcmod.info
metaNoMixin['commitVersion'] = meta['commitVersion'] + '-nomixin'
expand metaNoMixin.collectEntries { k, v -> [k, v.replaceAll("\u00A7.", "")] } // strip formatting
}
Expand All @@ -201,16 +201,16 @@ task devJar(type: Jar) {
}

task devJarNoMixin(type: Jar) {
dependsOn devJar
classifier = 'dev'
version += '-nomixin'
from zipTree(tasks.devJar.archivePath)
exclude "org/spongepowered/**"
exclude "META-INF/services/**"
manifest = tasks.shadowJar.manifest
dependsOn devJar

classifier = 'dev-nomixin'
version += ''
from zipTree(tasks.devJar.archivePath)

exclude "org/spongepowered/**"
exclude "META-INF/services/**"

manifest = tasks.shadowJar.manifest
}

if(buildAll) {
Expand Down

0 comments on commit f62ff49

Please sign in to comment.