From ae6d4d268d904aff074a7233e47fda23584b7e2b Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Mon, 2 Jan 2023 14:32:32 +0100 Subject: [PATCH] Use short copyright from COPYRIGHT_HEADER in generated files --- .../kotlin/incremental/ProtoCompareGenerated.kt | 15 ++------------- .../builtins/IrBuiltInsMapGenerated.kt | 15 ++------------- .../kotlin/renderer/KeywordStringsGenerated.java | 15 ++------------- generators/interpreter/GenerateInterpreterMap.kt | 3 ++- .../protobufCompare/GenerateProtoBufCompare.kt | 5 +++-- .../frontend/GenerateKeywordStrings.java | 3 ++- generators/wasm/WasmIntrinsicGenerator.kt | 4 ++-- .../stdlib/wasm/src/generated/_WasmArrays.kt | 15 ++------------- libraries/stdlib/wasm/src/generated/_WasmOp.kt | 15 ++------------- 9 files changed, 19 insertions(+), 71 deletions(-) diff --git a/build-common/src/org/jetbrains/kotlin/incremental/ProtoCompareGenerated.kt b/build-common/src/org/jetbrains/kotlin/incremental/ProtoCompareGenerated.kt index 674320236b1..0ce39b86146 100644 --- a/build-common/src/org/jetbrains/kotlin/incremental/ProtoCompareGenerated.kt +++ b/build-common/src/org/jetbrains/kotlin/incremental/ProtoCompareGenerated.kt @@ -1,17 +1,6 @@ /* - * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2010-2023 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. */ @file:Suppress("UNUSED_PARAMETER") diff --git a/compiler/ir/ir.interpreter/src/org/jetbrains/kotlin/ir/interpreter/builtins/IrBuiltInsMapGenerated.kt b/compiler/ir/ir.interpreter/src/org/jetbrains/kotlin/ir/interpreter/builtins/IrBuiltInsMapGenerated.kt index 41f5967e190..3421e96e003 100644 --- a/compiler/ir/ir.interpreter/src/org/jetbrains/kotlin/ir/interpreter/builtins/IrBuiltInsMapGenerated.kt +++ b/compiler/ir/ir.interpreter/src/org/jetbrains/kotlin/ir/interpreter/builtins/IrBuiltInsMapGenerated.kt @@ -1,17 +1,6 @@ /* - * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2010-2023 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. */ @file:Suppress("DEPRECATION", "DEPRECATION_ERROR", "UNCHECKED_CAST") diff --git a/core/compiler.common/src/org/jetbrains/kotlin/renderer/KeywordStringsGenerated.java b/core/compiler.common/src/org/jetbrains/kotlin/renderer/KeywordStringsGenerated.java index ce99e98ad6f..d7f60fac4cb 100644 --- a/core/compiler.common/src/org/jetbrains/kotlin/renderer/KeywordStringsGenerated.java +++ b/core/compiler.common/src/org/jetbrains/kotlin/renderer/KeywordStringsGenerated.java @@ -1,17 +1,6 @@ /* - * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2010-2023 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. */ package org.jetbrains.kotlin.renderer; diff --git a/generators/interpreter/GenerateInterpreterMap.kt b/generators/interpreter/GenerateInterpreterMap.kt index 1e886f6fd65..bc1ac10fa9e 100644 --- a/generators/interpreter/GenerateInterpreterMap.kt +++ b/generators/interpreter/GenerateInterpreterMap.kt @@ -38,7 +38,8 @@ fun main() { fun generateMap(): String { val sb = StringBuilder() val p = Printer(sb) - p.println(File("license/COPYRIGHT.txt").readText()) + p.println(File("license/COPYRIGHT_HEADER.txt").readText()) + p.println() p.println("@file:Suppress(\"DEPRECATION\", \"DEPRECATION_ERROR\", \"UNCHECKED_CAST\")") p.println() p.println("package org.jetbrains.kotlin.ir.interpreter.builtins") diff --git a/generators/protobufCompare/GenerateProtoBufCompare.kt b/generators/protobufCompare/GenerateProtoBufCompare.kt index d72e220b5ba..93cb2b9b2e2 100644 --- a/generators/protobufCompare/GenerateProtoBufCompare.kt +++ b/generators/protobufCompare/GenerateProtoBufCompare.kt @@ -92,9 +92,10 @@ class GenerateProtoBufCompare { fun generate(): String { val sb = StringBuilder() val p = Printer(sb) - p.println(File("license/COPYRIGHT.txt").readText()) + p.println(File("license/COPYRIGHT_HEADER.txt").readText()) + p.println() p.println("@file:Suppress(\"UNUSED_PARAMETER\")") - p.println("") + p.println() p.println("package org.jetbrains.kotlin.incremental") p.println() diff --git a/generators/tests/org/jetbrains/kotlin/generators/frontend/GenerateKeywordStrings.java b/generators/tests/org/jetbrains/kotlin/generators/frontend/GenerateKeywordStrings.java index fd1e61511d1..2b1bff6a84e 100644 --- a/generators/tests/org/jetbrains/kotlin/generators/frontend/GenerateKeywordStrings.java +++ b/generators/tests/org/jetbrains/kotlin/generators/frontend/GenerateKeywordStrings.java @@ -27,7 +27,8 @@ public class GenerateKeywordStrings { StringBuilder sb = new StringBuilder(); Printer p = new Printer(sb); - p.println(FileUtil.loadFile(new File("license/COPYRIGHT.txt"))); + p.println(FileUtil.loadFile(new File("license/COPYRIGHT_HEADER.txt"))); + p.println(); p.println("package org.jetbrains.kotlin.renderer;"); p.println(); p.println("import java.util.Arrays;"); diff --git a/generators/wasm/WasmIntrinsicGenerator.kt b/generators/wasm/WasmIntrinsicGenerator.kt index 70bacfac8b4..a8efa33ab14 100644 --- a/generators/wasm/WasmIntrinsicGenerator.kt +++ b/generators/wasm/WasmIntrinsicGenerator.kt @@ -9,9 +9,9 @@ import org.jetbrains.kotlin.wasm.ir.WasmOp import java.io.File import java.io.FileWriter - fun FileWriter.generateStandardWasmInternalHeader() { - appendLine(File("license/COPYRIGHT.txt").readText()) + appendLine(File("license/COPYRIGHT_HEADER.txt").readText()) + appendLine() appendLine("package kotlin.wasm.internal") appendLine() appendLine("//") diff --git a/libraries/stdlib/wasm/src/generated/_WasmArrays.kt b/libraries/stdlib/wasm/src/generated/_WasmArrays.kt index 13a51a0bada..e477752644a 100644 --- a/libraries/stdlib/wasm/src/generated/_WasmArrays.kt +++ b/libraries/stdlib/wasm/src/generated/_WasmArrays.kt @@ -1,17 +1,6 @@ /* - * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2010-2023 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. */ package kotlin.wasm.internal diff --git a/libraries/stdlib/wasm/src/generated/_WasmOp.kt b/libraries/stdlib/wasm/src/generated/_WasmOp.kt index 9172bbdd823..f9c8999e910 100644 --- a/libraries/stdlib/wasm/src/generated/_WasmOp.kt +++ b/libraries/stdlib/wasm/src/generated/_WasmOp.kt @@ -1,17 +1,6 @@ /* - * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2010-2023 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. */ package kotlin.wasm.internal