Hello i have a problem with my config manager when i compile my plugini have this error
C:\Users\maxime\Desktop\sauvgarde\Nouveau dossier\plugn work\Copy of Sponge\src\main\java\MainLootCase.java:[51,76] error: lambda expressions are not supported in -source 1.5
and at this line i have this
configManager.setup(defaultConfig, configLoader, getLogger(), config-> {
You’re telling the Java compiler that the source is written in Java 5, which is definitely not going to work because Sponge requires Java 8 to compile and run.
You need to change the source (and possibly target) compatibility level.
Is this only in the IDE or does this happen when running a build task (e.g. with Gradle)?
The problem is when i run a build task
I use eclipse and i have jdk 1.8
Then you need to specify to gradle that the source is in 1.8.
sourceCompatibility = 1.8
how i can do this on maven project ?
C,est comme sa.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
yes but i have this in my pom.xml
[code]
4.0.0
terrainwax
LootCase
0.0.1-WIP
terrainwax plugin
plugin sponge of terrainwax
sponge-maven-repo
Sponge maven repo
http://repo.spongepowered.org/maven
true
true
Put it between version and repository.
Please use a [code][/code]
block to provide config files and code. It is easier to read and prevents <xml><tags /></xml>
from being parsed (or attempted to parse) by discourse.