Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Remove/Update Kit third-party dependencies #758

Merged
merged 4 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@
<artifactId>gluon-plugin</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<version>2.0.1</version>
<classifier>module</classifier>
<scope>runtime</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1405,7 +1405,7 @@ private void updateHierarchyDisplayOption() {
public void onManageJarFxml(ActionEvent event) {
if(libraryDialogController==null){
libraryDialogController = new LibraryDialogController(editorController, AppSettings.getUserM2Repository(),
AppSettings.getTempM2Repository(), PreferencesController.getSingleton(), getStage());
PreferencesController.getSingleton(), getStage());
libraryDialogController.setOnAddJar(() -> onImportJarFxml(libraryDialogController.getStage()));
libraryDialogController.setOnEditFXML(fxmlPath -> {
if (SceneBuilderApp.getSingleton().findFirstUnusedDocumentWindowController().isPresent()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2022, Gluon and/or its affiliates.
* Copyright (c) 2016, 2024, Gluon and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
* This file is available and licensed under the following license:
Expand Down Expand Up @@ -40,10 +40,10 @@
import javafx.scene.image.Image;
import javafx.stage.Stage;

import javax.json.Json;
import javax.json.JsonObject;
import javax.json.JsonReader;
import javax.json.JsonReaderFactory;
import jakarta.json.Json;
import jakarta.json.JsonObject;
import jakarta.json.JsonReader;
import jakarta.json.JsonReaderFactory;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
Expand Down Expand Up @@ -78,10 +78,10 @@ public class AppSettings {
private static final JsonReaderFactory readerFactory = Json.createReaderFactory(null);

static {
initSceneBuiderVersion();
initSceneBuilderVersion();
}

private static void initSceneBuiderVersion() {
private static void initSceneBuilderVersion() {
try (InputStream in = AboutWindowController.class.getResourceAsStream("about.properties")) {
if (in != null) {
Properties sbProps = new Properties();
Expand Down Expand Up @@ -206,11 +206,4 @@ public static String getUserM2Repository() {
return m2Path;
}

public static String getTempM2Repository() {
String m2Path = System.getProperty("java.io.tmpdir") + File.separator + "m2Tmp"; //NOI18N

assert m2Path != null;

return m2Path;
}
}
2 changes: 1 addition & 1 deletion app/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
requires transitive com.gluonhq.scenebuilder.gluon.plugin;
requires java.logging;
requires java.prefs;
requires javax.json.api;
requires jakarta.json;

opens com.oracle.javafx.scenebuilder.app to javafx.fxml;
opens com.oracle.javafx.scenebuilder.app.about to javafx.fxml;
Expand Down
49 changes: 6 additions & 43 deletions kit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,54 +28,17 @@
<version>${javafx.version}</version>
</dependency>

<!-- Eclipse Aether -->
<!-- Maven Resolver -->
<dependency>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-api</artifactId>
<version>${aether.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-impl</artifactId>
<version>${aether.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-connector-basic</artifactId>
<version>${aether.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-transport-file</artifactId>
<version>${aether.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-transport-http</artifactId>
<version>${aether.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-aether-provider</artifactId>
<version>3.3.9</version>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-supplier</artifactId>
<version>${maven.resolver.version}</version>
</dependency>

<!-- Rest API -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
</dependency>
<dependency>
<groupId>javax.json</groupId>
<artifactId>javax.json-api</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
<version>1.0.4</version>
<scope>runtime</scope>
<artifactId>jakarta.json</artifactId>
<version>2.0.1</version>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2021, Gluon and/or its affiliates.
* Copyright (c) 2016, 2024, Gluon and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
* This file is available and licensed under the following license:
Expand Down Expand Up @@ -95,19 +95,17 @@ public class LibraryDialogController extends AbstractFxmlWindowController {
private Runnable onAddFolder;
private Consumer<Path> onEditFXML;

private String userM2Repository;
private String tempM2Repository;
private final String userM2Repository;

private final PreferencesControllerBase preferencesControllerBase;

public LibraryDialogController(EditorController editorController, String userM2Repository, String tempM2Repository,
public LibraryDialogController(EditorController editorController, String userM2Repository,
PreferencesControllerBase preferencesController, Stage owner) {
super(LibraryPanelController.class.getResource("LibraryDialog.fxml"), I18N.getBundle(), owner); //NOI18N
this.owner = owner;
this.editorController = editorController;
this.userLibrary = (UserLibrary) editorController.getLibrary();
this.userM2Repository = userM2Repository;
this.tempM2Repository = tempM2Repository;
this.preferencesControllerBase = preferencesController;
}

Expand Down Expand Up @@ -192,7 +190,7 @@ private void close() {
@FXML
private void manage() {
RepositoryManagerController repositoryDialogController = new RepositoryManagerController(editorController,
userM2Repository, tempM2Repository, preferencesControllerBase, getStage());
userM2Repository, preferencesControllerBase, getStage());
repositoryDialogController.openWindow();
}

Expand All @@ -216,7 +214,7 @@ private void addFolder() {
@FXML
private void addRelease() {
SearchMavenDialogController mavenDialogController = new SearchMavenDialogController(editorController,
userM2Repository, tempM2Repository, preferencesControllerBase, getStage());
userM2Repository, preferencesControllerBase, getStage());
mavenDialogController.openWindow();
mavenDialogController.getStage().showingProperty().addListener(new InvalidationListener() {
@Override
Expand All @@ -232,7 +230,7 @@ public void invalidated(Observable observable) {
@FXML
private void addManually() {
MavenDialogController mavenDialogController = new MavenDialogController(editorController, userM2Repository,
tempM2Repository, preferencesControllerBase, getStage());
preferencesControllerBase, getStage());
mavenDialogController.openWindow();
mavenDialogController.getStage().showingProperty().addListener(new InvalidationListener() {
@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2017 Gluon and/or its affiliates.
* Copyright (c) 2016, 2024, Gluon and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
* This file is available and licensed under the following license:
Expand Down Expand Up @@ -111,14 +111,14 @@ public class MavenDialogController extends AbstractFxmlWindowController {
private final PreferencesControllerBase preferencesControllerBase;

public MavenDialogController(EditorController editorController, String userM2Repository,
String tempM2Repository, PreferencesControllerBase preferencesControllerBase, Stage owner) {
PreferencesControllerBase preferencesControllerBase, Stage owner) {
super(LibraryPanelController.class.getResource("MavenDialog.fxml"), I18N.getBundle(), owner); //NOI18N
this.userLibrary = (UserLibrary) editorController.getLibrary();
this.owner = owner;
this.editorController = editorController;
this.preferencesControllerBase = preferencesControllerBase;

maven = new MavenRepositorySystem(false, userM2Repository, tempM2Repository,
maven = new MavenRepositorySystem(false, userM2Repository,
preferencesControllerBase.getRepositoryPreferences());

versionsService = new Service<ObservableList<Version>>() {
Expand Down
Loading