Skip to content

Commit

Permalink
move generic buildSrc logic to an actual package
Browse files Browse the repository at this point in the history
  • Loading branch information
Nolij committed Apr 27, 2024
1 parent 0cdb460 commit c02ca76
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
@file:Suppress("UnstableApiUsage")
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import dev.nolij.zumegradle.ClassShrinkingType
import dev.nolij.zumegradle.JarShrinkingType
import dev.nolij.zumegradle.JsonShrinkingType
import dev.nolij.zumegradle.MixinConfigMergingTransformer
import dev.nolij.zumegradle.CompressJarTask
import kotlinx.serialization.encodeToString
import me.modmuss50.mpp.HttpUtils
import me.modmuss50.mpp.PublishModTask
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package dev.nolij.zumegradle

import com.google.gson.GsonBuilder
import org.gradle.api.DefaultTask
import org.gradle.api.tasks.Input
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package dev.nolij.zumegradle

import com.github.jengelman.gradle.plugins.shadow.transformers.Transformer
import com.github.jengelman.gradle.plugins.shadow.transformers.TransformerContext
import groovy.json.JsonOutput
Expand All @@ -8,6 +10,7 @@ import org.apache.tools.zip.ZipOutputStream
import org.apache.tools.zip.ZipEntry

class MixinConfigMergingTransformer : Transformer {

private val JSON = JsonSlurper()

@Input
Expand Down Expand Up @@ -80,5 +83,5 @@ class MixinConfigMergingTransformer : Transformer {
mixins.clear()
refMaps.clear()
}

}

0 comments on commit c02ca76

Please sign in to comment.