Skip to content

Commit e2fbbf8

Browse files
authored
Follow-up fixes for Forge version combination (#5)
* Fix spotless in wrong scope * Add missing license headers * Update forge mod versions in README * Remove unused import from build script
1 parent 4d856ba commit e2fbbf8

13 files changed

Lines changed: 177 additions & 21 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CommunityRadar - Official - Forge Mod 1.8.9
1+
CommunityRadar - Official - Forge Mod (1.8.9 & 1.12.2)
22
==========================
33
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
44
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4.svg)](#code-of-conduct)

build.gradle.kts

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,30 @@ allprojects {
3030
repositories {
3131
mavenCentral()
3232
}
33+
34+
plugins.withId("com.diffplug.spotless") {
35+
spotless {
36+
java {
37+
licenseHeaderFile(rootProject.file("HEADER"))
38+
endWithNewline()
39+
trimTrailingWhitespace()
40+
removeUnusedImports()
41+
removeWildcardImports()
42+
}
43+
44+
kotlinGradle {
45+
licenseHeaderFile(rootProject.file("HEADER"), "(plugins|import|buildscript|pluginManagement|base)")
46+
endWithNewline()
47+
trimTrailingWhitespace()
48+
}
49+
50+
kotlin {
51+
licenseHeaderFile(rootProject.file("HEADER"))
52+
endWithNewline()
53+
trimTrailingWhitespace()
54+
}
55+
}
56+
}
3357
}
3458

3559
subprojects {
@@ -97,22 +121,6 @@ subprojects {
97121
}
98122
}
99123

100-
spotless {
101-
java {
102-
licenseHeaderFile(rootProject.file("HEADER"))
103-
endWithNewline()
104-
trimTrailingWhitespace()
105-
removeUnusedImports()
106-
removeWildcardImports()
107-
}
108-
109-
kotlin {
110-
licenseHeaderFile(rootProject.file("HEADER"))
111-
endWithNewline()
112-
trimTrailingWhitespace()
113-
}
114-
}
115-
116124
tasks {
117125
named<Jar>("jar").configure {
118126
enabled = false

common/build.gradle.kts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
1-
import org.gradle.kotlin.dsl.libs
2-
1+
/*
2+
* Copyright 2024 - present CommunityRadarGG <https://community-radar.de/>
3+
*
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+
*
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.
15+
*/
316
base {
417
archivesName.set("common")
518
}

common/src/main/java/io/github/communityradargg/forgemod/command/RootRadarCommand.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2024 - present CommunityRadarGG <https://community-radar.de/>
3+
*
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+
*
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.
15+
*/
116
package io.github.communityradargg.forgemod.command;
217

318
import io.github.communityradargg.forgemod.util.CommonHandler;

common/src/main/java/io/github/communityradargg/forgemod/util/CommonHandler.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2024 - present CommunityRadarGG <https://community-radar.de/>
3+
*
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+
*
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.
15+
*/
116
package io.github.communityradargg.forgemod.util;
217

318
import com.google.gson.Gson;

common/src/main/java/io/github/communityradargg/forgemod/util/PlayerInfo.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2024 - present CommunityRadarGG <https://community-radar.de/>
3+
*
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+
*
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.
15+
*/
116
package io.github.communityradargg.forgemod.util;
217

318
import org.jetbrains.annotations.NotNull;

common/src/main/java/io/github/communityradargg/forgemod/util/PlayerNameUuidCache.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2024 - present CommunityRadarGG <https://community-radar.de/>
3+
*
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+
*
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.
15+
*/
116
package io.github.communityradargg.forgemod.util;
217

318
import com.google.common.cache.Cache;

common/src/main/java/io/github/communityradargg/forgemod/util/VersionBridge.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2024 - present CommunityRadarGG <https://community-radar.de/>
3+
*
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+
*
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.
15+
*/
116
package io.github.communityradargg.forgemod.util;
217

318
import org.jetbrains.annotations.NotNull;

settings.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
rootProject.name = "communityradar-forge"
17-
1816
pluginManagement {
1917
repositories {
2018
gradlePluginPortal()
@@ -41,6 +39,8 @@ plugins {
4139
id("org.gradle.toolchains.foojay-resolver-convention") version("0.8.0")
4240
}
4341

42+
rootProject.name = "communityradar-forge"
43+
4444
include("common")
4545

4646
listOf("1.8.9", "1.12.2").forEach { version ->

versions/1.12.2/build.gradle.kts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2024 - present CommunityRadarGG <https://community-radar.de/>
3+
*
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+
*
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.
15+
*/
116
import dev.architectury.pack200.java.Pack200Adapter
217

318
val versionText: String by extra

0 commit comments

Comments
 (0)