Changed compiler compliance to 11, modularized all packages (#114)
* added module- and package-info.java, changed JRE from 8 to 11 * updated maven from Java 1.8 to 11 Co-authored-by: CyB3RC0nN0R <kske@outlook.de>
This commit is contained in:
parent
930d1cebe1
commit
9896339f92
@ -18,7 +18,7 @@
|
||||
<attribute name="test" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
4
.github/workflows/maven.yml
vendored
4
.github/workflows/maven.yml
vendored
@ -9,9 +9,9 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Set up JDK 1.8
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
java-version: 11
|
||||
- name: Build with Maven
|
||||
run: mvn -B package --file pom.xml
|
||||
|
@ -10,9 +10,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
|
||||
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=11
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
@ -87,7 +87,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warn
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
|
||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
|
||||
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
|
||||
@ -127,4 +127,4 @@ org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||
org.eclipse.jdt.core.compiler.release=disabled
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
org.eclipse.jdt.core.compiler.source=11
|
||||
|
145
pom.xml
145
pom.xml
@ -1,68 +1,77 @@
|
||||
<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>informatik-ag-ngl</groupId>
|
||||
<artifactId>envoy-client</artifactId>
|
||||
<version>0.3-alpha</version>
|
||||
|
||||
<name>Envoy Client</name>
|
||||
<url>https://github.com/informatik-ag-ngl/envoy-client</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>jitpack.io</id>
|
||||
<url>https://jitpack.io</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.github.informatik-ag-ngl</groupId>
|
||||
<artifactId>envoy-common</artifactId>
|
||||
<version>develop-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>envoy-client</finalName>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>2.4.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>envoy.client.ui.Startup</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
<descriptorRefs>
|
||||
<descriptorRef>jar-with-dependencies</descriptorRef>
|
||||
</descriptorRefs>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
<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>informatik-ag-ngl</groupId>
|
||||
<artifactId>envoy-client</artifactId>
|
||||
<version>0.1-beta</version>
|
||||
|
||||
<name>Envoy Client</name>
|
||||
<url>https://github.com/informatik-ag-ngl/envoy-client</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>jitpack.io</id>
|
||||
<url>https://jitpack.io</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.github.informatik-ag-ngl</groupId>
|
||||
<artifactId>envoy-common</artifactId>
|
||||
<version>develop-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>envoy-client</finalName>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>3.2.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>envoy.client.ui.Startup</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
<descriptorRefs>
|
||||
<descriptorRef>jar-with-dependencies</descriptorRef>
|
||||
</descriptorRefs>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
9
src/main/java/envoy/client/data/package-info.java
Normal file
9
src/main/java/envoy/client/data/package-info.java
Normal file
@ -0,0 +1,9 @@
|
||||
/**
|
||||
* This package contains all data classes and classes related to persistence.
|
||||
*
|
||||
* @author Kai S. K. Engelbart
|
||||
* @author Leon Hofmeister
|
||||
* @author Maximilian Käfer
|
||||
* @since Envoy v0.1-beta
|
||||
*/
|
||||
package envoy.client.data;
|
9
src/main/java/envoy/client/event/package-info.java
Normal file
9
src/main/java/envoy/client/event/package-info.java
Normal file
@ -0,0 +1,9 @@
|
||||
/**
|
||||
* This package contains all client-sided events.
|
||||
*
|
||||
* @author Kai S. K. Engelbart
|
||||
* @author Leon Hofmeister
|
||||
* @author Maximilian Käfer
|
||||
* @since Envoy v0.1-beta
|
||||
*/
|
||||
package envoy.client.event;
|
@ -85,7 +85,7 @@ public class Client implements Closeable {
|
||||
rejected = false;
|
||||
|
||||
// Start receiver
|
||||
new Thread(receiver).start();
|
||||
receiver.start();
|
||||
|
||||
// Write login credentials
|
||||
SerializationUtils.writeBytesWithLength(credentials, socket.getOutputStream());
|
||||
|
@ -21,7 +21,7 @@ import envoy.util.SerializationUtils;
|
||||
* @author Kai S. K. Engelbart
|
||||
* @since Envoy v0.3-alpha
|
||||
*/
|
||||
public class Receiver implements Runnable {
|
||||
public class Receiver extends Thread {
|
||||
|
||||
private final InputStream in;
|
||||
private final Map<Class<?>, Consumer<?>> processors = new HashMap<>();
|
||||
@ -33,7 +33,10 @@ public class Receiver implements Runnable {
|
||||
*
|
||||
* @param in the {@link InputStream} to parse objects from
|
||||
*/
|
||||
public Receiver(InputStream in) { this.in = in; }
|
||||
public Receiver(InputStream in) {
|
||||
super("Receiver");
|
||||
this.in = in;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
|
9
src/main/java/envoy/client/net/package-info.java
Normal file
9
src/main/java/envoy/client/net/package-info.java
Normal file
@ -0,0 +1,9 @@
|
||||
/**
|
||||
* This package contains all classes related to client-server communication.
|
||||
*
|
||||
* @author Kai S. K. Engelbart
|
||||
* @author Leon Hofmeister
|
||||
* @author Maximilian Käfer
|
||||
* @since Envoy v0.1-beta
|
||||
*/
|
||||
package envoy.client.net;
|
@ -91,7 +91,7 @@ public final class ComponentListModel<E> implements Iterable<E>, Serializable {
|
||||
*/
|
||||
@Override
|
||||
public Iterator<E> iterator() {
|
||||
return new Iterator<E>() {
|
||||
return new Iterator<>() {
|
||||
|
||||
Iterator<E> iter = elements.iterator();
|
||||
|
||||
|
10
src/main/java/envoy/client/ui/list/package-info.java
Normal file
10
src/main/java/envoy/client/ui/list/package-info.java
Normal file
@ -0,0 +1,10 @@
|
||||
/**
|
||||
* This package defines a Swing component that can be used to display lists of
|
||||
* other components to the user.
|
||||
*
|
||||
* @author Kai S. K. Engelbart
|
||||
* @author Leon Hofmeister
|
||||
* @author Maximilian Käfer
|
||||
* @since Envoy v0.3-alpha
|
||||
*/
|
||||
package envoy.client.ui.list;
|
9
src/main/java/envoy/client/ui/package-info.java
Normal file
9
src/main/java/envoy/client/ui/package-info.java
Normal file
@ -0,0 +1,9 @@
|
||||
/**
|
||||
* This package contains classes defining the user interface.
|
||||
*
|
||||
* @author Kai S. K. Engelbart
|
||||
* @author Leon Hofmeister
|
||||
* @author Maximilian Käfer
|
||||
* @since Envoy v0.1-beta
|
||||
*/
|
||||
package envoy.client.ui;
|
9
src/main/java/envoy/client/ui/settings/package-info.java
Normal file
9
src/main/java/envoy/client/ui/settings/package-info.java
Normal file
@ -0,0 +1,9 @@
|
||||
/**
|
||||
* This package contains user interface classes related to the settings screen.
|
||||
*
|
||||
* @author Kai S. K. Engelbart
|
||||
* @author Leon Hofmeister
|
||||
* @author Maximilian Käfer
|
||||
* @since Envoy v0.2-alpha
|
||||
*/
|
||||
package envoy.client.ui.settings;
|
17
src/main/java/module-info.java
Normal file
17
src/main/java/module-info.java
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* This module contains all classes defining the client application of the Envoy
|
||||
* project.
|
||||
*
|
||||
* @author Kai S. K. Engelbart
|
||||
* @author Leon Hofmeister
|
||||
* @author Maximilian Käfer
|
||||
* @since Envoy v0.1-beta
|
||||
*/
|
||||
module envoy {
|
||||
|
||||
requires transitive envoy.common;
|
||||
requires transitive java.desktop;
|
||||
requires transitive java.logging;
|
||||
requires transitive java.naming;
|
||||
requires transitive java.prefs;
|
||||
}
|
Reference in New Issue
Block a user