aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/shedlang/compiler/config/DependencyConfig.java
blob: 67535034487aa8b0d38b54769768383ef08b10cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package org.shedlang.compiler.config;

import org.shedlang.compiler.config.json.Json5ObjectWithSource;

import java.nio.file.Path;

public record DependencyConfig(Path path) {
    public static DependencyConfig fromJson5(
        Path projectRoot,
        Json5ObjectWithSource object
    ) {
        var path = projectRoot.resolve(object.getString("path").value());
        return new DependencyConfig(path);
    }
}