@@ -104,7 +104,7 @@ public ConfigurationFetcher(@NotNull LibraryManager libraryManager) {
104
104
.groupId ("com{}grack" )
105
105
.artifactId ("nanojson" )
106
106
.version ("1.8" )
107
- .checksum ("qyhAVZM8LYvqhGQrbmW2aHV4hRzn+2flPCV98wAimJo=" )
107
+ .checksumFromBase64 ("qyhAVZM8LYvqhGQrbmW2aHV4hRzn+2flPCV98wAimJo=" )
108
108
.repository (Repositories .MAVEN_CENTRAL )
109
109
.build ()
110
110
));
@@ -343,7 +343,8 @@ private Set<ExcludedDependency> fetchExcludedTransitiveDependencies(@NotNull Map
343
343
* </ul>
344
344
* Optional properties:
345
345
* <ul>
346
- * <li>checksum: The SHA-256 checksum of the library, must be a base64 encoded string and may only be included if the library is a JAR</li>
346
+ * <li>checksum: The SHA-256 checksum of the library, may only be included if the library is a JAR</li>
347
+ * <li>checksumFromBase64: The SHA-256 checksum of the library, must be a base64 encoded string and may only be included if the library is a JAR</li>
347
348
* <li>classifier: The artifact classifier of the library</li>
348
349
* <li>isolatedLoad: Whether to load this library in an IsolatedClassLoader</li>
349
350
* <li>loaderId: The loader ID of this library</li>
@@ -399,8 +400,14 @@ private List<Library> fetchLibraries(@NotNull Map<String, Object> configuration,
399
400
String checksum = getString (library , "checksum" );
400
401
401
402
if (checksum != null ) {
403
+ libraryBuilder .checksum (checksum );
404
+ }
405
+
406
+ String checksumFromBase64 = getString (library , "checksumFromBase64" );
407
+
408
+ if (checksumFromBase64 != null ) {
402
409
try {
403
- libraryBuilder .checksum ( checksum );
410
+ libraryBuilder .checksumFromBase64 ( checksumFromBase64 );
404
411
} catch (IllegalArgumentException ignored ) {
405
412
throw new ConfigurationException ("The checksum property must be a valid base64 encoded SHA-256 checksum" );
406
413
}
0 commit comments