Skip to content

Commit

Permalink
Use SPDX license header.
Browse files Browse the repository at this point in the history
  • Loading branch information
baron1405 committed Jun 14, 2024
1 parent 163bc5f commit f3a0232
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 135 deletions.
1 change: 0 additions & 1 deletion dev/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<!-- File must start with the C Thing copyright header -->
<module name="RegexpHeader">
<property name="headerFile" value="${config_loc}/header.txt"/>
<property name="multiLines" value="3"/>
</module>

<!-- Flag IDE generated comments -->
Expand Down
13 changes: 1 addition & 12 deletions dev/checkstyle/header.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
^/\*$
^ \* Copyright [\d]{4}((,[\s]*[\d]{4})*|(-[\d]{4})?) C Thing Software$
^ \*$
^ \* 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\.$
^ \* SPDX-License-Identifier: Apache-2.0$
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* SPDX-License-Identifier: Apache-2.0
*/

package org.cthing.gradle.plugins.h2;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* SPDX-License-Identifier: Apache-2.0
*/

package org.cthing.gradle.plugins.h2;
Expand Down Expand Up @@ -254,7 +243,7 @@ private void writeConstants(final Connection conn) throws SQLException, IOExcept
PrintWriter writer = writerMap.get(schemaSuffix);
if (writer == null) {
final File pathname = outputFile(schemaSuffix).get().getAsFile();
LOGGER.info("Writing database constants file: " + pathname);
LOGGER.info("Writing database constants file: {}", pathname);
writer = new PrintWriter(pathname, StandardCharsets.UTF_8);
writerMap.put(schemaSuffix, writer);
writeFileStart(writer, packageName, classBaseName + schemaSuffix, modifier);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* SPDX-License-Identifier: Apache-2.0
*/

package org.cthing.gradle.plugins.h2;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* SPDX-License-Identifier: Apache-2.0
*/

package org.cthing.gradle.plugins.h2;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* SPDX-License-Identifier: Apache-2.0
*/

package org.cthing.gradle.plugins.h2;
Expand Down
15 changes: 2 additions & 13 deletions src/main/java/org/cthing/gradle/plugins/h2/H2SqlConstantsTask.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* SPDX-License-Identifier: Apache-2.0
*/

package org.cthing.gradle.plugins.h2;
Expand Down Expand Up @@ -242,7 +231,7 @@ public void taskAction() {
@Override
protected void loadDatabase(final Connection conn, final DataSource dataSource) throws SQLException, IOException {
for (final File scriptFile : getSource().getFiles()) {
LOGGER.info("Loading the database with " + scriptFile);
LOGGER.info("Loading the database with {}", scriptFile);
try (Reader reader = Files.newBufferedReader(scriptFile.toPath(), StandardCharsets.UTF_8)) {
RunScript.execute(conn, reader);
}
Expand Down
13 changes: 1 addition & 12 deletions src/main/java/org/cthing/gradle/plugins/h2/SourceAccess.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* SPDX-License-Identifier: Apache-2.0
*/

package org.cthing.gradle.plugins.h2;
Expand Down
13 changes: 1 addition & 12 deletions src/main/java/org/cthing/gradle/plugins/h2/package-info.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* SPDX-License-Identifier: Apache-2.0
*/

@PackageNonnullByDefault
Expand Down
13 changes: 1 addition & 12 deletions src/test/java/org/cthing/gradle/plugins/h2/PluginApplyTest.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* SPDX-License-Identifier: Apache-2.0
*/

package org.cthing.gradle.plugins.h2;
Expand Down
13 changes: 1 addition & 12 deletions src/test/java/org/cthing/gradle/plugins/h2/PluginIntegTest.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* SPDX-License-Identifier: Apache-2.0
*/

package org.cthing.gradle.plugins.h2;
Expand Down

0 comments on commit f3a0232

Please sign in to comment.