File tree Expand file tree Collapse file tree
rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import java.util.Calendar
2+
13plugins {
24 id(" org.openrewrite.build.root" ) version " latest.release"
35 id(" org.openrewrite.build.java-base" ) version " latest.release"
@@ -30,8 +32,14 @@ subprojects {
3032 val idx = args?.indexOf(" -o" ) ? : return @doLast
3133 if (idx < 0 || idx + 1 >= args!! .size) return @doLast
3234 val rootPrefix = rootProject.projectDir.absolutePath + " /"
35+ val year = Calendar .getInstance().get(Calendar .YEAR )
36+ val licenseHeader = " /*\n " + rootProject.file(" gradle/licenseHeader.txt" )
37+ .readText().trim()
38+ .replace(" \$ {year}" , year.toString())
39+ .lines()
40+ .joinToString(" \n " ) { " * $it " .trimEnd() } + " \n */\n "
3341 project.file(args!! [idx + 1 ]).walk().filter { it.extension == " java" }.forEach { file ->
34- file.writeText(file.readLines().joinToString(" \n " ) { line ->
42+ file.writeText(licenseHeader + file.readLines().joinToString(" \n " ) { line ->
3543 line.trimEnd().replace(" // Generated from $rootPrefix " , " // Generated from " )
3644 } + " \n " )
3745 }
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2026 the original author or authors.
3+ * <p>
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ * <p>
8+ * https://www.apache.org/licenses/LICENSE-2.0
9+ * <p>
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
116// Generated from rewrite-hcl/src/main/antlr/HCLLexer.g4 by ANTLR 4.13.2
217package org .openrewrite .hcl .internal .grammar ;
318import java .util .Stack ;
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2026 the original author or authors.
3+ * <p>
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ * <p>
8+ * https://www.apache.org/licenses/LICENSE-2.0
9+ * <p>
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
116// Generated from rewrite-hcl/src/main/antlr/HCLParser.g4 by ANTLR 4.13.2
217package org .openrewrite .hcl .internal .grammar ;
318import org .antlr .v4 .runtime .atn .*;
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2026 the original author or authors.
3+ * <p>
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ * <p>
8+ * https://www.apache.org/licenses/LICENSE-2.0
9+ * <p>
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
116// Generated from rewrite-hcl/src/main/antlr/HCLParser.g4 by ANTLR 4.13.2
217package org .openrewrite .hcl .internal .grammar ;
318
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2026 the original author or authors.
3+ * <p>
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ * <p>
8+ * https://www.apache.org/licenses/LICENSE-2.0
9+ * <p>
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
116// Generated from rewrite-hcl/src/main/antlr/HCLParser.g4 by ANTLR 4.13.2
217package org .openrewrite .hcl .internal .grammar ;
318import org .antlr .v4 .runtime .tree .AbstractParseTreeVisitor ;
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2026 the original author or authors.
3+ * <p>
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ * <p>
8+ * https://www.apache.org/licenses/LICENSE-2.0
9+ * <p>
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
116// Generated from rewrite-hcl/src/main/antlr/HCLParser.g4 by ANTLR 4.13.2
217package org .openrewrite .hcl .internal .grammar ;
318import org .antlr .v4 .runtime .tree .ParseTreeListener ;
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2026 the original author or authors.
3+ * <p>
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ * <p>
8+ * https://www.apache.org/licenses/LICENSE-2.0
9+ * <p>
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
116// Generated from rewrite-hcl/src/main/antlr/HCLParser.g4 by ANTLR 4.13.2
217package org .openrewrite .hcl .internal .grammar ;
318import org .antlr .v4 .runtime .tree .ParseTreeVisitor ;
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2026 the original author or authors.
3+ * <p>
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ * <p>
8+ * https://www.apache.org/licenses/LICENSE-2.0
9+ * <p>
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
116// Generated from rewrite-hcl/src/main/antlr/JsonPathLexer.g4 by ANTLR 4.13.2
217package org .openrewrite .hcl .internal .grammar ;
318import org .antlr .v4 .runtime .Lexer ;
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2026 the original author or authors.
3+ * <p>
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ * <p>
8+ * https://www.apache.org/licenses/LICENSE-2.0
9+ * <p>
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
116// Generated from rewrite-hcl/src/main/antlr/JsonPathParser.g4 by ANTLR 4.13.2
217package org .openrewrite .hcl .internal .grammar ;
318import org .antlr .v4 .runtime .atn .*;
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2026 the original author or authors.
3+ * <p>
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ * <p>
8+ * https://www.apache.org/licenses/LICENSE-2.0
9+ * <p>
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
116// Generated from rewrite-hcl/src/main/antlr/JsonPathParser.g4 by ANTLR 4.13.2
217package org .openrewrite .hcl .internal .grammar ;
318
You can’t perform that action at this time.
0 commit comments