code: public DependencyInfo createDependencyInfo(File basedir, String filename) {
          DependencyInfo dependency;
          try {
              File dependencyFile = new File(basedir, filename);
              String sha1 = ChecksumUtils.calculateSHA1(dependencyFile);
              dependency = new DependencyInfo(sha1);
              dependency.setArtifactId(dependencyFile.getName());
              dependency.setFilename(dependencyFile.getName());
  
              // system path
              try {
                  dependency.setSystemPath(dependencyFile.getCanonicalPath());
              } catch (IOException e) {
                  dependency.setSystemPath(dependencyFile.getAbsolutePath());
              }
  
              // populate hints
              if (calculateHints) {
                  DependencyHintsInfo hints = HintUtils.getHints(dependencyFile.getPath());
                  dependency.setHints(hints);
              }
  
              // additional sha1s
              // MD5
              if (calculateMd5) {
                  String md5 = ChecksumUtils.calculateHash(dependencyFile, HashAlgorithm.MD5);
                  dependency.addChecksum(ChecksumType.MD5, md5);
              }
  
              // handle JavaScript files
              if (filename.toLowerCase().matches(JAVA_SCRIPT_REGEX)) {
                  Map<ChecksumType, String> javaScriptChecksums;
                  try {
                      javaScriptChecksums = new HashCalculator().calculateJavaScriptHashes(dependencyFile);
                      if (javaScriptChecksums == null || javaScriptChecksums.isEmpty()) {
                          logger.debug("Failed to calculate javaScript hash: {}", dependencyFile.getPath());
                      }
                      for (Map.Entry<ChecksumType, String> entry : javaScriptChecksums.entrySet()) {
                          dependency.addChecksum(entry.getKey(), entry.getValue());
                      }
                  } catch (Exception e) {
                      logger.warn("Failed to calculate javaScript hash for file: {}, error: {}", dependencyFile.getPath(), e.getMessage());
                      logger.debug("Failed to calculate javaScript hash for file: {}, error: {}", dependencyFile.getPath(), e.getStackTrace());
                  }
              }
              // other platform SHA1
              ChecksumUtils.calculateOtherPlatformSha1(dependency, dependencyFile);
              // super hash
              ChecksumUtils.calculateSuperHash(dependency, dependencyFile);
          } catch (IOException e) {
              logger.warn("Failed to create dependency " + filename + " to dependency list: {}", e.getMessage());
              dependency = null;
          }
          return dependency;
      }
docs: /* --- Public methods ---