Update to graalvm 20 and some small adjustments [stage]

This commit is contained in:
crschnick 2023-07-19 08:50:19 +00:00
parent 3c7967d2c0
commit 8143f69da2
7 changed files with 33 additions and 10 deletions

View file

@ -26,7 +26,7 @@ are also not included to prevent attackers from easily impersonating the XPipe a
## Modularity
All XPipe components target [Java 19](https://openjdk.java.net/projects/jdk/19/) and make full use of the Java Module System (JPMS).
All XPipe components target [Java 20](https://openjdk.java.net/projects/jdk/20/) and make full use of the Java Module System (JPMS).
All components are modularized, including all their dependencies.
In case a dependency is (sadly) not modularized yet, module information is manually added using [moditect](https://github.com/moditect/moditect-gradle-plugin).
Further, note that as this is a pretty complicated Java project that fully utilizes modularity,
@ -42,6 +42,10 @@ This is due to the fact that some components are only included in the release ve
XPipe is able to automatically detect your local installation and fetch the required
components from it when it is run in a development environment.
You need to have GraalVM Community Edition for Java 20 installed as a JDK to compile the project.
If you are on Linux or macOS, you can easily accomplish that by running the `setup.sh` script.
On Windows, you have to manually install the JDK.
## Building and Running
You can use the gradle wrapper to build and run the project:

View file

@ -35,6 +35,10 @@ public interface DataStoreProvider {
default void preAdd(DataStore store) {}
default boolean shouldEdit() {
return false;
}
default Comp<?> customDisplay(StoreSection s) {
return new StandardStoreEntryComp(s.getWrapper(), null);
}

View file

@ -3,6 +3,7 @@ package io.xpipe.ext.base.action;
import io.xpipe.app.comp.store.GuiDsStoreCreator;
import io.xpipe.app.core.AppI18n;
import io.xpipe.app.ext.ActionProvider;
import io.xpipe.app.ext.DataStoreProviders;
import io.xpipe.app.storage.DataStorage;
import io.xpipe.app.storage.DataStoreEntry;
import io.xpipe.core.store.DataStore;
@ -58,7 +59,8 @@ public class EditStoreAction implements ActionProvider {
@Override
public boolean isMajor(DataStore o) {
return false;
var provider = DataStoreProviders.byStore(o);
return provider.shouldEdit();
}
@Override

View file

@ -1,6 +1,6 @@
tasks.withType(JavaCompile).configureEach {
sourceCompatibility = JavaVersion.VERSION_19
targetCompatibility = JavaVersion.VERSION_19
sourceCompatibility = JavaVersion.VERSION_20
targetCompatibility = JavaVersion.VERSION_20
modularity.inferModulePath = true
options.encoding = 'UTF-8'
options.compilerArgs << "-Xlint:unchecked"
@ -18,7 +18,7 @@ tasks.withType(JavaExec).configureEach {
javadoc{
source = sourceSets.main.allJava
options {
addStringOption('-release', '19')
addStringOption('-release', '20')
addStringOption('link', 'https://docs.oracle.com/en/java/javase/19/docs/api/')
addBooleanOption('html5', true)
addStringOption('Xdoclint:none', '-quiet')

View file

@ -1,6 +1,6 @@
dependencies {
compileOnly 'org.projectlombok:lombok:1.18.26'
annotationProcessor 'org.projectlombok:lombok:1.18.26'
testCompileOnly 'org.projectlombok:lombok:1.18.26'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.26'
compileOnly 'org.projectlombok:lombok:1.18.28'
annotationProcessor 'org.projectlombok:lombok:1.18.28'
testCompileOnly 'org.projectlombok:lombok:1.18.28'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.28'
}

View file

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

13
setup.sh Executable file
View file

@ -0,0 +1,13 @@
#!/bin/sh
which sdk
if [ $? -ne 0 ]; then
curl -s "https://get.sdkman.io" | bash
if [ $? -ne 0 ]; then
die "sdkman failed"
fi;
. "$HOME/.sdkman/bin/sdkman-init.sh"
fi;
sdk install java 20.0.1-graalce
sdk default java 20.0.1-graalce