Set the log location of the transformer so it doesn't go into people's git

This commit is contained in:
shedaniel
2021-02-26 02:08:21 +08:00
parent 59edc1f09d
commit f0c6f4cfa5
3 changed files with 6 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
kotlin.code.style=official
loom_version=0.6.67
transformer_version=2.1.24
transformer_version=2.1.26
base_version=3.0

View File

@@ -17,7 +17,7 @@ import java.util.jar.JarOutputStream
import java.util.jar.Manifest
open class ArchitectPluginExtension(val project: Project) {
var transformerVersion = "2.1.24"
var transformerVersion = "2.1.25"
var injectablesVersion = "1.0.4"
var minecraft = ""
var injectInjectables = true

View File

@@ -3,9 +3,9 @@ package me.shedaniel.architect.plugin
import me.shedaniel.architect.plugin.utils.GradleSupport
import me.shedaniel.architectury.transformer.Transform
import me.shedaniel.architectury.transformer.Transformer
import me.shedaniel.architectury.transformer.transformers.BuiltinProperties
import org.gradle.api.Project
import org.gradle.api.file.RegularFileProperty
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.InputFile
import org.gradle.api.tasks.Internal
import org.gradle.api.tasks.TaskAction
@@ -19,6 +19,7 @@ import kotlin.time.ExperimentalTime
open class TransformingTask : Jar() {
@InputFile
val input: RegularFileProperty = GradleSupport.getFileProperty(project)
@Internal
val transformers = mutableListOf<Transformer>()
@@ -28,9 +29,10 @@ open class TransformingTask : Jar() {
val input: Path = this.input.asFile.get().toPath()
val output: Path = this.archiveFile.get().asFile.toPath()
project.extensions.getByType(ArchitectPluginExtension::class.java).properties().forEach { (key, value) ->
project.extensions.getByType(ArchitectPluginExtension::class.java).properties().forEach { (key, value) ->
System.setProperty(key, value)
}
System.setProperty(BuiltinProperties.LOCATION, project.file(".gradle").absolutePath)
Transform.runTransformers(input, output, transformers)
}