Upgrade to Java 8 with Retrolambda

This commit is contained in:
vemacs 2016-10-13 11:57:30 -04:00
parent 862099b76b
commit 3add51629e
3 changed files with 57 additions and 42 deletions

93
pom.xml
View file

@ -1,40 +1,55 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.drtshock</groupId>
<artifactId>potato</artifactId>
<version>1.7.5</version>
<name>Potato</name>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>org.drtshock.Potato</mainClass>
</manifest>
</archive>
<finalName>Potato</finalName>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
</plugin>
</plugins>
</build>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.drtshock</groupId>
<artifactId>potato</artifactId>
<version>1.7.5</version>
<name>Potato</name>
<packaging>jar</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>org.drtshock.Potato</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
</plugin>
<plugin>
<groupId>net.orfjackal.retrolambda</groupId>
<artifactId>retrolambda-maven-plugin</artifactId>
<version>2.3.0</version>
<executions>
<execution>
<goals>
<goal>process-main</goal>
<goal>process-test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<finalName>Potato</finalName>
</build>
</project>

View file

@ -11,7 +11,7 @@ import java.util.List;
*/
public class Potato implements Tuber {
private final List<Condiment> condiments = new ArrayList<Condiment>();
private final List<Condiment> condiments = new ArrayList<>();
public static void main(String[] args) {
final Potato potato = new Potato();

View file

@ -1,7 +1,7 @@
package org.drtshock;
public interface Tuber {
public boolean isDelicious();
boolean isDelicious();
public Tuber propagate();
Tuber propagate();
}