Compare commits

2 Commits

Author SHA1 Message Date
1b441c0a8d add: значение аттбибута как список 2024-02-28 17:42:33 +03:00
791861b21a style: gradle 2024-02-28 17:34:47 +03:00
2 changed files with 20 additions and 12 deletions

View File

@@ -1,3 +1,5 @@
//file:noinspection GroovyAssignabilityCheck
//file:noinspection GrUnresolvedAccess
plugins {
id "java-library"
id "maven-publish"
@@ -14,7 +16,7 @@ compileJava {
}
group = "ru.di9"
version = "1.2"
version = "1.2.1"
repositories {
mavenLocal()
@@ -24,17 +26,16 @@ repositories {
dependencies {
api("it.unimi.dsi:fastutil:8.5.12")
def junit5_version = "5.9.2"
testImplementation("org.junit.jupiter:junit-jupiter-api:${junit5_version}")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junit5_version}")
def junit5Version = "5.9.2"
testImplementation("org.junit.jupiter:junit-jupiter-api:$junit5Version")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junit5Version")
}
test {
useJUnitPlatform()
}
publishing {
publications {
publishing.publications {
mavenBinary(MavenPublication) {
groupId = project.group
artifactId = project.name
@@ -42,5 +43,4 @@ publishing {
from components.java
}
}
}

View File

@@ -80,6 +80,14 @@ public class XmlElement implements Iterable<XmlElement> {
}
}
public List<String> getAttributeAsListString(String key) {
if (element.hasAttribute(key)) {
return Arrays.asList(element.getAttribute(key).split(","));
} else {
return Collections.emptyList();
}
}
@Override
public Iterator<XmlElement> iterator() {
return new XmlElementIterator(element.getChildNodes());