code: public void activateServiceAccount(Path jsonFile) throws AppEngineException {
      Preconditions.checkArgument(Files.exists(jsonFile), "File does not exist: " + jsonFile);
      try {
        List<String> args = new ArrayList<>(3);
        args.add("auth");
        args.add("activate-service-account");
        args.addAll(GcloudArgs.get("key-file", jsonFile));
        runner.run(args, null);
      } catch (ProcessHandlerException | IOException ex) {
        throw new AppEngineException(ex);
      }
    }
docs: Activates a service account based on a configured json key file.
  
  @param jsonFile a service account json key file
  @throws AppEngineException when there is an issue with the auth flow