Better separation

This commit is contained in:
Andrea Cavalli 2024-09-16 17:11:31 +02:00
parent cc998f1de4
commit ed9e8de721
7 changed files with 145 additions and 15 deletions

82
pom.xml
View File

@ -237,10 +237,7 @@
<profiles> <profiles>
<profile> <profile>
<id>standalone</id> <id>fatjar</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>io.jstach.rainbowgum</groupId> <groupId>io.jstach.rainbowgum</groupId>
@ -277,18 +274,12 @@
<configuration> <configuration>
<sources> <sources>
<source>src/standalone/java/</source> <source>src/standalone/java/</source>
<source>src/fatjar/java/</source>
</sources> </sources>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
</plugins>
</build>
</profile>
<profile>
<id>fatjar</id>
<build>
<plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId> <artifactId>maven-shade-plugin</artifactId>
@ -310,10 +301,77 @@
</plugins> </plugins>
</build> </build>
</profile> </profile>
<profile> <profile>
<id>native</id> <id>library</id>
<build> <build>
<plugins> <plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.4.0</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/library/java/</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>native</id>
<dependencies>
<dependency>
<groupId>io.jstach.rainbowgum</groupId>
<artifactId>rainbowgum-core</artifactId>
<version>${rainbowgum.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.jstach.rainbowgum</groupId>
<artifactId>rainbowgum-pattern</artifactId>
<version>${rainbowgum.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.jstach.rainbowgum</groupId>
<artifactId>rainbowgum-slf4j</artifactId>
<version>${rainbowgum.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.4.0</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/native/java/</source>
<source>src/standalone/java/</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<groupId>org.graalvm.buildtools</groupId> <groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId> <artifactId>native-maven-plugin</artifactId>

View File

@ -0,0 +1,37 @@
module rockserver.core {
requires rocksdbjni;
requires net.sourceforge.argparse4j;
requires java.logging;
requires org.jetbrains.annotations;
requires high.scale.lib;
requires org.github.gestalt.core;
requires org.github.gestalt.hocon;
requires it.unimi.dsi.fastutil;
requires org.apache.thrift;
requires org.slf4j;
requires protobuf.java;
requires io.grpc.protobuf;
requires io.grpc.stub;
requires io.grpc;
requires jsr305;
requires com.google.common;
requires io.grpc.netty;
requires io.jstach.rainbowgum;
requires io.jstach.rainbowgum.pattern;
requires io.netty.common;
requires proto.google.common.protos;
requires io.netty.handler;
requires io.netty.buffer;
requires io.netty.transport;
requires io.netty.codec.http;
requires io.netty.codec;
requires io.netty.codec.http2;
exports it.cavallium.rockserver.core.client;
exports it.cavallium.rockserver.core.common;
exports it.cavallium.rockserver.core.config;
opens it.cavallium.rockserver.core.resources;
opens it.cavallium.rockserver.core.config to org.github.gestalt.core, org.github.gestalt.hocon;
exports it.cavallium.rockserver.core.impl.rocksdb;
exports it.cavallium.rockserver.core.impl;
}

View File

@ -0,0 +1,35 @@
module rockserver.core {
requires rocksdbjni;
requires net.sourceforge.argparse4j;
requires java.logging;
requires org.jetbrains.annotations;
requires high.scale.lib;
requires org.github.gestalt.core;
requires org.github.gestalt.hocon;
requires it.unimi.dsi.fastutil;
requires org.apache.thrift;
requires org.slf4j;
requires protobuf.java;
requires io.grpc.protobuf;
requires io.grpc.stub;
requires io.grpc;
requires jsr305;
requires com.google.common;
requires io.grpc.netty;
requires io.netty.common;
requires proto.google.common.protos;
requires io.netty.handler;
requires io.netty.buffer;
requires io.netty.transport;
requires io.netty.codec.http;
requires io.netty.codec;
requires io.netty.codec.http2;
exports it.cavallium.rockserver.core.client;
exports it.cavallium.rockserver.core.common;
exports it.cavallium.rockserver.core.config;
opens it.cavallium.rockserver.core.resources;
opens it.cavallium.rockserver.core.config to org.github.gestalt.core, org.github.gestalt.hocon;
exports it.cavallium.rockserver.core.impl.rocksdb;
exports it.cavallium.rockserver.core.impl;
}

View File

@ -1,4 +1,4 @@
package it.cavallium.rockserver.core.logging; package it.cavallium.rockserver.core;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;

View File

@ -1,4 +1,4 @@
package it.cavallium.rockserver.core.logging; package it.cavallium.rockserver.core;
import static io.netty.handler.codec.http.HttpHeaderValues.DEFLATE; import static io.netty.handler.codec.http.HttpHeaderValues.DEFLATE;
import static io.netty.handler.codec.http.HttpHeaderValues.GZIP; import static io.netty.handler.codec.http.HttpHeaderValues.GZIP;

View File

@ -1,4 +1,4 @@
package it.cavallium.rockserver.core.logging; package it.cavallium.rockserver.core;
import com.oracle.svm.core.annotate.Substitute; import com.oracle.svm.core.annotate.Substitute;
import com.oracle.svm.core.annotate.TargetClass; import com.oracle.svm.core.annotate.TargetClass;