From 9f179d3e346b1b437a462e411ca606ca992beb2f Mon Sep 17 00:00:00 2001 From: rusefi Date: Thu, 2 Jul 2020 21:20:52 -0400 Subject: [PATCH] steps towards Android --- android/settings.gradle | 2 ++ java_console/build.xml | 4 +++- java_console/inifile/inifile.iml | 3 ++- .../java}/com/opensr5/ConfigurationImage.java | 0 .../{ => main/java}/com/opensr5/ini/DialogModel.java | 0 .../java}/com/opensr5/ini/IniFileMetaInfo.java | 0 .../{ => main/java}/com/opensr5/ini/IniFileModel.java | 10 +++++----- .../{ => main/java}/com/opensr5/ini/IniFileReader.java | 0 .../{ => main/java}/com/opensr5/ini/RawIniFile.java | 0 .../java}/com/opensr5/ini/field/ArrayIniField.java | 0 .../java}/com/opensr5/ini/field/EnumIniField.java | 0 .../java}/com/opensr5/ini/field/IniField.java | 0 .../java}/com/opensr5/ini/field/ScalarIniField.java | 0 .../java}/com/opensr5/ini/field/StringIniField.java | 0 .../src/{ => main/java}/com/rusefi/config/Field.java | 0 .../{ => main/java}/com/rusefi/config/FieldType.java | 0 .../src/{ => main/java}/com/rusefi/core/Pair.java | 0 .../java}/com/rusefi/tune/xml/Bibliography.java | 0 .../{ => main/java}/com/rusefi/tune/xml/Constant.java | 0 .../src/{ => main/java}/com/rusefi/tune/xml/Msq.java | 0 .../src/{ => main/java}/com/rusefi/tune/xml/Page.java | 0 .../java}/com/rusefi/tune/xml/PcVariable.java | 0 .../{ => main/java}/com/rusefi/tune/xml/Settings.java | 0 .../java}/com/rusefi/tune/xml/UserComments.java | 0 .../java}/com/rusefi/tune/xml/VersionInfo.java | 0 .../java}/com/rusefi/tune/xml/package-info.java | 0 .../src/{ => main/java}/com/rusefi/xml/XmlUtil.java | 0 .../java}/com/opensr5/ini/test/IniFileReaderTest.java | 0 java_console/io/build.gradle | 7 +++++++ java_console/{io/src => logging-api}/build.gradle | 0 30 files changed, 19 insertions(+), 7 deletions(-) rename java_console/inifile/src/{ => main/java}/com/opensr5/ConfigurationImage.java (100%) rename java_console/inifile/src/{ => main/java}/com/opensr5/ini/DialogModel.java (100%) rename java_console/inifile/src/{ => main/java}/com/opensr5/ini/IniFileMetaInfo.java (100%) rename java_console/inifile/src/{ => main/java}/com/opensr5/ini/IniFileModel.java (96%) rename java_console/inifile/src/{ => main/java}/com/opensr5/ini/IniFileReader.java (100%) rename java_console/inifile/src/{ => main/java}/com/opensr5/ini/RawIniFile.java (100%) rename java_console/inifile/src/{ => main/java}/com/opensr5/ini/field/ArrayIniField.java (100%) rename java_console/inifile/src/{ => main/java}/com/opensr5/ini/field/EnumIniField.java (100%) rename java_console/inifile/src/{ => main/java}/com/opensr5/ini/field/IniField.java (100%) rename java_console/inifile/src/{ => main/java}/com/opensr5/ini/field/ScalarIniField.java (100%) rename java_console/inifile/src/{ => main/java}/com/opensr5/ini/field/StringIniField.java (100%) rename java_console/inifile/src/{ => main/java}/com/rusefi/config/Field.java (100%) rename java_console/inifile/src/{ => main/java}/com/rusefi/config/FieldType.java (100%) rename java_console/inifile/src/{ => main/java}/com/rusefi/core/Pair.java (100%) rename java_console/inifile/src/{ => main/java}/com/rusefi/tune/xml/Bibliography.java (100%) rename java_console/inifile/src/{ => main/java}/com/rusefi/tune/xml/Constant.java (100%) rename java_console/inifile/src/{ => main/java}/com/rusefi/tune/xml/Msq.java (100%) rename java_console/inifile/src/{ => main/java}/com/rusefi/tune/xml/Page.java (100%) rename java_console/inifile/src/{ => main/java}/com/rusefi/tune/xml/PcVariable.java (100%) rename java_console/inifile/src/{ => main/java}/com/rusefi/tune/xml/Settings.java (100%) rename java_console/inifile/src/{ => main/java}/com/rusefi/tune/xml/UserComments.java (100%) rename java_console/inifile/src/{ => main/java}/com/rusefi/tune/xml/VersionInfo.java (100%) rename java_console/inifile/src/{ => main/java}/com/rusefi/tune/xml/package-info.java (100%) rename java_console/inifile/src/{ => main/java}/com/rusefi/xml/XmlUtil.java (100%) rename java_console/inifile/src/{ => test/java}/com/opensr5/ini/test/IniFileReaderTest.java (100%) create mode 100644 java_console/io/build.gradle rename java_console/{io/src => logging-api}/build.gradle (100%) diff --git a/android/settings.gradle b/android/settings.gradle index 6b78b1c8a2..4a75a7fb31 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1,3 +1,5 @@ include ':app' include ':shared_io' project(':shared_io').projectDir = new File('../java_console/shared_io') +include ':io' +project(':io').projectDir = new File('../java_console/io') diff --git a/java_console/build.xml b/java_console/build.xml index dccf2c3a3c..05365a74c8 100644 --- a/java_console/build.xml +++ b/java_console/build.xml @@ -47,7 +47,8 @@ - + + @@ -80,6 +81,7 @@ + diff --git a/java_console/inifile/inifile.iml b/java_console/inifile/inifile.iml index adb8d76a15..5aa8c8e642 100644 --- a/java_console/inifile/inifile.iml +++ b/java_console/inifile/inifile.iml @@ -3,7 +3,8 @@ - + + diff --git a/java_console/inifile/src/com/opensr5/ConfigurationImage.java b/java_console/inifile/src/main/java/com/opensr5/ConfigurationImage.java similarity index 100% rename from java_console/inifile/src/com/opensr5/ConfigurationImage.java rename to java_console/inifile/src/main/java/com/opensr5/ConfigurationImage.java diff --git a/java_console/inifile/src/com/opensr5/ini/DialogModel.java b/java_console/inifile/src/main/java/com/opensr5/ini/DialogModel.java similarity index 100% rename from java_console/inifile/src/com/opensr5/ini/DialogModel.java rename to java_console/inifile/src/main/java/com/opensr5/ini/DialogModel.java diff --git a/java_console/inifile/src/com/opensr5/ini/IniFileMetaInfo.java b/java_console/inifile/src/main/java/com/opensr5/ini/IniFileMetaInfo.java similarity index 100% rename from java_console/inifile/src/com/opensr5/ini/IniFileMetaInfo.java rename to java_console/inifile/src/main/java/com/opensr5/ini/IniFileMetaInfo.java diff --git a/java_console/inifile/src/com/opensr5/ini/IniFileModel.java b/java_console/inifile/src/main/java/com/opensr5/ini/IniFileModel.java similarity index 96% rename from java_console/inifile/src/com/opensr5/ini/IniFileModel.java rename to java_console/inifile/src/main/java/com/opensr5/ini/IniFileModel.java index 57260a614c..908d685cfd 100644 --- a/java_console/inifile/src/com/opensr5/ini/IniFileModel.java +++ b/java_console/inifile/src/main/java/com/opensr5/ini/IniFileModel.java @@ -95,7 +95,7 @@ public class IniFileModel { private void handleLine(RawIniFile.Line line) { - String rawTest = line.getRawText(); + String rawText = line.getRawText(); try { LinkedList list = new LinkedList<>(Arrays.asList(line.getTokens())); @@ -107,19 +107,19 @@ public class IniFileModel { // todo: use TSProjectConsumer constant if (isInSettingContextHelp) { // todo: use TSProjectConsumer constant - if (rawTest.contains("SettingContextHelpEnd")) { + if (rawText.contains("SettingContextHelpEnd")) { isInSettingContextHelp = false; } if (list.size() == 2) tooltips.put(list.get(0), list.get(1)); return; - } else if (rawTest.contains("SettingContextHelp")) { + } else if (rawText.contains("SettingContextHelp")) { isInsidePageDefinition = false; isInSettingContextHelp = true; return; } - if (RawIniFile.Line.isCommentLine(rawTest)) + if (RawIniFile.Line.isCommentLine(rawText)) return; trim(list); @@ -140,7 +140,7 @@ public class IniFileModel { handleField(list); } } catch (RuntimeException e) { - throw new IllegalStateException("While [" + rawTest + "]", e); + throw new IllegalStateException("While [" + rawText + "]", e); } } diff --git a/java_console/inifile/src/com/opensr5/ini/IniFileReader.java b/java_console/inifile/src/main/java/com/opensr5/ini/IniFileReader.java similarity index 100% rename from java_console/inifile/src/com/opensr5/ini/IniFileReader.java rename to java_console/inifile/src/main/java/com/opensr5/ini/IniFileReader.java diff --git a/java_console/inifile/src/com/opensr5/ini/RawIniFile.java b/java_console/inifile/src/main/java/com/opensr5/ini/RawIniFile.java similarity index 100% rename from java_console/inifile/src/com/opensr5/ini/RawIniFile.java rename to java_console/inifile/src/main/java/com/opensr5/ini/RawIniFile.java diff --git a/java_console/inifile/src/com/opensr5/ini/field/ArrayIniField.java b/java_console/inifile/src/main/java/com/opensr5/ini/field/ArrayIniField.java similarity index 100% rename from java_console/inifile/src/com/opensr5/ini/field/ArrayIniField.java rename to java_console/inifile/src/main/java/com/opensr5/ini/field/ArrayIniField.java diff --git a/java_console/inifile/src/com/opensr5/ini/field/EnumIniField.java b/java_console/inifile/src/main/java/com/opensr5/ini/field/EnumIniField.java similarity index 100% rename from java_console/inifile/src/com/opensr5/ini/field/EnumIniField.java rename to java_console/inifile/src/main/java/com/opensr5/ini/field/EnumIniField.java diff --git a/java_console/inifile/src/com/opensr5/ini/field/IniField.java b/java_console/inifile/src/main/java/com/opensr5/ini/field/IniField.java similarity index 100% rename from java_console/inifile/src/com/opensr5/ini/field/IniField.java rename to java_console/inifile/src/main/java/com/opensr5/ini/field/IniField.java diff --git a/java_console/inifile/src/com/opensr5/ini/field/ScalarIniField.java b/java_console/inifile/src/main/java/com/opensr5/ini/field/ScalarIniField.java similarity index 100% rename from java_console/inifile/src/com/opensr5/ini/field/ScalarIniField.java rename to java_console/inifile/src/main/java/com/opensr5/ini/field/ScalarIniField.java diff --git a/java_console/inifile/src/com/opensr5/ini/field/StringIniField.java b/java_console/inifile/src/main/java/com/opensr5/ini/field/StringIniField.java similarity index 100% rename from java_console/inifile/src/com/opensr5/ini/field/StringIniField.java rename to java_console/inifile/src/main/java/com/opensr5/ini/field/StringIniField.java diff --git a/java_console/inifile/src/com/rusefi/config/Field.java b/java_console/inifile/src/main/java/com/rusefi/config/Field.java similarity index 100% rename from java_console/inifile/src/com/rusefi/config/Field.java rename to java_console/inifile/src/main/java/com/rusefi/config/Field.java diff --git a/java_console/inifile/src/com/rusefi/config/FieldType.java b/java_console/inifile/src/main/java/com/rusefi/config/FieldType.java similarity index 100% rename from java_console/inifile/src/com/rusefi/config/FieldType.java rename to java_console/inifile/src/main/java/com/rusefi/config/FieldType.java diff --git a/java_console/inifile/src/com/rusefi/core/Pair.java b/java_console/inifile/src/main/java/com/rusefi/core/Pair.java similarity index 100% rename from java_console/inifile/src/com/rusefi/core/Pair.java rename to java_console/inifile/src/main/java/com/rusefi/core/Pair.java diff --git a/java_console/inifile/src/com/rusefi/tune/xml/Bibliography.java b/java_console/inifile/src/main/java/com/rusefi/tune/xml/Bibliography.java similarity index 100% rename from java_console/inifile/src/com/rusefi/tune/xml/Bibliography.java rename to java_console/inifile/src/main/java/com/rusefi/tune/xml/Bibliography.java diff --git a/java_console/inifile/src/com/rusefi/tune/xml/Constant.java b/java_console/inifile/src/main/java/com/rusefi/tune/xml/Constant.java similarity index 100% rename from java_console/inifile/src/com/rusefi/tune/xml/Constant.java rename to java_console/inifile/src/main/java/com/rusefi/tune/xml/Constant.java diff --git a/java_console/inifile/src/com/rusefi/tune/xml/Msq.java b/java_console/inifile/src/main/java/com/rusefi/tune/xml/Msq.java similarity index 100% rename from java_console/inifile/src/com/rusefi/tune/xml/Msq.java rename to java_console/inifile/src/main/java/com/rusefi/tune/xml/Msq.java diff --git a/java_console/inifile/src/com/rusefi/tune/xml/Page.java b/java_console/inifile/src/main/java/com/rusefi/tune/xml/Page.java similarity index 100% rename from java_console/inifile/src/com/rusefi/tune/xml/Page.java rename to java_console/inifile/src/main/java/com/rusefi/tune/xml/Page.java diff --git a/java_console/inifile/src/com/rusefi/tune/xml/PcVariable.java b/java_console/inifile/src/main/java/com/rusefi/tune/xml/PcVariable.java similarity index 100% rename from java_console/inifile/src/com/rusefi/tune/xml/PcVariable.java rename to java_console/inifile/src/main/java/com/rusefi/tune/xml/PcVariable.java diff --git a/java_console/inifile/src/com/rusefi/tune/xml/Settings.java b/java_console/inifile/src/main/java/com/rusefi/tune/xml/Settings.java similarity index 100% rename from java_console/inifile/src/com/rusefi/tune/xml/Settings.java rename to java_console/inifile/src/main/java/com/rusefi/tune/xml/Settings.java diff --git a/java_console/inifile/src/com/rusefi/tune/xml/UserComments.java b/java_console/inifile/src/main/java/com/rusefi/tune/xml/UserComments.java similarity index 100% rename from java_console/inifile/src/com/rusefi/tune/xml/UserComments.java rename to java_console/inifile/src/main/java/com/rusefi/tune/xml/UserComments.java diff --git a/java_console/inifile/src/com/rusefi/tune/xml/VersionInfo.java b/java_console/inifile/src/main/java/com/rusefi/tune/xml/VersionInfo.java similarity index 100% rename from java_console/inifile/src/com/rusefi/tune/xml/VersionInfo.java rename to java_console/inifile/src/main/java/com/rusefi/tune/xml/VersionInfo.java diff --git a/java_console/inifile/src/com/rusefi/tune/xml/package-info.java b/java_console/inifile/src/main/java/com/rusefi/tune/xml/package-info.java similarity index 100% rename from java_console/inifile/src/com/rusefi/tune/xml/package-info.java rename to java_console/inifile/src/main/java/com/rusefi/tune/xml/package-info.java diff --git a/java_console/inifile/src/com/rusefi/xml/XmlUtil.java b/java_console/inifile/src/main/java/com/rusefi/xml/XmlUtil.java similarity index 100% rename from java_console/inifile/src/com/rusefi/xml/XmlUtil.java rename to java_console/inifile/src/main/java/com/rusefi/xml/XmlUtil.java diff --git a/java_console/inifile/src/com/opensr5/ini/test/IniFileReaderTest.java b/java_console/inifile/src/test/java/com/opensr5/ini/test/IniFileReaderTest.java similarity index 100% rename from java_console/inifile/src/com/opensr5/ini/test/IniFileReaderTest.java rename to java_console/inifile/src/test/java/com/opensr5/ini/test/IniFileReaderTest.java diff --git a/java_console/io/build.gradle b/java_console/io/build.gradle new file mode 100644 index 0000000000..8435b161f0 --- /dev/null +++ b/java_console/io/build.gradle @@ -0,0 +1,7 @@ +plugins { + id 'java' +} + +dependencies { + implementation project(':logging-api') +} \ No newline at end of file diff --git a/java_console/io/src/build.gradle b/java_console/logging-api/build.gradle similarity index 100% rename from java_console/io/src/build.gradle rename to java_console/logging-api/build.gradle