Use static year range in copyright of generated FIR and tests
Dynamically calculating a year is problematic, especially in cases like FIR where generation happens in every build. When you are working on a last year's commit, each build creates a bunch of uncommited changes of updating the year in copyrights.
This commit is contained in:
+3
-8
@@ -111,14 +111,9 @@ private class TestGeneratorImplInstance(
|
||||
val out = StringBuilder()
|
||||
val p = Printer(out)
|
||||
|
||||
val year = GregorianCalendar()[Calendar.YEAR]
|
||||
p.println(
|
||||
"""/*
|
||||
| * Copyright 2010-$year JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
| * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
| */
|
||||
|""".trimMargin()
|
||||
)
|
||||
val copyright = File("license/COPYRIGHT_HEADER.txt").readText()
|
||||
p.println(copyright)
|
||||
p.println()
|
||||
p.println("package ", suiteClassPackage, ";")
|
||||
p.println()
|
||||
p.println("import com.intellij.testFramework.TestDataPath;")
|
||||
|
||||
Reference in New Issue
Block a user