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

29
pom.xml
View file

@ -1,24 +1,26 @@
<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"> <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> <modelVersion>4.0.0</modelVersion>
<groupId>org.drtshock</groupId> <groupId>org.drtshock</groupId>
<artifactId>potato</artifactId> <artifactId>potato</artifactId>
<version>1.7.5</version> <version>1.7.5</version>
<name>Potato</name> <name>Potato</name>
<packaging>jar</packaging>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version> <version>3.5.1</version>
<configuration> <configuration>
<source>1.6</source> <source>1.8</source>
<target>1.6</target> <target>1.8</target>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId> <artifactId>maven-jar-plugin</artifactId>
<version>2.4</version> <version>3.0.2</version>
<configuration> <configuration>
<archive> <archive>
<addMavenDescriptor>false</addMavenDescriptor> <addMavenDescriptor>false</addMavenDescriptor>
@ -27,14 +29,27 @@
<mainClass>org.drtshock.Potato</mainClass> <mainClass>org.drtshock.Potato</mainClass>
</manifest> </manifest>
</archive> </archive>
<finalName>Potato</finalName>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version> <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> </plugin>
</plugins> </plugins>
<finalName>Potato</finalName>
</build> </build>
</project> </project>

View file

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

View file

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