Search in sources :

Example 6 with Library

use of org.springframework.boot.build.bom.Library in project spring-boot by spring-projects.

the class ExtractVersionConstraints method extractVersionProperties.

private void extractVersionProperties(String projectPath) {
    Object bom = getProject().project(projectPath).getExtensions().getByName("bom");
    BomExtension bomExtension = (BomExtension) bom;
    for (Library lib : bomExtension.getLibraries()) {
        String versionProperty = lib.getVersionProperty();
        if (versionProperty != null) {
            this.versionProperties.add(new VersionProperty(lib.getName(), versionProperty));
        }
    }
}
Also used : BomExtension(org.springframework.boot.build.bom.BomExtension) Library(org.springframework.boot.build.bom.Library)

Aggregations

Library (org.springframework.boot.build.bom.Library)6 File (java.io.File)3 Test (org.junit.jupiter.api.Test)3 LibraryVersion (org.springframework.boot.build.bom.Library.LibraryVersion)3 HashSet (java.util.HashSet)2 InvalidUserDataException (org.gradle.api.InvalidUserDataException)2 DependencyVersions (org.springframework.boot.build.bom.Library.DependencyVersions)2 Group (org.springframework.boot.build.bom.Library.Group)2 Module (org.springframework.boot.build.bom.Library.Module)2 VersionAlignment (org.springframework.boot.build.bom.Library.VersionAlignment)2 DependencyVersion (org.springframework.boot.build.bom.bomr.version.DependencyVersion)2 FileInputStream (java.io.FileInputStream)1 InputStream (java.io.InputStream)1 ArrayList (java.util.ArrayList)1 Collection (java.util.Collection)1 Collections (java.util.Collections)1 HashMap (java.util.HashMap)1 LinkedHashMap (java.util.LinkedHashMap)1 List (java.util.List)1 Map (java.util.Map)1