java.lang.NoSuchMethodError: 'java.lang.String com.rusefi.core.io.BundleUtil.readBranchNameToDisplay()' fix #7004
This commit is contained in:
parent
a57dd3d38a
commit
4830b66cbd
|
@ -5,6 +5,12 @@ plugins {
|
||||||
|
|
||||||
// this CORE module cannot depend on model/ini!
|
// this CORE module cannot depend on model/ini!
|
||||||
|
|
||||||
|
/**
|
||||||
|
* this module is used by both autoupdate and ui subprojects
|
||||||
|
* note that during auto-update we have UI reference older version of core jars from older autoupdate!
|
||||||
|
* in order to avoid issues like java.lang.NoSuchMethodError: 'java.lang.String com.rusefi.core.io.BundleUtil.readBranchNameToDisplay()' #7004
|
||||||
|
* be careful about using minimal-required project placement while changing API!
|
||||||
|
*/
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':logging-api')
|
api project(':logging-api')
|
||||||
api project(':core_io')
|
api project(':core_io')
|
||||||
|
|
|
@ -16,25 +16,6 @@ public class BundleUtil {
|
||||||
private static final char BUNDLE_TOKEN_SEPARATOR = '.';
|
private static final char BUNDLE_TOKEN_SEPARATOR = '.';
|
||||||
private static final String SNAPSHOT = "snapshot";
|
private static final String SNAPSHOT = "snapshot";
|
||||||
|
|
||||||
/**
|
|
||||||
* @return null in case of error
|
|
||||||
*/
|
|
||||||
@Nullable
|
|
||||||
public static String readBranchNameToDisplay() {
|
|
||||||
final String bundleFullName = readBundleFullName();
|
|
||||||
if (bundleFullName != null) {
|
|
||||||
try {
|
|
||||||
final BundleInfo bundleInfo = parse(bundleFullName);
|
|
||||||
// TODO: get rid of the pornography below:
|
|
||||||
// we should use `development` instead of `snapshot` for master branch in bundle name.
|
|
||||||
return (bundleInfo.isMaster() ? "development" : bundleInfo.getBranchName());
|
|
||||||
} catch (final Throwable e) {
|
|
||||||
log.warn(String.format("We failed to parse bundle full name `%s`", bundleFullName), e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return null in case of error
|
* @return null in case of error
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -10,7 +10,7 @@ public interface rusEFIVersion {
|
||||||
* *** BE CAREFUL WE HAVE SEPARATE AUTOUPDATE_VERSION also managed manually ***
|
* *** BE CAREFUL WE HAVE SEPARATE AUTOUPDATE_VERSION also managed manually ***
|
||||||
* @see com.rusefi.autoupdate.Autoupdate#AUTOUPDATE_VERSION
|
* @see com.rusefi.autoupdate.Autoupdate#AUTOUPDATE_VERSION
|
||||||
*/
|
*/
|
||||||
int CONSOLE_VERSION = 20241002;
|
int CONSOLE_VERSION = 20241028;
|
||||||
AtomicReference<String> firmwareVersion = new AtomicReference<>("N/A");
|
AtomicReference<String> firmwareVersion = new AtomicReference<>("N/A");
|
||||||
|
|
||||||
static long classBuildTimeMillis() {
|
static long classBuildTimeMillis() {
|
||||||
|
|
|
@ -245,7 +245,7 @@ public class StartupFrame {
|
||||||
jLabel.setForeground(Color.red);
|
jLabel.setForeground(Color.red);
|
||||||
} else {
|
} else {
|
||||||
final Date binaryModificationDate = new Date(binaryModificationTimestamp);
|
final Date binaryModificationDate = new Date(binaryModificationTimestamp);
|
||||||
final String branchNameToDisplay = BundleUtil.readBranchNameToDisplay();
|
final String branchNameToDisplay = UiBundleUtil.readBranchNameToDisplay();
|
||||||
jLabel = new JLabel(String.format(
|
jLabel = new JLabel(String.format(
|
||||||
"<html><center>%s files<br/>%s</center></html>",
|
"<html><center>%s files<br/>%s</center></html>",
|
||||||
branchNameToDisplay,
|
branchNameToDisplay,
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.rusefi;
|
||||||
|
|
||||||
|
import com.devexperts.logging.Logging;
|
||||||
|
import com.rusefi.core.io.BundleUtil;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import static com.devexperts.logging.Logging.getLogging;
|
||||||
|
|
||||||
|
public class UiBundleUtil {
|
||||||
|
private static final Logging log = getLogging(BundleUtil.class);
|
||||||
|
/**
|
||||||
|
* @return null in case of error
|
||||||
|
*/
|
||||||
|
@Nullable
|
||||||
|
public static String readBranchNameToDisplay() {
|
||||||
|
final String bundleFullName = BundleUtil.readBundleFullName();
|
||||||
|
if (bundleFullName != null) {
|
||||||
|
try {
|
||||||
|
final BundleUtil.BundleInfo bundleInfo = BundleUtil.parse(bundleFullName);
|
||||||
|
// TODO: get rid of the pornography below:
|
||||||
|
// we should use `development` instead of `snapshot` for master branch in bundle name.
|
||||||
|
return (bundleInfo.isMaster() ? "development" : bundleInfo.getBranchName());
|
||||||
|
} catch (Throwable e) {
|
||||||
|
log.warn(String.format("We failed to parse bundle full name `%s`", bundleFullName), e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue