diff --git a/build.gradle b/build.gradle index d037bf8..6674a06 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { } group 'io.izzel.arclight' -version '1.6' +version '1.7' repositories { mavenCentral() diff --git a/src/main/groovy/io/izzel/arclight/gradle/ArclightGradlePlugin.groovy b/src/main/groovy/io/izzel/arclight/gradle/ArclightGradlePlugin.groovy index 2a0894a..d048390 100644 --- a/src/main/groovy/io/izzel/arclight/gradle/ArclightGradlePlugin.groovy +++ b/src/main/groovy/io/izzel/arclight/gradle/ArclightGradlePlugin.groovy @@ -85,6 +85,7 @@ class ArclightGradlePlugin implements Plugin { task.inheritanceMap = new File(processMapping.outDir, 'inheritanceMap.txt') task.outJar = project.file("${project.buildDir}/arclight_cache/spigot-${arclightExt.mcVersion}-mapped.jar") task.outDeobf = project.file("${project.buildDir}/arclight_cache/spigot-${arclightExt.mcVersion}-mapped-deobf.jar") + task.inAt = arclightExt.accessTransformer task.dependsOn(processMapping) if (arclightExt.wipeVersion && !task.bukkitVersion) { task.bukkitVersion = arclightExt.bukkitVersion diff --git a/src/main/groovy/io/izzel/arclight/gradle/tasks/RemapSpigotTask.groovy b/src/main/groovy/io/izzel/arclight/gradle/tasks/RemapSpigotTask.groovy index 6c29592..857ff28 100644 --- a/src/main/groovy/io/izzel/arclight/gradle/tasks/RemapSpigotTask.groovy +++ b/src/main/groovy/io/izzel/arclight/gradle/tasks/RemapSpigotTask.groovy @@ -26,6 +26,7 @@ class RemapSpigotTask extends DefaultTask { private List includes private List excludes private String bukkitVersion + private File inAt RemapSpigotTask() { includes = new ArrayList<>() @@ -70,6 +71,10 @@ class RemapSpigotTask extends DefaultTask { args.add('-m') args.add(tmpSrg.toFile().canonicalPath) } + if (inAt) { + args.add('--access-transformer') + args.add(inAt.canonicalPath) + } project.exec { commandLine = args standardOutput = System.out @@ -188,4 +193,14 @@ class RemapSpigotTask extends DefaultTask { void setBukkitVersion(String bukkitVersion) { this.bukkitVersion = bukkitVersion } + + @InputFile + @Optional + File getInAt() { + return inAt + } + + void setInAt(File inAt) { + this.inAt = inAt + } }