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"> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<modelVersion>4.0.0</modelVersion> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<groupId>org.drtshock</groupId> <modelVersion>4.0.0</modelVersion>
<artifactId>potato</artifactId> <groupId>org.drtshock</groupId>
<version>1.7.5</version> <artifactId>potato</artifactId>
<name>Potato</name> <version>1.7.5</version>
<build> <name>Potato</name>
<plugins> <packaging>jar</packaging>
<plugin> <build>
<groupId>org.apache.maven.plugins</groupId> <plugins>
<artifactId>maven-compiler-plugin</artifactId> <plugin>
<version>3.1</version> <groupId>org.apache.maven.plugins</groupId>
<configuration> <artifactId>maven-compiler-plugin</artifactId>
<source>1.6</source> <version>3.5.1</version>
<target>1.6</target> <configuration>
</configuration> <source>1.8</source>
</plugin> <target>1.8</target>
<plugin> </configuration>
<groupId>org.apache.maven.plugins</groupId> </plugin>
<artifactId>maven-jar-plugin</artifactId> <plugin>
<version>2.4</version> <groupId>org.apache.maven.plugins</groupId>
<configuration> <artifactId>maven-jar-plugin</artifactId>
<archive> <version>3.0.2</version>
<addMavenDescriptor>false</addMavenDescriptor> <configuration>
<manifest> <archive>
<addClasspath>true</addClasspath> <addMavenDescriptor>false</addMavenDescriptor>
<mainClass>org.drtshock.Potato</mainClass> <manifest>
</manifest> <addClasspath>true</addClasspath>
</archive> <mainClass>org.drtshock.Potato</mainClass>
<finalName>Potato</finalName> </manifest>
</configuration> </archive>
</plugin> </configuration>
<plugin> </plugin>
<groupId>org.apache.maven.plugins</groupId> <plugin>
<artifactId>maven-javadoc-plugin</artifactId> <groupId>org.apache.maven.plugins</groupId>
<version>2.10.3</version> <artifactId>maven-javadoc-plugin</artifactId>
</plugin> <version>2.10.4</version>
</plugins> </plugin>
</build> <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> </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();
} }