code: @TaskAction
      public void download() throws IOException {
          action.execute();
          
          // handle 'upToDate'
          try {
              if (action.isUpToDate()) {
                  Method getState = this.getClass().getMethod("getState");
                  Object state = getState.invoke(this);
                  try {
                      // prior to Gradle 3.2 we needed to do this
                      Method upToDate = state.getClass().getMethod("upToDate");
                      upToDate.invoke(state);
                  } catch (NoSuchMethodException e) {
                      // since Gradle 3.2 we need to do this
                      Method setDidWork = state.getClass().getMethod(
                              "setDidWork", boolean.class);
                      setDidWork.invoke(state, false);
                  }
              }
          } catch (Exception e) {
              //just ignore
          }
      }
docs: Starts downloading
  @throws IOException if the file could not downloaded