Skip to content
Open
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
14 changes: 7 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ scmVersion {
allprojects {
apply plugin: 'java'
sourceCompatibility = 1.8
targetCompatibility = 1.8
targetCompatibility = 1.17

repositories {
mavenCentral()
}
project.version = scmVersion.version

ext.jetbrains = [
version : "2022.2",
pycharm : "PythonCore:222.3345.40",
rubymine: "org.jetbrains.plugins.ruby:222.3345.16",
goland : "org.jetbrains.plugins.go:222.3345.90",
scala : "org.intellij.scala:2022.2.3"
version : "2024.2.1",
pycharm : "PythonCore:242.21829.142",
rubymine: "org.jetbrains.plugins.ruby:242.21829.142",
goland : "org.jetbrains.plugins.go:242.21829.142",
scala : "org.intellij.scala:2024.2.25"
]
}

Expand Down Expand Up @@ -65,4 +65,4 @@ tasks {
sinceBuild.set("201")
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,28 @@
import net.ashald.envfile.providers.EnvFileParser;
import org.yaml.snakeyaml.Yaml;

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;

@AllArgsConstructor
public class YamlEnvFileParser implements EnvFileParser {
private final Yaml yaml;

@Override
public Map<String, String> parse(String content) {
return yaml.load(content);
Map<String, Object> value = yaml.load(content);
Set<String> keys = value.keySet();
Map<String, String> result = new LinkedHashMap<>();
for (String key : keys) {
Object v = value.get(key);
if (v != null && v.getClass().equals(String.class)) {
result.put(key, (String) v);
} else {
String stringValue = String.valueOf(v);
result.put(key, stringValue);
}
}
return result;
}
}
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<idea-plugin>
<id>net.ashald.envfile</id>
<name>EnvFile</name>
<version>3.4.1</version>
<version>3.4.3</version>
<vendor email="envfile@ashald.net">Borys Pierov</vendor>

<description><![CDATA[
Expand Down