From ad29609699ed93ad84746aaa0f5c91561183a8f0 Mon Sep 17 00:00:00 2001 From: diegomarquezp Date: Fri, 19 Jan 2024 15:53:56 +0000 Subject: [PATCH] compute license year dynamically --- synthtool/languages/java.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/synthtool/languages/java.py b/synthtool/languages/java.py index 7cd1b7425..90bd0eb8f 100644 --- a/synthtool/languages/java.py +++ b/synthtool/languages/java.py @@ -25,11 +25,13 @@ from synthtool.log import logger from pathlib import Path from typing import Any, Optional, Dict, Iterable, List +from datetime import date JAR_DOWNLOAD_URL = "https://github.com/google/google-java-format/releases/download/google-java-format-{version}/google-java-format-{version}-all-deps.jar" DEFAULT_FORMAT_VERSION = "1.7" -GOOD_LICENSE = """/* - * Copyright 2024 Google LLC +CURRENT_YEAR = date.today().year +GOOD_LICENSE = f"""/* + * Copyright {CURRENT_YEAR} Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.