Skip to content

Commit 87db749

Browse files
committed
Fix license task
1 parent 9589af1 commit 87db749

File tree

3 files changed

+37
-30
lines changed

3 files changed

+37
-30
lines changed

build.gradle

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,29 @@
11
plugins {
22
id("fabric-loom") version("${loom_version}") apply(false)
33
id("net.neoforged.moddev") version("${moddev_version}") apply(false)
4+
id("org.cadixdev.licenser") version("${licenser_version}") apply(false)
45
id("me.modmuss50.mod-publish-plugin") version("${mpp_version}")
56
id("org.ajoberstar.grgit.service") version("${grgitservice_version}")
6-
id("org.cadixdev.licenser") version("${licenser_version}")
77
}
88

99
subprojects {
1010
version = mod_version
1111
group = mod_group
12-
13-
if (name == "common") {
14-
// License headers
15-
apply(plugin: "org.cadixdev.licenser")
16-
String licenseDir = "src/main/resources/assets/${mod_id}/license/"
17-
license {
18-
// This can be done in multiloader-common.gradle but only if the
19-
// "matching" method is not used (throws a pile of weird errors).
20-
// Also, NeoForge's update of the plugin can't handle matching at all.
21-
include("**/*.java") // Java files only
22-
header = project.file(licenseDir + "HEADER.txt")
23-
properties {
24-
project_name = mod_name
25-
owner_name = mod_owner
26-
year = java.time.LocalDate.now().getYear().toString()
27-
}
12+
13+
// License headers
14+
apply(plugin: "org.cadixdev.licenser")
15+
String licenseDir = "src/main/resources/assets/${mod_id}/license/"
16+
license {
17+
include("**/*.java") // Java files only
18+
header = rootProject.project("common").file(licenseDir + "HEADER.txt")
19+
properties {
20+
project_name = mod_name
21+
owner_name = mod_owner
22+
year = java.time.LocalDate.now().getYear().toString()
2823
}
29-
} else {
24+
}
25+
26+
if (name != "common") {
3027
// Publishing
3128
apply(plugin: "me.modmuss50.mod-publish-plugin")
3229
apply(plugin: "org.ajoberstar.grgit.service")

fabric/src/main/java/dev/terminalmc/signcopy/SignCopyFabric.java

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
/*
2-
* SignCopy by TerminalMC
2+
* Copyright 2024 TerminalMC
33
*
4-
* To the extent possible under law, the person who associated CC0 with
5-
* SignCopy has waived all copyright and related or neighboring rights
6-
* to SignCopy.
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
77
*
8-
* You should have received a copy of the CC0 legalcode along with this
9-
* work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
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.
1015
*/
1116

1217
package dev.terminalmc.signcopy;

neoforge/src/main/java/dev/terminalmc/signcopy/SignCopyNeoForge.java

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
/*
2-
* SignCopy by TerminalMC
2+
* Copyright 2024 TerminalMC
33
*
4-
* To the extent possible under law, the person who associated CC0 with
5-
* SignCopy has waived all copyright and related or neighboring rights
6-
* to SignCopy.
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
77
*
8-
* You should have received a copy of the CC0 legalcode along with this
9-
* work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
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.
1015
*/
1116

1217
package dev.terminalmc.signcopy;

0 commit comments

Comments
 (0)