From 37f84a9fc5e59eb7b45cfbdd06b5a1145ec30a0b Mon Sep 17 00:00:00 2001 From: eericxu <2681350846@qq.com> Date: Thu, 23 Nov 2023 14:13:28 +0800 Subject: [PATCH] release 1.0.4 Support login Support Sync data use gitlab --- olca-app-build/mac_dist.sh | 2 +- olca-app/META-INF/MANIFEST.MF | 4 ++-- olca-app/aicpLCA.product | 5 ++--- olca-app/plugin.xml | 6 +----- olca-app/src/org/openlca/app/util/Req.java | 19 +++++++++---------- 5 files changed, 15 insertions(+), 21 deletions(-) diff --git a/olca-app-build/mac_dist.sh b/olca-app-build/mac_dist.sh index 1a34ce6d4..6768b0459 100755 --- a/olca-app-build/mac_dist.sh +++ b/olca-app-build/mac_dist.sh @@ -1,6 +1,6 @@ #!/bin/bash -DIST="aicpLCA_macOS_x64_1.0.3_$(date '+%Y-%m-%d')" +DIST="aicpLCA_macOS_x64_1.0.4_$(date '+%Y-%m-%d')" BUNDLE_ID="org.aicplca.app" APP_DMG="build/tmp/macosx.cocoa.x86_64/aicpLCA_dmg/aicpLCA.app" APP_PKG="build/tmp/macosx.cocoa.x86_64/aicpLCA_pkg/aicpLCA.app" diff --git a/olca-app/META-INF/MANIFEST.MF b/olca-app/META-INF/MANIFEST.MF index 08175871a..debafdb6c 100644 --- a/olca-app/META-INF/MANIFEST.MF +++ b/olca-app/META-INF/MANIFEST.MF @@ -4,7 +4,7 @@ Bundle-Name: olca-app Automatic-Module-Name: olca-app Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-SymbolicName: olca-app;singleton:=true -Bundle-Version: 1.0.3 +Bundle-Version: 1.0.4 Bundle-Activator: org.openlca.app.rcp.RcpActivator Bundle-Vendor: aicpLCA.org Eclipse-BundleShape: dir @@ -110,7 +110,7 @@ Bundle-ClassPath: ., libs/org.eclipse.persistence.core-3.0.3.jar, libs/org.eclipse.persistence.jpa.jpql-3.0.3.jar, libs/org.eclipse.persistence.jpa-3.0.3.jar, - libs/osgi-resource-locator-1.0.3.jar, + libs/osgi-resource-locator-1.0.4.jar, libs/perfmark-api-0.25.0.jar, libs/ph-commons-10.1.2.jar, libs/ph-css-6.3.2.jar, diff --git a/olca-app/aicpLCA.product b/olca-app/aicpLCA.product index 476992f57..f1c413880 100644 --- a/olca-app/aicpLCA.product +++ b/olca-app/aicpLCA.product @@ -1,12 +1,12 @@ - + - AICP LCA Tool 1.0.3 + AICP LCA Tool 1.0.4 Copyright (c) 2023 GTech International Ltd. All rights reserved. Visit https://gtech.world @@ -48,7 +48,6 @@ Visit https://gtech.world org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17 - diff --git a/olca-app/plugin.xml b/olca-app/plugin.xml index 93f555ad9..9cdb3599f 100644 --- a/olca-app/plugin.xml +++ b/olca-app/plugin.xml @@ -582,7 +582,7 @@ + value="AICP LCA Tool 1.0.4 Copyright (c) 2023 GTech International Ltd. All rights reserved. Visit https://gtech.world"> - - diff --git a/olca-app/src/org/openlca/app/util/Req.java b/olca-app/src/org/openlca/app/util/Req.java index adc8822a5..319877543 100644 --- a/olca-app/src/org/openlca/app/util/Req.java +++ b/olca-app/src/org/openlca/app/util/Req.java @@ -11,22 +11,20 @@ public class Req { private static HttpClient client; private static Gson gson = new Gson(); // beta - private static final String base = "https://pre-api.gtech.world"; +// private static final String base = "https://pre-api.gtech.world"; // prod -// private static final String base = "https://api-v2.gtech.world"; + private static final String base = "https://api-v2.gtech.world"; public static T httpGET(String path, Class classz) throws Exception { var req = HttpRequest.newBuilder(URI.create(base + path)).build(); var res = instanceClinet().send(req, HttpResponse.BodyHandlers.ofString()); return gson.fromJson(res.body(), classz); } - - public static T httpPost(String path,String body, Class classz) throws Exception { + + public static T httpPost(String path, String body, Class classz) throws Exception { var bodyPub = HttpRequest.BodyPublishers.ofString(body); var req = HttpRequest.newBuilder(URI.create(base + path)) - .header("Content-Type", "application/json;charset=utf-8") - .POST(bodyPub) - .build(); + .header("Content-Type", "application/json;charset=utf-8").POST(bodyPub).build(); var res = instanceClinet().send(req, HttpResponse.BodyHandlers.ofString()); return gson.fromJson(res.body(), classz); } @@ -35,11 +33,12 @@ public static class RES { public int status; public String message; public T data; - public RES(){ - + + public RES() { + } } - + private static HttpClient instanceClinet() { if (client == null) { client = HttpClient.newHttpClient();