Use SpecialSource Maven pluging for compile time remapping.

This commit is contained in:
md_5 2014-12-16 10:11:06 +11:00
parent 6b061e2581
commit 7bc218d1e2
3 changed files with 45 additions and 103 deletions

27
deprecation-mappings.csrg Normal file
View File

@ -0,0 +1,27 @@
org/bukkit/Bukkit _INVALID_getOnlinePlayers ()[Lorg/bukkit/entity/Player; getOnlinePlayers
org/bukkit/Server _INVALID_getOnlinePlayers ()[Lorg/bukkit/entity/Player; getOnlinePlayers
org/bukkit/entity/Damageable _INVALID_damage (I)V damage
org/bukkit/entity/Damageable _INVALID_damage (ILorg/bukkit/entity/Entity;)V damage
org/bukkit/entity/Damageable _INVALID_getHealth ()I getHealth
org/bukkit/entity/Damageable _INVALID_getMaxHealth ()I getMaxHealth
org/bukkit/entity/Damageable _INVALID_setHealth (I)V setHealth
org/bukkit/entity/Damageable _INVALID_setMaxHealth (I)V setMaxHealth
org/bukkit/entity/LivingEntity _INVALID_getLastDamage ()I getLastDamage
org/bukkit/entity/LivingEntity _INVALID_setLastDamage (I)V setLastDamage
org/bukkit/entity/Minecart _INVALID_getDamage ()I getDamage
org/bukkit/entity/Minecart _INVALID_setDamage (I)V setDamage
org/bukkit/entity/Projectile _INVALID_getShooter ()Lorg/bukkit/entity/LivingEntity; getShooter
org/bukkit/entity/Projectile _INVALID_setShooter (Lorg/bukkit/entity/LivingEntity;)V setShooter
org/bukkit/event/entity/EntityDamageEvent _INVALID_getDamage ()I getDamage
org/bukkit/event/entity/EntityDamageEvent _INVALID_setDamage (I)V setDamage
org/bukkit/event/entity/EntityRegainHealthEvent _INVALID_getAmount ()I getAmount
org/bukkit/event/entity/EntityRegainHealthEvent _INVALID_setAmount (I)V setAmount
org/bukkit/event/vehicle/VehicleDamageEvent _INVALID_getDamage ()I getDamage
org/bukkit/event/vehicle/VehicleDamageEvent _INVALID_setDamage (I)V setDamage

View File

@ -1,46 +0,0 @@
members:
"org/bukkit/entity/Damageable _INVALID_damage (I)V": damage
"org/bukkit/entity/Damageable _INVALID_damage (ILorg/bukkit/entity/Entity;)V": damage
"org/bukkit/entity/Damageable _INVALID_getHealth ()I": getHealth
"org/bukkit/entity/Damageable _INVALID_setHealth (I)V": setHealth
"org/bukkit/entity/Damageable _INVALID_getMaxHealth ()I": getMaxHealth
"org/bukkit/entity/Damageable _INVALID_setMaxHealth (I)V": setMaxHealth
"org/bukkit/entity/LivingEntity _INVALID_getLastDamage ()I": getLastDamage
"org/bukkit/entity/LivingEntity _INVALID_setLastDamage (I)V": setLastDamage
"org/bukkit/event/entity/EntityDamageEvent _INVALID_getDamage ()I": getDamage
"org/bukkit/event/entity/EntityDamageEvent _INVALID_setDamage (I)V": setDamage
"org/bukkit/event/vehicle/VehicleDamageEvent _INVALID_getDamage ()I": getDamage
"org/bukkit/event/vehicle/VehicleDamageEvent _INVALID_setDamage (I)V": setDamage
"org/bukkit/event/entity/EntityRegainHealthEvent _INVALID_getAmount ()I": getAmount
"org/bukkit/event/entity/EntityRegainHealthEvent _INVALID_setAmount (I)V": setAmount
"org/bukkit/entity/Minecart _INVALID_getDamage ()I": getDamage
"org/bukkit/entity/Minecart _INVALID_setDamage (I)V": setDamage
"org/bukkit/entity/Projectile _INVALID_getShooter ()Lorg/bukkit/entity/LivingEntity;": getShooter
"org/bukkit/entity/Projectile _INVALID_setShooter (Lorg/bukkit/entity/LivingEntity;)V": setShooter
"org/bukkit/Bukkit _INVALID_getOnlinePlayers ()[Lorg/bukkit/entity/Player;": getOnlinePlayers
"org/bukkit/Server _INVALID_getOnlinePlayers ()[Lorg/bukkit/entity/Player;": getOnlinePlayers
flags:
"org/bukkit/craftbukkit/v${minecraft_version}/entity/CraftLivingEntity getHealth ()I": 0x1001
"org/bukkit/craftbukkit/v${minecraft_version}/entity/CraftEnderDragonPart getHealth ()I": 0x1001
"org/bukkit/craftbukkit/v${minecraft_version}/entity/CraftLivingEntity getMaxHealth ()I": 0x1001
"org/bukkit/craftbukkit/v${minecraft_version}/entity/CraftEnderDragonPart getMaxHealth ()I": 0x1001
"org/bukkit/craftbukkit/v${minecraft_version}/entity/CraftLivingEntity setHealth (I)V": 0x1001
"org/bukkit/craftbukkit/v${minecraft_version}/entity/CraftEnderDragonPart setHealth (I)V": 0x1001
"org/bukkit/craftbukkit/v${minecraft_version}/entity/CraftLivingEntity setMaxHealth (I)V": 0x1001
"org/bukkit/craftbukkit/v${minecraft_version}/entity/CraftEnderDragonPart setMaxHealth (I)V": 0x1001
"org/bukkit/craftbukkit/v${minecraft_version}/entity/CraftLivingEntity damage (I)V": 0x1001
"org/bukkit/craftbukkit/v${minecraft_version}/entity/CraftEnderDragonPart damage (I)V": 0x1001
"org/bukkit/craftbukkit/v${minecraft_version}/entity/CraftLivingEntity damage (ILorg/bukkit/entity/Entity;)V": 0x1001
"org/bukkit/craftbukkit/v${minecraft_version}/entity/CraftEnderDragonPart damage (ILorg/bukkit/entity/Entity;)V": 0x1001
"org/bukkit/craftbukkit/v${minecraft_version}/entity/CraftLivingEntity getLastDamage ()I": 0x1001
"org/bukkit/craftbukkit/v${minecraft_version}/entity/CraftLivingEntity setLastDamage (I)V": 0x1001
"org/bukkit/craftbukkit/v${minecraft_version}/entity/CraftMinecart setDamage (I)V": 0x1001
"org/bukkit/craftbukkit/v${minecraft_version}/entity/CraftMinecart getDamage ()I": 0x1001
"org/bukkit/craftbukkit/v${minecraft_version}/entity/CraftProjectile getShooter ()Lorg/bukkit/entity/LivingEntity;": 0x1001
"org/bukkit/craftbukkit/v${minecraft_version}/entity/CraftProjectile setShooter (Lorg/bukkit/entity/LivingEntity;)V": 0x1001
"org/bukkit/craftbukkit/v${minecraft_version}/entity/CraftArrow getShooter ()Lorg/bukkit/entity/LivingEntity;": 0x1001
"org/bukkit/craftbukkit/v${minecraft_version}/entity/CraftArrow setShooter (Lorg/bukkit/entity/LivingEntity;)V": 0x1001
"org/bukkit/craftbukkit/v${minecraft_version}/entity/CraftFireball getShooter ()Lorg/bukkit/entity/LivingEntity;": 0x1001
"org/bukkit/craftbukkit/v${minecraft_version}/entity/CraftFireball setShooter (Lorg/bukkit/entity/LivingEntity;)V": 0x1001
"org/bukkit/craftbukkit/v${minecraft_version}/entity/CraftFish getShooter ()Lorg/bukkit/entity/LivingEntity;": 0x1001
"org/bukkit/craftbukkit/v${minecraft_version}/entity/CraftFish setShooter (Lorg/bukkit/entity/LivingEntity;)V": 0x1001

75
pom.xml
View File

@ -18,20 +18,6 @@
<buildtag.suffix></buildtag.suffix> <buildtag.suffix></buildtag.suffix>
</properties> </properties>
<repositories>
<repository>
<id>repobo-snap</id>
<url>http://repo.bukkit.org/content/groups/public</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>bukkit-plugins</id>
<url>http://repo.bukkit.org/content/groups/public</url>
</pluginRepository>
</pluginRepositories>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
@ -251,6 +237,24 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<!-- Gotta go after shade plugin -->
<plugin>
<groupId>net.md-5</groupId>
<artifactId>specialsource-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>remap</goal>
</goals>
<configuration>
<srgIn>${project.basedir}/deprecation-mappings.csrg</srgIn>
<remappedDependencies/>
</configuration>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
@ -272,49 +276,6 @@
</excludes> </excludes>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.3</version>
<executions>
<execution>
<id>maps-file</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target</outputDirectory>
<resources>
<resource>
<directory>${basedir}</directory>
<filtering>true</filtering>
<includes>
<include>maps.yml</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.wolvereness</groupId>
<artifactId>overmapped</artifactId>
<version>0.0.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>map</goal>
</goals>
<configuration>
<maps>${basedir}/target/maps.yml</maps>
<input>${basedir}/target/${project.artifactId}-${project.version}.jar</input>
<original>${basedir}/target/unmapped-${project.artifactId}-${project.version}.jar</original>
</configuration>
</execution>
</executions>
</plugin>
</plugins> </plugins>
<pluginManagement> <pluginManagement>
<plugins> <plugins>