mirror of
https://github.com/zaaarf/lillero-processor.git
synced 2024-11-21 21:14:49 +01:00
chore: updated to mapping library 0.3.0
This commit is contained in:
parent
30f8e080ae
commit
3dd86a4187
3 changed files with 13 additions and 15 deletions
|
@ -7,8 +7,7 @@ archivesBaseName = 'processor'
|
|||
version = gitVersion()
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
sourceCompatibility = targetCompatibility JavaVersion.VERSION_1_8
|
||||
withSourcesJar()
|
||||
withJavadocJar()
|
||||
}
|
||||
|
@ -22,7 +21,7 @@ dependencies {
|
|||
implementation 'com.squareup:javapoet:1.13.0'
|
||||
implementation 'org.ow2.asm:asm-commons:9.5'
|
||||
implementation 'ftbsc:lll:0.4.2'
|
||||
implementation 'ftbsc.lll:mapper:0.2.0'
|
||||
implementation 'ftbsc.lll:mapper:0.3.0'
|
||||
}
|
||||
|
||||
jar {
|
||||
|
|
|
@ -4,12 +4,12 @@ import ftbsc.lll.exceptions.AmbiguousDefinitionException;
|
|||
import ftbsc.lll.exceptions.MappingNotFoundException;
|
||||
import ftbsc.lll.exceptions.NotAProxyException;
|
||||
import ftbsc.lll.exceptions.TargetNotFoundException;
|
||||
import ftbsc.lll.mapper.tools.Mapper;
|
||||
import ftbsc.lll.mapper.tools.data.ClassData;
|
||||
import ftbsc.lll.mapper.tools.data.FieldData;
|
||||
import ftbsc.lll.mapper.tools.data.MethodData;
|
||||
import ftbsc.lll.processor.annotations.Target;
|
||||
import ftbsc.lll.processor.tools.containers.ClassContainer;
|
||||
import ftbsc.lll.mapper.IMapper;
|
||||
import ftbsc.lll.proxies.ProxyType;
|
||||
|
||||
import javax.annotation.processing.ProcessingEnvironment;
|
||||
|
@ -216,11 +216,11 @@ public class ASTUtils {
|
|||
* Gets the {@link ClassData} corresponding to the given fully-qualified name,
|
||||
* or creates a false one with the same, non-obfuscated name twice.
|
||||
* @param name the internal name of the class to convert
|
||||
* @param mapper the {@link IMapper} to use, may be null
|
||||
* @param mapper the {@link Mapper} to use, may be null
|
||||
* @return the fully qualified class name
|
||||
* @since 0.6.1
|
||||
*/
|
||||
public static ClassData getClassData(String name, IMapper mapper) {
|
||||
public static ClassData getClassData(String name, Mapper mapper) {
|
||||
try {
|
||||
name = name.replace('.', '/'); //just in case
|
||||
if(mapper != null)
|
||||
|
@ -236,11 +236,11 @@ public class ASTUtils {
|
|||
* @param parent the internal name of the parent class
|
||||
* @param name the name of the member
|
||||
* @param descriptor the descriptor of the method
|
||||
* @param mapper the {@link IMapper} to use, may be null
|
||||
* @param mapper the {@link Mapper} to use, may be null
|
||||
* @return the fully qualified class name
|
||||
* @since 0.6.1
|
||||
*/
|
||||
public static MethodData getMethodData(String parent, String name, String descriptor, IMapper mapper) {
|
||||
public static MethodData getMethodData(String parent, String name, String descriptor, Mapper mapper) {
|
||||
try {
|
||||
name = name.replace('.', '/'); //just in case
|
||||
if(mapper != null)
|
||||
|
@ -255,11 +255,11 @@ public class ASTUtils {
|
|||
* mapping is found.
|
||||
* @param parent the internal name of the parent class
|
||||
* @param name the name of the member
|
||||
* @param mapper the {@link IMapper} to use, may be null
|
||||
* @param mapper the {@link Mapper} to use, may be null
|
||||
* @return the fully qualified class name
|
||||
* @since 0.6.1
|
||||
*/
|
||||
public static FieldData getFieldData(String parent, String name, IMapper mapper) {
|
||||
public static FieldData getFieldData(String parent, String name, Mapper mapper) {
|
||||
try {
|
||||
name = name.replace('.', '/'); //just in case
|
||||
if(mapper != null)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package ftbsc.lll.processor.tools;
|
||||
|
||||
import ftbsc.lll.IInjector;
|
||||
import ftbsc.lll.mapper.IMapper;
|
||||
import ftbsc.lll.mapper.MapperProvider;
|
||||
import ftbsc.lll.mapper.tools.Mapper;
|
||||
|
||||
import javax.annotation.processing.ProcessingEnvironment;
|
||||
import java.util.Arrays;
|
||||
|
@ -30,10 +30,10 @@ public class ProcessorOptions {
|
|||
public final ProcessingEnvironment env;
|
||||
|
||||
/**
|
||||
* The {@link IMapper} used to convert classes and variables
|
||||
* The {@link Mapper} used to convert classes and variables
|
||||
* to their obfuscated equivalent. Will be null when no mapper is in use.
|
||||
*/
|
||||
public final IMapper mapper;
|
||||
public final Mapper mapper;
|
||||
|
||||
/**
|
||||
* Whether the processor should issue warnings when compiling code anonymous
|
||||
|
@ -61,8 +61,7 @@ public class ProcessorOptions {
|
|||
String location = env.getOptions().get("mappingsFile");
|
||||
if(location != null) {
|
||||
List<String> lines = MapperProvider.fetchFromLocalOrRemote(location);
|
||||
this.mapper = MapperProvider.getMapper(lines);
|
||||
this.mapper.populate(lines, true);
|
||||
this.mapper = MapperProvider.getMapper(lines).getMapper(lines, true);
|
||||
} else this.mapper = null;
|
||||
this.anonymousClassWarning = parseBooleanArg(env.getOptions().get("anonymousClassWarning"), true);
|
||||
this.obfuscateInjectorMetadata = parseBooleanArg(env.getOptions().get("obfuscateInjectorMetadata"), true);
|
||||
|
|
Loading…
Reference in a new issue