Skip to content

Commit 6652601

Browse files
authored
Add missing RAT task in Iceberg catalog migrator (#30)
1 parent c440eb4 commit 6652601

File tree

4 files changed

+102
-0
lines changed

4 files changed

+102
-0
lines changed

iceberg-catalog-migrator/build.gradle.kts

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@
1717
* under the License.
1818
*/
1919

20+
import org.nosphere.apache.rat.RatTask
21+
2022
plugins {
2123
`maven-publish`
2224
signing
2325
`build-conventions`
26+
alias(libs.plugins.rat)
2427
}
2528

2629
spotless {
@@ -29,3 +32,45 @@ spotless {
2932
target("*.gradle.kts", "buildSrc/*.gradle.kts")
3033
}
3134
}
35+
36+
tasks.named<RatTask>("rat").configure {
37+
// Gradle
38+
excludes.add("**/build/**")
39+
excludes.add("gradle/wrapper/gradle-wrapper*")
40+
excludes.add(".gradle")
41+
excludes.add("**/kotlin-compiler*")
42+
43+
excludes.add("ide-name.txt")
44+
excludes.add("version.txt")
45+
46+
excludes.add("LICENSE")
47+
excludes.add("DISCLAIMER")
48+
excludes.add("NOTICE")
49+
50+
// Eclipse preference files cannot have comments
51+
excludes.add("**/*.prefs")
52+
53+
// Git & GitHub
54+
excludes.add(".git")
55+
excludes.add(".github/pull_request_template.md")
56+
57+
// Misc build artifacts
58+
excludes.add("**/.keep")
59+
excludes.add("logs/**")
60+
excludes.add("**/*.lock")
61+
62+
// Binary files
63+
excludes.add("**/*.jar")
64+
excludes.add("**/*.zip")
65+
excludes.add("**/*.tar.gz")
66+
excludes.add("**/*.tgz")
67+
excludes.add("**/*.class")
68+
69+
// IntelliJ
70+
excludes.add(".idea")
71+
excludes.add("**/*.iml")
72+
excludes.add("**/*.iws")
73+
74+
// Rat can't scan binary images
75+
excludes.add("**/*.png")
76+
}

iceberg-catalog-migrator/codestyle/intellij-java-google-style.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one
4+
or more contributor license agreements. See the NOTICE file
5+
distributed with this work for additional information
6+
regarding copyright ownership. The ASF licenses this file
7+
to you under the Apache License, Version 2.0 (the
8+
"License"); you may not use this file except in compliance
9+
with the License. You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing,
14+
software distributed under the License is distributed on an
15+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
KIND, either express or implied. See the License for the
17+
specific language governing permissions and limitations
18+
under the License.
19+
-->
220
<code_scheme name="GoogleStyle">
321
<option name="OTHER_INDENT_OPTIONS">
422
<value>

iceberg-catalog-migrator/gradle/baselibs.versions.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
120
# Dependencies needed by buildSrc/
221

322
[versions]

iceberg-catalog-migrator/gradle/libs.versions.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
120
[versions]
221
assertj = "3.27.3"
322
aws = "2.30.3" # this is in mapping with iceberg repo.
@@ -61,4 +80,5 @@ slf4j = { module = "org.slf4j:log4j-over-slf4j", version.ref = "slf4j" }
6180
errorprone = { id = "net.ltgt.errorprone", version = "4.1.0" }
6281
nessie-run = { id = "org.projectnessie", version.ref = "nessieRunner" }
6382
nexus-publish-plugin = { id = "io.github.gradle-nexus.publish-plugin", version = "2.0.0" }
83+
rat = { id = "org.nosphere.apache.rat", version = "0.8.1" }
6484
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadowPlugin" }

0 commit comments

Comments
 (0)